    * { margin: 0; padding: 0; box-sizing: border-box; }

    @keyframes gradient {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }
    @keyframes float {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-20px); }
    }
    @keyframes glow {
      0%, 100% { box-shadow: 0 0 20px rgba(102,126,234,0.3), 0 0 60px rgba(102,126,234,0.1); }
      50% { box-shadow: 0 0 40px rgba(102,126,234,0.5), 0 0 80px rgba(102,126,234,0.2); }
    }
    @keyframes slideInUp {
      from { opacity: 0; transform: translateY(30px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: scale(0.95); }
      to { opacity: 1; transform: scale(1); }
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }

    body {
      min-height: 100vh;
      background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #0f0c29);
      background-size: 400% 400%;
      animation: gradient 15s ease infinite;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 20px;
      position: relative;
      overflow-x: hidden;
    }
    body::before {
      content: '';
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background-image:
        radial-gradient(circle at 20% 50%, rgba(120,119,198,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(102,126,234,0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(147,51,234,0.1) 0%, transparent 50%);
      pointer-events: none;
    }

    .container {
      width: 100%;
      max-width: 1000px;
      position: relative;
      z-index: 1;
      margin-top: 60px;
      padding: 0 15px;
    }

    /* ===== LOGO ===== */
    .logo {
      text-align: center;
      margin-bottom: 50px;
      animation: slideInUp 0.8s ease;
    }
    .logo h1 {
      font-size: clamp(36px, 10vw, 72px);
      font-weight: 800;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      letter-spacing: -2px;
      margin-bottom: 10px;
      animation: float 6s ease-in-out infinite;
    }
    .logo p {
      color: rgba(255,255,255,0.6);
      font-size: clamp(12px, 3vw, 16px);
      letter-spacing: clamp(2px, 1vw, 4px);
      text-transform: uppercase;
      font-weight: 600;
    }

    /* ===== TOP BAR WITH PLUGIN BUTTON ===== */
    .top-bar {
      display: flex;
      justify-content: flex-end;
      margin-bottom: 20px;
      gap: 10px;
      animation: slideInUp 0.8s ease;
    }
    .btn-plugins {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(102,126,234,0.2);
      border: 1px solid rgba(102,126,234,0.4);
      color: #a5b4fc;
      padding: 10px 18px;
      border-radius: 50px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.5px;
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
    }
    .btn-plugins:hover {
      background: rgba(102,126,234,0.35);
      border-color: rgba(102,126,234,0.7);
      color: white;
      transform: translateY(-1px);
    }
    .plugin-count-badge {
      background: linear-gradient(135deg, #667eea, #764ba2);
      color: white;
      border-radius: 50%;
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
    }

    /* ===== SEARCH ENGINE SELECTOR ===== */
    .search-engines-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 14px;
      animation: slideInUp 0.8s ease 0.25s both;
    }
    .engine-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.6);
      padding: 7px 14px;
      border-radius: 50px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
      transition: all 0.25s ease;
      backdrop-filter: blur(10px);
      white-space: nowrap;
    }
    .engine-btn:hover {
      background: rgba(255,255,255,0.12);
      color: white;
      transform: translateY(-1px);
    }
    .engine-btn.active {
      background: rgba(102,126,234,0.25);
      border-color: rgba(102,126,234,0.6);
      color: #a5b4fc;
    }
    .engine-btn .engine-icon { font-size: 14px; }
    .engine-add-btn {
      background: rgba(102,126,234,0.15);
      border: 1px dashed rgba(102,126,234,0.4);
      color: rgba(102,126,234,0.8);
    }
    .engine-add-btn:hover { background: rgba(102,126,234,0.25); border-style: solid; color: #a5b4fc; }

    /* ===== CUSTOMIZATION PANEL ===== */
    .customize-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      backdrop-filter: blur(8px);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .customize-overlay.open { display: flex; }
    .customize-modal {
      background: linear-gradient(135deg, rgba(15,12,41,0.98), rgba(36,36,62,0.98));
      border: 1px solid rgba(102,126,234,0.3);
      border-radius: 28px;
      width: 100%;
      max-width: 600px;
      max-height: 88vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      animation: fadeIn 0.3s ease;
      box-shadow: 0 40px 100px rgba(0,0,0,0.6);
    }
    .customize-body {
      flex: 1;
      overflow-y: auto;
      padding: 28px 32px 32px;
    }
    .customize-body::-webkit-scrollbar { width: 6px; }
    .customize-body::-webkit-scrollbar-thumb { background: rgba(102,126,234,0.4); border-radius: 3px; }

    .customize-section {
      margin-bottom: 32px;
    }
    .customize-section h3 {
      color: rgba(255,255,255,0.9);
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 16px;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .bg-presets {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
      gap: 10px;
      margin-bottom: 16px;
    }
    .bg-preset {
      height: 60px;
      border-radius: 12px;
      cursor: pointer;
      border: 2px solid transparent;
      transition: all 0.25s ease;
      position: relative;
      overflow: hidden;
    }
    .bg-preset:hover { transform: scale(1.05); }
    .bg-preset.active { border-color: rgba(255,255,255,0.8); }
    .bg-preset .preset-label {
      position: absolute;
      bottom: 3px;
      left: 0; right: 0;
      text-align: center;
      font-size: 9px;
      color: white;
      font-weight: 700;
      text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    }
    .customize-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-bottom: 14px;
    }
    .customize-field label {
      color: rgba(255,255,255,0.6);
      font-size: 12px;
      font-weight: 600;
      display: block;
      margin-bottom: 7px;
      letter-spacing: 0.3px;
    }
    .customize-field input[type="color"] {
      width: 100%;
      height: 44px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      background: rgba(255,255,255,0.06);
      cursor: pointer;
      padding: 4px;
    }
    .customize-field input[type="range"] {
      width: 100%;
      accent-color: #667eea;
    }
    .customize-field input[type="text"],
    .customize-field select {
      width: 100%;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      padding: 10px 14px;
      color: white;
      font-size: 13px;
      outline: none;
    }
    .customize-field select option { background: #1a1730; }
    .toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .toggle-row:last-child { border-bottom: none; }
    .toggle-row span { color: rgba(255,255,255,0.75); font-size: 13px; font-weight: 600; }
    .toggle-switch {
      position: relative;
      width: 44px;
      height: 24px;
      flex-shrink: 0;
    }
    .toggle-switch input { opacity: 0; width: 0; height: 0; }
    .toggle-switch .slider {
      position: absolute;
      inset: 0;
      background: rgba(255,255,255,0.15);
      border-radius: 24px;
      cursor: pointer;
      transition: 0.3s;
    }
    .toggle-switch .slider::before {
      content: '';
      position: absolute;
      left: 3px; top: 3px;
      width: 18px; height: 18px;
      background: white;
      border-radius: 50%;
      transition: 0.3s;
    }
    .toggle-switch input:checked + .slider { background: linear-gradient(135deg, #667eea, #764ba2); }
    .toggle-switch input:checked + .slider::before { transform: translateX(20px); }

    /* ===== CUSTOM ELEMENTS PANEL ===== */
    .custom-elements-section {
      margin-bottom: 32px;
    }
    .custom-element-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 16px;
    }
    .custom-element-item {
      display: flex;
      align-items: center;
      gap: 10px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 12px 14px;
    }
    .custom-element-item .ce-icon { font-size: 22px; flex-shrink: 0; }
    .custom-element-item .ce-info { flex: 1; min-width: 0; }
    .custom-element-item .ce-name { color: white; font-weight: 700; font-size: 13px; }
    .custom-element-item .ce-type { color: rgba(255,255,255,0.4); font-size: 11px; }
    .custom-element-item .ce-delete {
      background: rgba(239,68,68,0.15);
      border: 1px solid rgba(239,68,68,0.3);
      color: #f87171;
      width: 28px; height: 28px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      flex-shrink: 0;
    }
    .custom-element-item .ce-delete:hover { background: rgba(239,68,68,0.3); }

    .add-element-form {
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 14px;
      padding: 18px;
    }
    .add-element-form select,
    .add-element-form input,
    .add-element-form textarea {
      width: 100%;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      padding: 10px 14px;
      color: white;
      font-size: 13px;
      outline: none;
      margin-bottom: 10px;
      font-family: inherit;
    }
    .add-element-form textarea { min-height: 80px; resize: vertical; }
    .add-element-form select option { background: #1a1730; }

    /* ===== CUSTOM ELEMENTS ON PAGE ===== */
    .custom-element-block {
      animation: slideInUp 0.5s ease;
      margin-bottom: 30px;
      position: relative;
    }
    .custom-element-block .ce-remove-bar {
      display: none;
      position: absolute;
      top: 8px; right: 8px;
      z-index: 10;
    }
    .custom-element-block:hover .ce-remove-bar { display: block; }
    .ce-remove-bar button {
      background: rgba(239,68,68,0.8);
      border: none;
      color: white;
      padding: 4px 10px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 11px;
      font-weight: 700;
    }

    .ce-text-block {
      background: rgba(255,255,255,0.05);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 20px;
      padding: 24px 28px;
      color: rgba(255,255,255,0.85);
      font-size: 15px;
      line-height: 1.7;
    }
    .ce-link-block {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2));
      border: 1px solid rgba(102,126,234,0.3);
      border-radius: 50px;
      padding: 14px 26px;
      color: #a5b4fc;
      text-decoration: none;
      font-weight: 700;
      font-size: 14px;
      transition: all 0.3s ease;
    }
    .ce-link-block:hover { background: rgba(102,126,234,0.3); transform: translateY(-2px); color: white; }
    .ce-image-block { max-width: 100%; border-radius: 16px; overflow: hidden; }
    .ce-image-block img { width: 100%; border-radius: 16px; display: block; }
    .ce-html-block {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 16px;
      padding: 20px;
      color: white;
    }

    /* ===== WIDGET GRID ===== */
    #widget-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px;
      margin-bottom: 50px;
      animation: slideInUp 0.8s ease 0.2s both;
    }
    .widget {
      background: rgba(255,255,255,0.05);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 24px;
      padding: 30px 25px;
      text-align: center;
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
    }
    .widget::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
      opacity: 0;
      transition: opacity 0.4s ease;
    }
    .widget:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.2); box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
    .widget:hover::before { opacity: 1; }
    .widget-icon { font-size: 32px; margin-bottom: 12px; }
    .widget-value { font-size: 24px; font-weight: 700; color: white; margin-bottom: 5px; }
    .widget-label { font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

    /* Plugin widget remove button */
    .widget-remove-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      background: rgba(239,68,68,0.7);
      border: none;
      color: white;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 14px;
      display: none;
      align-items: center;
      justify-content: center;
      line-height: 1;
      transition: background 0.2s;
      z-index: 10;
    }
    .widget:hover .widget-remove-btn { display: flex; }
    .widget-remove-btn:hover { background: rgba(239,68,68,1); }

    /* ===== SEARCH ===== */
    #search-box {
      position: relative;
      margin-bottom: 60px;
      animation: slideInUp 0.8s ease 0.3s both;
    }
    #search-box::before {
      content: '';
      position: absolute;
      inset: -2px;
      background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
      border-radius: 50px;
      opacity: 0;
      transition: opacity 0.4s ease;
      animation: glow 3s ease-in-out infinite;
      pointer-events: none;
    }
    #search-box:hover::before { opacity: 1; }
    #search-box .search-inner {
      position: relative;
      display: flex;
      align-items: center;
      background: rgba(255,255,255,0.08);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 50px;
      overflow: visible;
      transition: all 0.4s ease;
    }
    #search-box.suggestions-open .search-inner {
      border-radius: 24px 24px 0 0;
      border-bottom-color: transparent;
    }
    #search-box:hover .search-inner { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }
    #search-box input {
      flex: 1;
      border: none;
      padding: 20px;
      font-size: clamp(14px, 4vw, 18px);
      background: transparent;
      color: white;
      outline: none;
      min-width: 0;
    }
    #search-box input::placeholder { color: rgba(255,255,255,0.4); }
    #search-box button {
      border: none;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 20px 30px;
      cursor: pointer;
      font-size: clamp(13px, 3vw, 16px);
      font-weight: 700;
      transition: all 0.3s ease;
      letter-spacing: 1px;
      text-transform: uppercase;
      white-space: nowrap;
      border-radius: 0 50px 50px 0;
    }
    #search-box.suggestions-open button { border-radius: 0 24px 0 0; }
    #search-box button:hover { background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%); }

    /* Search suggestions dropdown */
    #search-suggestions {
      display: none;
      position: absolute;
      top: 100%;
      left: 0; right: 0;
      background: rgba(15,12,40,0.97);
      backdrop-filter: blur(24px);
      border: 1px solid rgba(255,255,255,0.15);
      border-top: none;
      border-radius: 0 0 24px 24px;
      overflow: hidden;
      z-index: 9999;
      box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }
    #search-suggestions.visible { display: block; }
    .suggestion-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 20px;
      cursor: pointer;
      transition: background 0.15s;
      color: rgba(255,255,255,0.85);
      font-size: 15px;
    }
    .suggestion-item:hover, .suggestion-item.active {
      background: rgba(102,126,234,0.18);
    }
    .suggestion-item .sug-icon {
      font-size: 14px;
      opacity: 0.5;
      flex-shrink: 0;
      width: 18px;
      text-align: center;
    }
    .suggestion-item .sug-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .suggestion-item .sug-text strong { color: white; font-weight: 700; }
    .suggestion-item .sug-arrow {
      font-size: 12px;
      opacity: 0.25;
      flex-shrink: 0;
      transform: rotate(225deg);
      display: inline-block;
    }
    .suggestion-divider {
      height: 1px;
      background: rgba(255,255,255,0.06);
      margin: 4px 0;
    }

    /* Dev tools panel */
    #devtools-panel {
      display: none;
      position: fixed;
      bottom: 0; left: 0; right: 0;
      height: 340px;
      background: rgba(8,6,24,0.97);
      backdrop-filter: blur(24px);
      border-top: 2px solid rgba(102,126,234,0.4);
      z-index: 88888;
      flex-direction: column;
      animation: slideInUp 0.25s ease;
    }
    #devtools-panel.open { display: flex; }
    .devtools-topbar {
      display: flex;
      align-items: center;
      gap: 0;
      background: rgba(255,255,255,0.03);
      border-bottom: 1px solid rgba(255,255,255,0.07);
      padding: 0 12px;
      flex-shrink: 0;
    }
    .devtools-tab {
      background: none;
      border: none;
      color: rgba(255,255,255,0.45);
      padding: 10px 16px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: all 0.2s;
      letter-spacing: 0.3px;
    }
    .devtools-tab:hover { color: rgba(255,255,255,0.8); }
    .devtools-tab.active { color: #a5b4fc; border-bottom-color: #a5b4fc; }
    .devtools-close {
      margin-left: auto;
      background: none;
      border: none;
      color: rgba(255,255,255,0.4);
      font-size: 18px;
      cursor: pointer;
      padding: 8px 12px;
      line-height: 1;
      transition: color 0.2s;
    }
    .devtools-close:hover { color: white; }
    .devtools-resize {
      position: absolute;
      top: -4px; left: 0; right: 0;
      height: 8px;
      cursor: ns-resize;
    }
    .devtools-body { flex: 1; overflow: hidden; display: flex; }
    .devtools-pane { display: none; flex: 1; overflow: auto; padding: 12px; font-family: 'Fira Code','Courier New',monospace; font-size: 12px; }
    .devtools-pane.active { display: flex; flex-direction: column; gap: 6px; }

    /* Console pane */
    .console-output {
      flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 3px;
      margin-bottom: 8px;
    }
    .console-output::-webkit-scrollbar { width: 4px; }
    .console-output::-webkit-scrollbar-thumb { background: rgba(102,126,234,0.3); border-radius: 2px; }
    .console-line {
      padding: 3px 8px;
      border-radius: 4px;
      font-size: 12px;
      line-height: 1.5;
      word-break: break-all;
    }
    .console-line.log { color: rgba(255,255,255,0.75); }
    .console-line.error { color: #f87171; background: rgba(239,68,68,0.07); }
    .console-line.warn { color: #fbbf24; background: rgba(245,158,11,0.07); }
    .console-line.info { color: #60a5fa; background: rgba(96,165,250,0.07); }
    .console-line.success { color: #34d399; background: rgba(52,211,153,0.07); }
    .console-line .cl-time { color: rgba(255,255,255,0.2); margin-right: 8px; font-size: 10px; }
    .console-input-row {
      display: flex;
      gap: 8px;
      align-items: center;
      border-top: 1px solid rgba(255,255,255,0.07);
      padding-top: 8px;
      flex-shrink: 0;
    }
    .console-input-row .ci-prompt { color: rgba(102,126,234,0.8); flex-shrink: 0; }
    .console-input-row input {
      flex: 1;
      background: none;
      border: none;
      color: white;
      font-family: 'Fira Code','Courier New',monospace;
      font-size: 12px;
      outline: none;
    }

    /* Plugin editor pane */
    .plugin-editor-pane {
      display: flex;
      gap: 12px;
      height: 100%;
    }
    .plugin-editor-sidebar {
      width: 180px;
      flex-shrink: 0;
      border-right: 1px solid rgba(255,255,255,0.07);
      padding-right: 12px;
      overflow-y: auto;
    }
    .plugin-editor-sidebar h4 { color: rgba(255,255,255,0.4); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
    .ped-plugin-item {
      padding: 7px 10px;
      border-radius: 8px;
      cursor: pointer;
      color: rgba(255,255,255,0.6);
      font-size: 12px;
      transition: all 0.15s;
      display: flex; align-items: center; gap: 6px;
      font-family: inherit;
    }
    .ped-plugin-item:hover { background: rgba(255,255,255,0.06); color: white; }
    .ped-plugin-item.active { background: rgba(102,126,234,0.2); color: #a5b4fc; }
    .plugin-editor-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
    .plugin-editor-main textarea {
      flex: 1;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 10px;
      padding: 10px 12px;
      color: #e2e8f0;
      font-family: 'Fira Code','Courier New',monospace;
      font-size: 12px;
      outline: none;
      resize: none;
      line-height: 1.6;
    }
    .plugin-editor-main textarea:focus { border-color: rgba(102,126,234,0.4); }
    .ped-toolbar { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
    .ped-btn {
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.12);
      color: rgba(255,255,255,0.7);
      padding: 5px 12px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 11px;
      font-weight: 600;
      transition: all 0.15s;
    }
    .ped-btn:hover { background: rgba(255,255,255,0.13); color: white; }
    .ped-btn.primary { background: rgba(102,126,234,0.2); border-color: rgba(102,126,234,0.4); color: #a5b4fc; }
    .ped-btn.danger { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #f87171; }
    .ped-plugin-name { color: rgba(255,255,255,0.3); font-size: 11px; margin-left: auto; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }

    /* Storage inspector pane */
    .storage-table { width: 100%; border-collapse: collapse; font-size: 11px; }
    .storage-table th { color: rgba(255,255,255,0.35); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; padding: 6px 8px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .storage-table td { padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); color: rgba(255,255,255,0.65); vertical-align: top; word-break: break-all; }
    .storage-table td:first-child { color: #a5b4fc; font-weight: 600; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
    .storage-table td:last-child { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .storage-table tr:hover td { background: rgba(255,255,255,0.03); }
    .storage-del-btn { background: none; border: none; color: rgba(239,68,68,0.5); cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 4px; }
    .storage-del-btn:hover { color: #f87171; background: rgba(239,68,68,0.1); }

    /* Network log pane */
    .net-row { display: flex; gap: 10px; align-items: baseline; padding: 3px 6px; border-radius: 4px; }
    .net-row:hover { background: rgba(255,255,255,0.04); }
    .net-method { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; flex-shrink: 0; }
    .net-method.GET { background: rgba(52,211,153,0.15); color: #34d399; }
    .net-method.POST { background: rgba(96,165,250,0.15); color: #60a5fa; }
    .net-url { flex: 1; color: rgba(255,255,255,0.6); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .net-status { font-size: 11px; flex-shrink: 0; }
    .net-status.ok { color: #34d399; }
    .net-status.err { color: #f87171; }
    .net-time { color: rgba(255,255,255,0.25); font-size: 10px; flex-shrink: 0; }

    /* ===== BOOKMARKS ===== */
    .section-title {
      color: white;
      font-size: 24px;
      font-weight: 700;
      margin-bottom: 30px;
      text-align: center;
      letter-spacing: 1px;
      animation: slideInUp 0.8s ease 0.4s both;
    }
    #bookmarks {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: 20px;
      margin-bottom: 60px;
      animation: slideInUp 0.8s ease 0.5s both;
    }
    .bookmark {
      position: relative;
      background: rgba(255,255,255,0.05);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 20px;
      padding: 30px 20px;
      text-align: center;
      text-decoration: none;
      color: white;
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: hidden;
      min-height: 120px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 15px;
    }
    .bookmark::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2));
      opacity: 0;
      transition: opacity 0.4s ease;
    }
    .bookmark:hover { transform: translateY(-10px) scale(1.05); border-color: rgba(255,255,255,0.3); box-shadow: 0 20px 60px rgba(102,126,234,0.3); }
    .bookmark:hover::before { opacity: 1; }
    .delete-btn {
      position: absolute;
      top: 10px; right: 10px;
      background: rgba(239,68,68,0.8);
      backdrop-filter: blur(10px);
      color: white;
      border: none;
      border-radius: 50%;
      width: 28px; height: 28px;
      cursor: pointer;
      font-size: 18px;
      display: none;
      align-items: center;
      justify-content: center;
      line-height: 1;
      transition: all 0.2s ease;
      z-index: 10;
    }
    .bookmark:hover .delete-btn { display: flex; }
    .delete-btn:hover { background: rgb(239,68,68); transform: scale(1.1); }

    .add-bookmark {
      background: rgba(255,255,255,0.05);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 24px;
      padding: 30px;
      margin-bottom: 40px;
      animation: slideInUp 0.8s ease 0.6s both;
    }
    .add-bookmark h3 { color: white; font-size: 18px; font-weight: 700; margin-bottom: 20px; }
    .input-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 15px; }
    .add-bookmark input {
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 12px;
      padding: 14px 18px;
      color: white;
      font-size: 15px;
      outline: none;
      transition: border-color 0.3s ease;
      width: 100%;
    }
    .add-bookmark input::placeholder { color: rgba(255,255,255,0.4); }
    .add-bookmark input:focus { border-color: rgba(102,126,234,0.6); }
    .add-bookmark button {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border: none;
      color: white;
      padding: 14px 35px;
      border-radius: 12px;
      cursor: pointer;
      font-size: 15px;
      font-weight: 700;
      transition: all 0.3s ease;
      width: 100%;
    }
    .add-bookmark button:hover { opacity: 0.9; transform: translateY(-1px); }

    /* ===== BUTTONS ===== */
    .button-group {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
      justify-content: center;
      margin-bottom: 60px;
      animation: slideInUp 0.8s ease 0.7s both;
    }
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 16px 30px;
      border-radius: 50px;
      text-decoration: none;
      font-weight: 700;
      font-size: 14px;
      letter-spacing: 0.5px;
      transition: all 0.3s ease;
      border: none;
      cursor: pointer;
    }
    .btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
    .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 40px rgba(102,126,234,0.4); }
    .btn-secondary { background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.15); color: white; }
    .btn-secondary:hover { background: rgba(255,255,255,0.15); transform: translateY(-3px); }
    .btn-outline { background: transparent; border: 2px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); }
    .btn-outline:hover { border-color: rgba(255,255,255,0.5); color: white; transform: translateY(-3px); }

    /* ===================================
       PLUGIN SYSTEM
    =================================== */

    /* OVERLAY */
    .plugin-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      backdrop-filter: blur(8px);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .plugin-overlay.open { display: flex; }

    /* MODAL */
    .plugin-modal {
      background: linear-gradient(135deg, rgba(15,12,41,0.98), rgba(36,36,62,0.98));
      border: 1px solid rgba(102,126,234,0.3);
      border-radius: 28px;
      width: 100%;
      max-width: 760px;
      max-height: 88vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      animation: fadeIn 0.3s ease;
      box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
    }
    .modal-header {
      padding: 28px 32px 20px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }
    .modal-header h2 {
      color: white;
      font-size: 22px;
      font-weight: 800;
      background: linear-gradient(135deg, #667eea, #f093fb);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .modal-header p { color: rgba(255,255,255,0.45); font-size: 13px; margin-top: 3px; }
    .modal-close {
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.7);
      width: 36px; height: 36px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      flex-shrink: 0;
    }
    .modal-close:hover { background: rgba(239,68,68,0.3); color: white; border-color: rgba(239,68,68,0.5); }

    /* TABS */
    .modal-tabs {
      display: flex;
      gap: 4px;
      padding: 16px 32px 0;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      flex-shrink: 0;
    }
    .tab-btn {
      background: none;
      border: none;
      color: rgba(255,255,255,0.45);
      padding: 10px 18px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.4px;
      border-bottom: 2px solid transparent;
      transition: all 0.2s;
      margin-bottom: -1px;
    }
    .tab-btn:hover { color: rgba(255,255,255,0.8); }
    .tab-btn.active { color: #a5b4fc; border-bottom-color: #667eea; }

    /* MODAL BODY */
    .modal-body { flex: 1; overflow-y: auto; padding: 24px 32px 32px; }
    .modal-body::-webkit-scrollbar { width: 6px; }
    .modal-body::-webkit-scrollbar-track { background: transparent; }
    .modal-body::-webkit-scrollbar-thumb { background: rgba(102,126,234,0.4); border-radius: 3px; }

    .tab-panel { display: none; }
    .tab-panel.active { display: block; }

    /* ===== INSTALLED PLUGINS ===== */
    .installed-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 14px;
    }
    .installed-card {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 16px;
      padding: 18px;
      transition: all 0.3s;
      position: relative;
    }
    .installed-card:hover { border-color: rgba(102,126,234,0.4); background: rgba(102,126,234,0.06); }
    .installed-card-icon { font-size: 28px; margin-bottom: 10px; }
    .installed-card-name { color: white; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
    .installed-card-author { color: rgba(255,255,255,0.4); font-size: 11px; margin-bottom: 12px; }
    .installed-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .card-btn {
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.7);
      padding: 5px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 11px;
      font-weight: 600;
      transition: all 0.2s;
    }
    .card-btn:hover { background: rgba(255,255,255,0.12); color: white; }
    .card-btn.danger { border-color: rgba(239,68,68,0.3); color: rgba(239,68,68,0.8); }
    .card-btn.danger:hover { background: rgba(239,68,68,0.15); color: #f87171; }
    .card-btn.primary { background: rgba(102,126,234,0.15); border-color: rgba(102,126,234,0.4); color: #a5b4fc; }
    .card-btn.primary:hover { background: rgba(102,126,234,0.25); color: white; }
    .installed-status {
      position: absolute;
      top: 12px; right: 12px;
      width: 8px; height: 8px;
      border-radius: 50%;
      background: #34d399;
    }
    .installed-status.inactive { background: rgba(255,255,255,0.2); }

    /* Свёрнутое меню доп. действий на карточке плагина (Показать + Ещё) */
    .installed-card-more-menu {
      display: none;
      position: absolute;
      top: 100%;
      right: 0;
      margin-top: 6px;
      background: #1a1a2e;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      padding: 8px;
      flex-direction: column;
      gap: 6px;
      min-width: 160px;
      z-index: 20;
      box-shadow: 0 12px 32px rgba(0,0,0,0.45);
    }
    .installed-card-more-menu.open { display: flex; }
    .installed-card-more-menu .card-btn { width: 100%; text-align: left; }
    .installed-card-actions { position: relative; }

    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: rgba(255,255,255,0.35);
    }
    .empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
    .empty-state p { font-size: 15px; line-height: 1.6; }

    /* ===== GALLERY ===== */
    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 14px;
    }
    .gallery-card {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 16px;
      padding: 20px;
      cursor: pointer;
      transition: all 0.3s;
      position: relative;
      overflow: hidden;
    }
    .gallery-card::before {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--card-color, linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1)));
      opacity: 0;
      transition: opacity 0.3s;
    }
    .gallery-card:hover::before { opacity: 1; }
    .gallery-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.2); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
    .gallery-card-icon { font-size: 32px; margin-bottom: 12px; position: relative; }
    .gallery-card-name { color: white; font-weight: 700; font-size: 15px; margin-bottom: 4px; position: relative; }
    .gallery-card-desc { color: rgba(255,255,255,0.45); font-size: 12px; line-height: 1.5; margin-bottom: 14px; position: relative; }
    .gallery-card-footer { display: flex; align-items: center; justify-content: space-between; position: relative; }
    .gallery-card-author { color: rgba(255,255,255,0.3); font-size: 11px; }
    .install-btn {
      background: linear-gradient(135deg, #667eea, #764ba2);
      border: none;
      color: white;
      padding: 6px 14px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
      transition: all 0.2s;
    }
    .install-btn:hover { opacity: 0.85; transform: scale(1.05); }
    .install-btn.installed { background: rgba(52,211,153,0.2); border: 1px solid rgba(52,211,153,0.4); color: #34d399; }
    .install-btn.installed:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); color: #f87171; }

    /* ===== CREATE PLUGIN ===== */
    .create-section { display: flex; flex-direction: column; gap: 20px; }
    .create-section label { color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 600; display: block; margin-bottom: 7px; letter-spacing: 0.4px; }
    .create-section input,
    .create-section select,
    .create-section textarea {
      width: 100%;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      padding: 13px 16px;
      color: white;
      font-size: 14px;
      outline: none;
      transition: border-color 0.2s;
      font-family: inherit;
    }
    .create-section input:focus,
    .create-section select:focus,
    .create-section textarea:focus { border-color: rgba(102,126,234,0.6); background: rgba(255,255,255,0.08); }
    .create-section select option { background: #1a1730; color: white; }
    .create-section textarea { resize: vertical; min-height: 100px; }
    .create-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

    .code-editor {
      position: relative;
    }
    .code-editor textarea {
      font-family: 'Fira Code', 'Courier New', monospace;
      font-size: 13px;
      min-height: 220px;
      line-height: 1.6;
      color: #e2e8f0;
      tab-size: 2;
    }
    .code-hint {
      margin-top: 8px;
      color: rgba(255,255,255,0.3);
      font-size: 11px;
      line-height: 1.6;
    }
    .code-hint code {
      background: rgba(255,255,255,0.08);
      padding: 1px 5px;
      border-radius: 4px;
      color: #a5b4fc;
      font-family: monospace;
    }

    .create-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
    .create-actions .preview-btn {
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.15);
      color: white;
      padding: 12px 24px;
      border-radius: 12px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 700;
      transition: all 0.2s;
    }
    .create-actions .preview-btn:hover { background: rgba(255,255,255,0.14); }
    .create-actions .save-btn {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border: none;
      color: white;
      padding: 12px 28px;
      border-radius: 12px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 700;
      transition: all 0.2s;
    }
    .create-actions .save-btn:hover { opacity: 0.9; transform: translateY(-1px); }

    /* LOAD FROM FILE */
    .load-zone {
      border: 2px dashed rgba(102,126,234,0.3);
      border-radius: 16px;
      padding: 40px 20px;
      text-align: center;
      cursor: pointer;
      transition: all 0.3s;
      color: rgba(255,255,255,0.4);
    }
    .load-zone:hover { border-color: rgba(102,126,234,0.7); background: rgba(102,126,234,0.05); color: rgba(255,255,255,0.7); }
    .load-zone.dragover { border-color: #667eea; background: rgba(102,126,234,0.1); }
    .load-zone .zone-icon { font-size: 40px; margin-bottom: 12px; }
    .load-zone p { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
    .load-zone span { font-size: 12px; }
    #plugin-file-input { display: none; }

    /* TOAST */
    .toast-container {
      position: fixed;
      bottom: 30px;
      right: 30px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .toast {
      background: rgba(15,12,41,0.95);
      border: 1px solid rgba(255,255,255,0.12);
      color: white;
      padding: 14px 20px;
      border-radius: 14px;
      font-size: 14px;
      font-weight: 600;
      backdrop-filter: blur(20px);
      display: flex;
      align-items: center;
      gap: 10px;
      animation: slideInUp 0.3s ease;
      box-shadow: 0 10px 30px rgba(0,0,0,0.4);
      max-width: 320px;
    }
    .toast.success { border-color: rgba(52,211,153,0.4); }
    .toast.error { border-color: rgba(239,68,68,0.4); }
    .toast.info { border-color: rgba(102,126,234,0.4); }

    /* RESPONSIVE */
    @media (max-width: 600px) {
      .modal-header, .modal-tabs, .modal-body { padding-left: 20px; padding-right: 20px; }
      .create-row { grid-template-columns: 1fr; }
      .installed-grid, .gallery-grid { grid-template-columns: 1fr 1fr; }
    }
    @media (max-width: 420px) {
      .installed-grid, .gallery-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 768px) {
      #widget-container { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 30px; }
      .widget { padding: 20px 15px; }
      .widget-icon { font-size: 24px; margin-bottom: 8px; }
      .widget-value { font-size: 20px; }
      #search-box { margin-bottom: 40px; }
      #search-box input { padding: 16px 18px; }
      #search-box button { padding: 16px 20px; font-size: 13px; }
      .section-title { font-size: 20px; margin-bottom: 20px; }
      #bookmarks { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 40px; }
      .bookmark { padding: 20px 15px; min-height: 100px; font-size: 14px; }
      .add-bookmark { padding: 25px 15px; border-radius: 20px; }
      .input-group { gap: 10px; margin-bottom: 12px; }
      .add-bookmark input { padding: 14px 16px; }
      .add-bookmark button { padding: 14px 30px; font-size: 14px; }
      .btn { padding: 14px 25px; font-size: 13px; gap: 8px; }
      .button-group { gap: 10px; }
    }
    @media (min-width: 769px) {
      .input-group { flex-direction: row; }
      .add-bookmark { padding: 40px; }
      .add-bookmark h3 { margin-bottom: 25px; }
    }
    @media (max-width: 480px) {
      .container { padding: 0 5px; }
      #bookmarks { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
      .bookmark { padding: 15px 10px; min-height: 80px; font-size: 13px; }
      .delete-btn { width: 24px; height: 24px; font-size: 16px; top: 6px; right: 6px; }
    }

    /* ===== SIGNATURE SYSTEM STYLES ===== */
    /* Security warning banner */
    #security-warning-banner {
      display: none;
      position: fixed;
      top: 0; left: 0; right: 0;
      background: linear-gradient(135deg, #7f0000, #b00000, #7f0000);
      color: white;
      padding: 14px 20px;
      text-align: center;
      font-size: clamp(14px, 3vw, 20px);
      font-weight: 900;
      letter-spacing: 1px;
      z-index: 99999;
      text-transform: uppercase;
      border-bottom: 3px solid #ff0000;
      animation: pulse 1.5s ease-in-out infinite;
      box-shadow: 0 4px 30px rgba(255,0,0,0.5);
    }
    #security-warning-banner.active { display: block; }
    body.security-disabled {
      padding-top: 56px;
    }
    body.security-disabled .logo h1 {
      background: linear-gradient(135deg, #ff4444, #ff0000, #cc0000) !important;
      -webkit-background-clip: text !important;
      -webkit-text-fill-color: transparent !important;
      background-clip: text !important;
    }
    body.security-disabled {
      background: linear-gradient(-45deg, #1a0000, #3a0000, #200000, #1a0000) !important;
      animation: gradient-red 15s ease infinite !important;
    }
    @keyframes gradient-red {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    /* Plugin signature badge */
    .sig-badge {
      position: absolute;
      top: 8px; left: 8px;
      width: 22px; height: 22px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px;
      cursor: pointer;
      z-index: 10;
      transition: transform 0.2s;
    }
    .sig-badge:hover { transform: scale(1.2); }
    .sig-badge.official {
      background: rgba(52,211,153,0.2);
      border: 1px solid rgba(52,211,153,0.5);
    }
    .sig-badge.custom {
      background: rgba(245,158,11,0.25);
      border: 1px solid rgba(245,158,11,0.6);
    }
    .sig-badge.unsigned {
      background: rgba(239,68,68,0.2);
      border: 1px solid rgba(239,68,68,0.5);
    }

    /* Signature tooltip */
    .sig-tooltip {
      position: fixed;
      background: rgba(10,8,30,0.97);
      border: 1px solid rgba(245,158,11,0.5);
      border-radius: 12px;
      padding: 14px 18px;
      max-width: 280px;
      z-index: 99999;
      font-size: 13px;
      color: white;
      box-shadow: 0 8px 32px rgba(0,0,0,0.6);
      pointer-events: none;
    }
    .sig-tooltip .sig-tt-title { font-weight: 800; margin-bottom: 6px; font-size: 14px; }
    .sig-tooltip .sig-tt-warn { color: #fbbf24; font-size: 12px; margin-top: 6px; line-height: 1.5; }

    /* Security modal overlay */
    .security-modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.85);
      backdrop-filter: blur(12px);
      z-index: 10000;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .security-modal-overlay.open { display: flex; }
    .security-modal {
      background: linear-gradient(135deg, rgba(10,0,0,0.99), rgba(30,5,5,0.99));
      border: 2px solid rgba(239,68,68,0.5);
      border-radius: 24px;
      width: 100%; max-width: 520px;
      padding: 36px;
      animation: fadeIn 0.3s ease;
      box-shadow: 0 40px 100px rgba(200,0,0,0.3);
    }
    .security-modal h2 { color: #f87171; font-size: 22px; font-weight: 900; margin-bottom: 10px; }
    .security-modal p { color: rgba(255,255,255,0.7); font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
    .security-modal .danger-notice {
      background: rgba(239,68,68,0.1);
      border: 1px solid rgba(239,68,68,0.3);
      border-radius: 12px; padding: 14px;
      color: #fca5a5; font-size: 13px; margin-bottom: 24px;
    }

    /* Signature Manager panel */
    .sigman-section { margin-bottom: 28px; }
    .sigman-section h3 { color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 700; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 8px; }
    .sig-key-card {
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 12px; padding: 14px 16px;
      margin-bottom: 10px;
      display: flex; align-items: center; gap: 12px;
    }
    .sig-key-card.official-key { border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.04); }
    .sig-key-card.custom-key { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.04); }
    .sig-key-icon { font-size: 22px; flex-shrink: 0; }
    .sig-key-info { flex: 1; min-width: 0; }
    .sig-key-name { color: white; font-weight: 700; font-size: 13px; }
    .sig-key-fp { color: rgba(255,255,255,0.35); font-size: 10px; font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sig-key-actions { display: flex; gap: 6px; flex-shrink: 0; }

    /* Security unsafe plugin indicator on widget */
    .widget.unsafe-plugin { border-color: rgba(245,158,11,0.5) !important; }
    .widget.unsafe-plugin::after {
      content: '⚠';
      position: absolute;
      top: 6px; left: 6px;
      font-size: 14px;
      cursor: pointer;
    }

    /* Install blocked modal */
    .install-blocked {
      background: rgba(10,0,0,0.99);
      border: 2px solid rgba(239,68,68,0.6);
    }

    /* ===== MOBILE MODE ===== */
    body.mobile-mode .container { margin-top: 20px; padding: 0 8px; }
    body.mobile-mode .logo { margin-bottom: 24px; }
    body.mobile-mode .logo h1 { font-size: 42px; }
    body.mobile-mode #widget-container { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
    body.mobile-mode .widget { padding: 16px 10px; border-radius: 16px; }
    body.mobile-mode .widget-icon { font-size: 20px; margin-bottom: 4px; }
    body.mobile-mode .widget-value { font-size: 16px; }
    body.mobile-mode .widget-label { font-size: 10px; }
    body.mobile-mode #search-box { margin-bottom: 28px; }
    body.mobile-mode #search-box input { font-size: 16px !important; padding: 16px 18px !important; border-radius: 18px 0 0 18px !important; }
    body.mobile-mode #search-box button { padding: 16px 20px !important; font-size: 14px !important; }
    body.mobile-mode .search-engines-bar { gap: 6px; }
    body.mobile-mode .engine-btn { padding: 8px 12px; font-size: 12px; }
    body.mobile-mode #bookmarks { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
    body.mobile-mode .bookmark { padding: 18px 12px; min-height: 90px; font-size: 13px; border-radius: 16px; }
    body.mobile-mode .add-bookmark { padding: 20px; border-radius: 18px; }
    body.mobile-mode .button-group .btn { padding: 12px 20px; font-size: 13px; }
    body.mobile-mode .top-bar { gap: 7px; }
    body.mobile-mode .btn-plugins { padding: 8px 13px; font-size: 12px; }
    body.mobile-mode .section-title { font-size: 18px; margin-bottom: 16px; }
    .btn-mobile-mode {
      display: flex; align-items: center; gap: 7px;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.15);
      color: rgba(255,255,255,0.7);
      padding: 10px 14px; border-radius: 50px;
      cursor: pointer; font-size: 13px; font-weight: 600;
      transition: all 0.3s ease; backdrop-filter: blur(10px);
    }
    .btn-mobile-mode:hover { background: rgba(255,255,255,0.12); color: white; }
    .btn-mobile-mode.active { background: rgba(102,126,234,0.25); border-color: rgba(102,126,234,0.5); color: #a5b4fc; }

    /* ===== PLUGIN SHARE BUTTON ===== */
    .card-btn.share { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: #86efac; }
    .card-btn.share:hover { background: rgba(34,197,94,0.2); color: #4ade80; }

    /* ===== PLUGIN URL INSTALL MODAL ===== */
    .plugin-url-install-modal {
      background: linear-gradient(135deg, rgba(15,12,41,0.98), rgba(36,36,62,0.98));
      border: 1px solid rgba(102,126,234,0.4);
      border-radius: 24px; width: 100%; max-width: 480px;
      padding: 36px; animation: fadeIn 0.3s ease;
      box-shadow: 0 40px 100px rgba(0,0,0,0.7);
    }
    .plugin-url-install-modal h2 { color: white; font-size: 20px; font-weight: 800; margin-bottom: 8px; }
    .plugin-url-install-modal p { color: rgba(255,255,255,0.5); font-size: 13px; margin-bottom: 20px; line-height: 1.6; }
    .plugin-install-preview {
      background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
      border-radius: 14px; padding: 18px; margin-bottom: 20px;
    }
    .plugin-install-preview .pip-icon { font-size: 36px; margin-bottom: 10px; }
    .plugin-install-preview .pip-name { color: white; font-weight: 800; font-size: 17px; margin-bottom: 4px; }
    .plugin-install-preview .pip-meta { color: rgba(255,255,255,0.4); font-size: 12px; margin-bottom: 8px; }
    .plugin-install-preview .pip-desc { color: rgba(255,255,255,0.65); font-size: 13px; line-height: 1.5; }

    /* ===== PLUGIN STORE ===== */
    .store-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
    .store-item {
      display: flex; align-items: center; gap: 12px;
      background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px; padding: 12px 16px; transition: all 0.2s;
    }
    .store-item:hover { border-color: rgba(102,126,234,0.35); background: rgba(102,126,234,0.06); }
    .store-item-icon { font-size: 24px; flex-shrink: 0; }
    .store-item-info { flex: 1; min-width: 0; }
    .store-item-name { color: white; font-weight: 700; font-size: 13px; }
    .store-item-url { color: rgba(255,255,255,0.35); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .store-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .store-browser-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
    .store-browser-header h3 { color: white; font-size: 15px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .store-search-input {
      background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px; padding: 10px 14px; color: white;
      font-size: 13px; outline: none; width: 100%; margin-bottom: 14px; font-family: inherit;
    }
    .store-search-input:focus { border-color: rgba(102,126,234,0.5); }
    .store-plugins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
    .store-plugin-card {
      background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
      border-radius: 14px; padding: 16px; transition: all 0.25s; cursor: default;
    }
    .store-plugin-card:hover { border-color: rgba(102,126,234,0.35); transform: translateY(-2px); }
    .store-plugin-card .spc-icon { font-size: 28px; margin-bottom: 8px; }
    .store-plugin-card .spc-name { color: white; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
    .store-plugin-card .spc-author { color: rgba(255,255,255,0.35); font-size: 11px; margin-bottom: 8px; }
    .store-plugin-card .spc-desc { color: rgba(255,255,255,0.55); font-size: 11px; line-height: 1.5; margin-bottom: 12px; }
    .store-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
    .page-btn {
      background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.7); padding: 6px 12px; border-radius: 8px;
      cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.2s;
      font-family: inherit;
    }
    .page-btn:hover { background: rgba(255,255,255,0.12); color: white; }
    .page-btn.active { background: rgba(102,126,234,0.25); border-color: rgba(102,126,234,0.5); color: #a5b4fc; }
    .page-btn:disabled { opacity: 0.3; cursor: default; }
    .store-loading { text-align: center; padding: 40px; color: rgba(255,255,255,0.4); }
    .store-loading .sl-spin { font-size: 32px; animation: spin 1s linear infinite; display: inline-block; margin-bottom: 12px; }
    .store-add-form {
      background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
      border-radius: 14px; padding: 18px; margin-top: 8px;
    }
    .store-add-form input { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 10px 14px; color: white; font-size: 13px; outline: none; font-family: inherit; margin-bottom: 10px; }
    .store-add-form input:focus { border-color: rgba(102,126,234,0.5); }
    .store-tab-nav { display: flex; gap: 6px; margin-bottom: 18px; }
    .store-tab-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.55); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.2s; font-family: inherit; }
    .store-tab-btn:hover { color: white; background: rgba(255,255,255,0.1); }
    .store-tab-btn.active { background: rgba(102,126,234,0.2); border-color: rgba(102,126,234,0.4); color: #a5b4fc; }
    .store-tab-panel { display: none; }
    .store-tab-panel.active { display: block; }
    .unsigned-badge { display: inline-block; background: rgba(245,158,11,0.2); border: 1px solid rgba(245,158,11,0.5); color: #fbbf24; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }

    /* ===== KERNEL SYSTEM ===== */
    #kernel-warning-banner {
      display: none;
      position: fixed;
      top: 0; left: 0; right: 0;
      background: linear-gradient(135deg, #4a2b00, #8a5a00, #4a2b00);
      color: #ffe9b3;
      padding: 12px 44px 12px 20px;
      text-align: center;
      font-size: clamp(12px, 2.6vw, 15px);
      font-weight: 800;
      letter-spacing: 0.3px;
      z-index: 99998;
      border-bottom: 3px solid #f59e0b;
      box-shadow: 0 4px 24px rgba(245,158,11,0.35);
    }
    #kernel-warning-banner.active { display: block; }
    #kernel-warning-banner .kwb-close {
      position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
      background: rgba(255,255,255,0.12); border: none; color: #ffe9b3;
      width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1;
    }
    #kernel-warning-banner .kwb-close:hover { background: rgba(255,255,255,0.25); }
    body.kernel-banner-active #security-warning-banner.active ~ .container,
    body.kernel-banner-active { padding-top: 52px; }

    /* Kernel OTA update banner */
    #kernel-ota-banner {
      display: none;
      position: fixed;
      top: 0; left: 0; right: 0;
      background: linear-gradient(135deg, #1e2a5e, #364b9e, #1e2a5e);
      color: #dbe4ff;
      padding: 12px 20px;
      text-align: center;
      font-size: clamp(12px, 2.6vw, 14px);
      font-weight: 700;
      letter-spacing: 0.2px;
      z-index: 99997;
      border-bottom: 3px solid #667eea;
      box-shadow: 0 4px 24px rgba(102,126,234,0.35);
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 10px 16px;
    }
    #kernel-ota-banner.active { display: flex; }
    #kernel-ota-banner .kob-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    #kernel-ota-banner button {
      border: none; cursor: pointer; font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 20px; font-family: inherit;
    }
    #kernel-ota-banner .kob-update { background: white; color: #364b9e; }
    #kernel-ota-banner .kob-update:hover { background: #dbe4ff; }
    #kernel-ota-banner .kob-later { background: rgba(255,255,255,0.15); color: #dbe4ff; }
    #kernel-ota-banner .kob-later:hover { background: rgba(255,255,255,0.25); }
    body.kernel-ota-banner-active { padding-top: 48px; }

    .kernel-missing-overlay {
      display: none; position: fixed; inset: 0; z-index: 999999;
      background: rgba(5,3,15,0.92); backdrop-filter: blur(10px);
      align-items: center; justify-content: center; padding: 20px;
    }
    .kernel-missing-overlay.open { display: flex; }
    .kernel-missing-box {
      max-width: 480px; text-align: center; background: linear-gradient(135deg, rgba(36,10,10,0.98), rgba(60,20,10,0.98));
      border: 1px solid rgba(239,68,68,0.4); border-radius: 24px; padding: 36px 30px;
      box-shadow: 0 30px 90px rgba(0,0,0,0.6);
    }
    .kernel-missing-box .kmb-icon { font-size: 48px; margin-bottom: 14px; }
    .kernel-missing-box h2 { color: #fca5a5; font-size: 20px; margin-bottom: 10px; }
    .kernel-missing-box p { color: rgba(255,255,255,0.6); font-size: 13px; line-height: 1.6; margin-bottom: 22px; }
    .kernel-missing-box .kmb-actions { display: flex; flex-direction: column; gap: 10px; }

    .kernel-card {
      display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.09); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
      position: relative;
    }
    .kernel-card.active { border-color: rgba(52,211,153,0.5); background: rgba(52,211,153,0.06); }
    .kernel-card.official { border-color: rgba(102,126,234,0.4); }
    .kernel-card .kc-icon { font-size: 26px; }
    .kernel-card .kc-info { flex: 1; min-width: 0; }
    .kernel-card .kc-name { color: white; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
    .kernel-card .kc-meta { color: rgba(255,255,255,0.4); font-size: 11px; margin-top: 2px; }
    .kernel-card .kc-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
    .kernel-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
    .kernel-badge.official-b { background: rgba(102,126,234,0.2); color: #a5b4fc; border: 1px solid rgba(102,126,234,0.4); }
    .kernel-badge.custom-b { background: rgba(245,158,11,0.18); color: #fbbf24; border: 1px solid rgba(245,158,11,0.4); }
    .kernel-badge.active-b { background: rgba(52,211,153,0.18); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.4); }

    /* ===== FILE SYSTEM ===== */
    .fs-breadcrumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12px; }
    .fs-crumb { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); padding: 5px 11px; border-radius: 8px; cursor: pointer; font-weight: 600; }
    .fs-crumb:hover { background: rgba(102,126,234,0.2); color: white; }
    .fs-crumb.current { background: rgba(102,126,234,0.22); color: #a5b4fc; cursor: default; }
    .fs-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
    .fs-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
    .fs-item {
      display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 10px 14px; cursor: pointer;
    }
    .fs-item:hover { background: rgba(255,255,255,0.08); }
    .fs-item.locked { opacity: 0.6; cursor: not-allowed; }
    .fs-item .fs-item-icon { font-size: 17px; }
    .fs-item .fs-item-name { flex: 1; color: white; font-size: 13px; font-weight: 600; }
    .fs-item .fs-item-meta { color: rgba(255,255,255,0.35); font-size: 10px; }
    .fs-item .fs-item-actions { display: flex; gap: 4px; }
    .fs-item .fs-item-actions button { background: rgba(255,255,255,0.08); border: none; color: rgba(255,255,255,0.7); width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: 12px; }
    .fs-item .fs-item-actions button:hover { background: rgba(239,68,68,0.25); color: #f87171; }
    .fs-empty { text-align: center; padding: 30px; color: rgba(255,255,255,0.3); font-size: 13px; }

    .perm-select {
      background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px;
      color: white; font-size: 11px; padding: 4px 6px; font-family: inherit; width: 100%; box-sizing: border-box;
    }
    .perm-panel {
      margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08);
      display: flex; flex-direction: column; gap: 8px; font-size: 11px; color: rgba(255,255,255,0.55);
    }
    .perm-panel .perm-row-label { font-weight: 600; color: rgba(255,255,255,0.6); margin-bottom: 3px; display: block; }
    .perm-panel .perm-fs-toggle {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 6px 10px;
    }
    .perm-panel .perm-fs-toggle span { line-height: 1.3; }

    /* Plugin icon as image (instead of emoji) */
    .icon-img { width: 1em; height: 1em; object-fit: cover; border-radius: 8px; display: inline-block; vertical-align: middle; }
    .widget-icon .icon-img { width: 32px; height: 32px; border-radius: 10px; }
    .installed-card-icon .icon-img, .gallery-card-icon .icon-img { width: 34px; height: 34px; border-radius: 10px; }
    .icon-mode-row { display: flex; gap: 8px; margin-bottom: 10px; }
    .icon-mode-btn {
      flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.6);
      padding: 8px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; font-family: inherit;
    }
    .icon-mode-btn.active { background: rgba(102,126,234,0.25); border-color: rgba(102,126,234,0.6); color: #a5b4fc; }
    .icon-image-preview { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
    .icon-image-preview img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid rgba(255,255,255,0.15); }
    .icon-image-preview button { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #f87171; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 700; }

    /* Background image (photo from device) */
    .bg-image-preview-wrap { position: relative; margin-bottom: 14px; }
    .bg-image-preview-wrap img { width: 100%; max-height: 140px; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12); display: block; }
    .bg-image-preview-wrap .bg-image-remove {
      position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.2);
      color: white; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px;
    }
    .bg-upload-btn {
      display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
      background: rgba(102,126,234,0.15); border: 1px dashed rgba(102,126,234,0.4); color: #a5b4fc;
      padding: 12px; border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: 700; margin-bottom: 12px;
    }
    .bg-upload-btn:hover { background: rgba(102,126,234,0.25); border-style: solid; }
    .bg-mode-hint { color: rgba(255,255,255,0.4); font-size: 11px; margin-bottom: 10px; line-height: 1.5; }

    /* News block */
    .news-controls { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
    .news-controls select, .news-controls input {
      background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
      padding: 8px 12px; color: white; font-size: 13px; outline: none; font-family: inherit;
    }
    .news-controls select { flex: 0 0 auto; cursor: pointer; }
    .news-controls input { flex: 1; min-width: 160px; }
    .news-refresh-btn {
      background: rgba(102,126,234,0.15); border: 1px solid rgba(102,126,234,0.35); color: #a5b4fc;
      border-radius: 10px; padding: 8px 14px; cursor: pointer; font-size: 14px;
    }
    .news-refresh-btn:hover { background: rgba(102,126,234,0.28); }
    .news-item {
      display: block; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
      border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; text-decoration: none; transition: all 0.2s;
    }
    .news-item:hover { border-color: rgba(102,126,234,0.4); background: rgba(102,126,234,0.06); }
    .news-item-title { color: white; font-weight: 700; font-size: 14px; margin-bottom: 6px; line-height: 1.4; }
    .news-item-desc { color: rgba(255,255,255,0.5); font-size: 12px; line-height: 1.5; margin-bottom: 8px; }
    .news-item-meta { color: rgba(255,255,255,0.3); font-size: 11px; }
