    /* Default Theme - TradingView Dark */
    :root {
      --bg:#0d1421; --panel:#131722; --panel-hover:#1e222d; --border:#2a2e39;
      --text:#ffffff; --text-muted:#ffffff; --text-accent:#ffffff;
      --up:#4caf50; --down:#f23645; --accent:#2962ff; --accent-light:#3179f5;
      --success:#089981; --warning:#ff9800; --neutral:#6c757d;
      --header-bg:#1e2329; --chart-bg:#161a25; --sidebar-bg:#161a25;
      --primary:#2962ff;
    }

    /* Bloomberg Terminal Theme */
    [data-theme="bloomberg"] {
      --bg:#000000; --panel:#1a1a1a; --panel-hover:#2d2d2d; --border:#333333;
      --text:#ff8c00; --text-muted:#ff8c00; --text-accent:#ffff00;
      --up:#00ff00; --down:#ff0000; --accent:#ff8c00; --accent-light:#ffb84d;
      --success:#00ff00; --warning:#ffff00; --neutral:#666666;
      --header-bg:#000000; --chart-bg:#000000; --sidebar-bg:#000000;
      --primary:#ff8c00;
    }

    /* Robinhood Theme */
    [data-theme="robinhood"] {
      --bg:#0d0d0d; --panel:#1a1a1a; --panel-hover:#262626; --border:#333333;
      --text:#ffffff; --text-muted:#cccccc; --text-accent:#ffffff;
      --up:#00c805; --down:#ff5000; --accent:#00c805; --accent-light:#4dd637;
      --success:#00c805; --warning:#ff9500; --neutral:#666666;
      --header-bg:#000000; --chart-bg:#0d0d0d; --sidebar-bg:#0d0d0d;
      --primary:#00c805;
    }

    /* NYSE Classic Theme */
    [data-theme="nyse"] {
      --bg:#1a1a2e; --panel:#16213e; --panel-hover:#0f3460; --border:#0e4b99;
      --text:#e94560; --text-muted:#f2f2f2; --text-accent:#ffffff;
      --up:#28a745; --down:#dc3545; --accent:#e94560; --accent-light:#f05d7a;
      --success:#28a745; --warning:#ffc107; --neutral:#6c757d;
      --header-bg:#0f3460; --chart-bg:#1a1a2e; --sidebar-bg:#16213e;
      --primary:#e94560;
    }

    /* NASDAQ Theme */
    [data-theme="nasdaq"] {
      --bg:#0c1426; --panel:#162332; --panel-hover:#1e2f42; --border:#2a3f5f;
      --text:#00d4ff; --text-muted:#b8d4ff; --text-accent:#ffffff;
      --up:#00ff88; --down:#ff4757; --accent:#00d4ff; --accent-light:#4de2ff;
      --success:#00ff88; --warning:#ffa726; --neutral:#607d8b;
      --header-bg:#0f1b2d; --chart-bg:#0c1426; --sidebar-bg:#162332;
      --primary:#00d4ff;
    }

    /* Fidelity Theme */
    [data-theme="fidelity"] {
      --bg:#f8f9fa; --panel:#ffffff; --panel-hover:#e9ecef; --border:#dee2e6;
      --text:#212529; --text-muted:#6c757d; --text-accent:#000000;
      --up:#28a745; --down:#dc3545; --accent:#007bff; --accent-light:#4dabf7;
      --success:#28a745; --warning:#ffc107; --neutral:#6c757d;
      --header-bg:#ffffff; --chart-bg:#f8f9fa; --sidebar-bg:#ffffff;
      --primary:#007bff;
    }

    /* Binance Theme */
    [data-theme="binance"] {
      --bg:#0b0e11; --panel:#181a20; --panel-hover:#262932; --border:#2b3139;
      --text:#eaecef; --text-muted:#b7bdc6; --text-accent:#ffffff;
      --up:#0ecb81; --down:#f6465d; --accent:#f0b90b; --accent-light:#f8d33a;
      --success:#0ecb81; --warning:#f0b90b; --neutral:#848e9c;
      --header-bg:#181a20; --chart-bg:#0b0e11; --sidebar-bg:#181a20;
      --primary:#f0b90b;
    }

    /* E*TRADE Theme */
    [data-theme="etrade"] {
      --bg:#1a1a1a; --panel:#2a2a2a; --panel-hover:#3a3a3a; --border:#4a4a4a;
      --text:#ffffff; --text-muted:#cccccc; --text-accent:#ffffff;
      --up:#00c851; --down:#ff4444; --accent:#6200ea; --accent-light:#7c4dff;
      --success:#00c851; --warning:#ff8800; --neutral:#666666;
      --header-bg:#2a2a2a; --chart-bg:#1a1a1a; --sidebar-bg:#2a2a2a;
      --primary:#6200ea;
    }

    /* Charles Schwab Theme */
    [data-theme="schwab"] {
      --bg:#002147; --panel:#003366; --panel-hover:#004080; --border:#0066cc;
      --text:#ffffff; --text-muted:#b3d9ff; --text-accent:#ffffff;
      --up:#00b050; --down:#ff0000; --accent:#0066cc; --accent-light:#3385d6;
      --success:#00b050; --warning:#ffcc00; --neutral:#7f8c8d;
      --header-bg:#001a33; --chart-bg:#002147; --sidebar-bg:#003366;
      --primary:#0066cc;
    }

    /* TD Ameritrade Theme */
    [data-theme="td"] {
      --bg:#1e1e1e; --panel:#2d2d2d; --panel-hover:#3d3d3d; --border:#4d4d4d;
      --text:#ffffff; --text-muted:#cccccc; --text-accent:#ffffff;
      --up:#40826d; --down:#b85450; --accent:#40826d; --accent-light:#5da085;
      --success:#40826d; --warning:#e6a65c; --neutral:#666666;
      --header-bg:#2d2d2d; --chart-bg:#1e1e1e; --sidebar-bg:#2d2d2d;
      --primary:#40826d;
    }
    
    * { box-sizing: border-box; }
    body { 
      background: var(--bg); 
      color: var(--text); 
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      margin: 0; 
      overflow-x: hidden;
    }
    
    /* Header Styling */
    .tv-header { 
      display: flex; 
      gap: 20px; 
      flex-wrap: wrap; 
      align-items: center; 
      justify-content: space-between; 
      padding: 12px 20px; 
      background: var(--header-bg); 
      border-bottom: 1px solid var(--border);
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      position: relative;
      z-index: 100;
    }
    
    .tv-logo { 
      display: flex; 
      gap: 10px; 
      align-items: center; 
      font-weight: 700;
      font-size: 1.1rem;
      color: var(--text-accent);
    }
    
    .tv-logo i { 
      color: var(--accent); 
      font-size: 1.2rem;
    }

    /* Theme Selector */
    .theme-selector {
      margin-left: 20px;
    }

    .theme-select {
      background: var(--panel);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 6px 12px;
      border-radius: 4px;
      font-size: 0.85rem;
      min-width: 160px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .theme-select:hover {
      border-color: var(--primary);
      background: var(--panel-hover);
    }

    .theme-select:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.2);
    }

    .theme-select option {
      background: var(--panel);
      color: var(--text);
      padding: 8px;
    }
    
    /* Symbol and Price Display */
    .symbol-main { 
      display: flex; 
      flex-direction: column; 
      align-items: flex-end;
      margin-right: 20px;
    }
    
    .symbol-price-large { 
      font-size: 1.6rem; 
      font-weight: 700; 
      line-height: 1.2;
    }
    
    .price-up { color: var(--up); }
    .price-down { color: var(--down); }
    .price-neutral { color: var(--text); }
    
    /* Text styling overrides */
    .text-muted, .small, .text-muted.small {
      color: #ffffff !important;
    }
    
    /* Layout */
    .layout { 
      display: flex; 
      min-height: calc(100vh - 64px); 
    }
    
    /* Watchlist Sidebar */
    aside.watchlist { 
      width: 280px; 
      background: var(--sidebar-bg); 
      border-right: 1px solid var(--border); 
      padding: 16px 12px;
      overflow-y: auto;
    }
    
    .watchlist h6 {
      color: var(--text-accent);
      font-weight: 600;
      margin-bottom: 12px;
      font-size: 0.9rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    .watchlist-item { 
      cursor: pointer; 
      padding: 12px 14px; 
      border-radius: 6px; 
      margin-bottom: 4px; 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
      color: var(--text);
      transition: all 0.2s ease;
      border: 1px solid transparent;
    }
    
    .watchlist-item:hover { 
      background: var(--panel-hover);
      border-color: var(--border);
    }
    
    .watchlist-item.active { 
      background: var(--panel); 
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--accent);
    }
    
    .watchlist-item .symbol-name {
      font-weight: 600;
      color: var(--text-accent);
    }
    
    .watchlist-item .symbol-price {
      font-weight: 500;
      font-size: 0.9rem;
    }
    
    /* Chart Area */
    #ultimateChartArea { 
      height: 620px; 
      background: var(--chart-bg);
      border-radius: 8px;
      margin: 16px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    /* Controls */
    .controls { 
      display: flex; 
      gap: 12px; 
      align-items: center; 
      flex-wrap: wrap; 
    }
    
    .search-container {
      position: relative;
      min-width: 300px;
    }
    
    .form-control {
      background: var(--panel);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 6px;
      padding: 8px 12px;
      font-size: 0.9rem;
    }
    
    .form-control:focus {
      background: var(--panel);
      border-color: var(--accent);
      color: var(--text);
      box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.25);
    }
    
    .form-control::placeholder {
      color: var(--text-muted);
    }
    
    /* Button Styling */
    .btn-ghost { 
      background: var(--panel); 
      color: var(--text); 
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 6px 12px;
      font-size: 0.85rem;
      font-weight: 500;
      transition: all 0.2s ease;
    }
    
    .btn-ghost:hover { 
      background: var(--panel-hover);
      border-color: var(--accent);
      color: var(--text-accent);
    }
    
    .btn-ghost.active {
      background: var(--accent);
      border-color: var(--accent);
      color: white;
    }
    
    .btn-primary {
      background: var(--accent);
      border-color: var(--accent);
      border-radius: 6px;
      padding: 6px 12px;
    }
    
    .btn-primary:hover {
      background: var(--accent-light);
      border-color: var(--accent-light);
    }
    
    .btn-outline {
      background: transparent;
      border: 1px solid var(--accent);
      color: var(--accent);
    }
    
    .btn-outline:hover {
      background: var(--accent);
      color: var(--panel);
    }
    
    /* Badge Styling */
    .badge-conn { 
      font-size: 0.8rem; 
      padding: 4px 8px;
      border-radius: 4px;
      font-weight: 500;
    }
    
    .text-bg-success { 
      background: var(--success) !important; 
      color: white !important; 
    }
    
    .text-bg-danger { 
      background: var(--down) !important; 
      color: white !important; 
    }
    
    .text-bg-warning { 
      background: var(--warning) !important; 
      color: white !important; 
    }
    
    .text-bg-info { 
      background: var(--accent) !important; 
      color: white !important; 
    }
    
    .text-bg-secondary { 
      background: var(--text-muted) !important; 
      color: white !important; 
    }
    
    .badge-sm {
      font-size: 0.65rem;
      padding: 2px 6px;
      border-radius: 3px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    /* Toolbar */
    .toolbar { 
      background: var(--panel); 
      border-top: 1px solid var(--border); 
      padding: 12px 20px; 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
      gap: 12px; 
      flex-wrap: wrap; 
    }
    
    /* Grid Layout */
    .grid-2 { 
      display: grid; 
      grid-template-columns: 1fr auto; 
      gap: 20px; 
      align-items: center; 
      flex: 1; 
    }
    
    /* Search Suggestions */
    .search-suggestions { 
      position: absolute; 
      top: 100%; 
      left: 0; 
      right: 0; 
      z-index: 1000; 
      display: none; 
      max-height: 240px; 
      overflow-y: auto; 
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 6px;
      margin-top: 4px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    }
    
    .search-suggestion { 
      padding: 12px 16px; 
      cursor: pointer; 
      border-bottom: 1px solid var(--border); 
      color: var(--text);
      transition: background 0.2s ease;
    }
    
    .search-suggestion:hover { 
      background: var(--panel-hover); 
    }
    
    .search-suggestion:last-child { 
      border-bottom: none; 
    }
    
    .search-suggestion strong {
      color: var(--text-accent);
      font-weight: 600;
    }
    
    .search-suggestion .text-muted {
      color: var(--text-muted);
      font-size: 0.85rem;
      margin-top: 2px;
    }
    
    .search-highlight { 
      background: rgba(41, 98, 255, 0.2); 
    }
    
    /* Modal Styles */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7);
      -webkit-backdrop-filter: blur(4px);
      backdrop-filter: blur(4px);
      z-index: 2000;
      display: none;
      justify-content: center;
      align-items: center;
    }
    
    .modal-content {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      max-width: 500px;
      width: 90%;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
      position: relative;
    }
    
    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }
    
    .modal-title {
      font-size: 1.2rem;
      font-weight: 600;
      color: var(--text-accent);
      margin: 0;
    }
    
    .modal-close {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 1.5rem;
      cursor: pointer;
      padding: 8px;
      border-radius: 4px;
      transition: all 0.2s ease;
    }
    
    .modal-close:hover {
      background: var(--panel-hover);
      color: var(--text-accent);
    }
    
    .modal-body {
      margin-bottom: 20px;
    }
    
    .modal-footer {
      display: flex;
      gap: 12px;
      justify-content: flex-end;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }
    
    /* Watchlist Item Enhancements */
    .watchlist-item {
      position: relative;
      cursor: pointer; 
      padding: 12px 14px; 
      border-radius: 6px; 
      margin-bottom: 4px; 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
      color: var(--text);
      transition: all 0.2s ease;
      border: 1px solid transparent;
    }
    
    .watchlist-item:hover {
      background: var(--panel-hover);
      border-color: var(--border);
    }
    
    .watchlist-item:hover .watchlist-actions {
      opacity: 1;
      visibility: visible;
    }
    
    .watchlist-item.active { 
      background: var(--panel); 
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--accent);
    }
    
    .watchlist-actions {
      position: absolute;
      top: 50%;
      right: 8px;
      transform: translateY(-50%);
      opacity: 0;
      visibility: hidden;
      transition: all 0.2s ease;
      display: flex;
      gap: 4px;
      z-index: 10;
    }
    
    .watchlist-btn {
      background: var(--panel);
      border: 1px solid var(--border);
      color: var(--text-muted);
      border-radius: 4px;
      padding: 4px 6px;
      font-size: 0.75rem;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .watchlist-btn:hover {
      background: var(--panel-hover);
      color: var(--text-accent);
      border-color: var(--accent);
    }
    
    .watchlist-btn.danger:hover {
      background: var(--down);
      color: white;
      border-color: var(--down);
    }
    
    .watchlist-content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      pointer-events: none;
    }
    
    .watchlist-item:hover .watchlist-content {
      margin-right: 80px;
    }
    
    /* Form Styles */
    .form-group {
      margin-bottom: 16px;
    }
    
    .form-label {
      display: block;
      margin-bottom: 6px;
      font-weight: 500;
      color: var(--text-accent);
      font-size: 0.9rem;
    }
    
    .form-input {
      width: 100%;
      padding: 10px 12px;
      background: var(--chart-bg);
      border: 1px solid var(--border);
      border-radius: 6px;
      color: var(--text);
      font-size: 0.9rem;
      transition: all 0.2s ease;
    }
    
    .form-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.25);
    }
    
    .form-input::placeholder {
      color: var(--text-muted);
    }
    
    .validation-message {
      margin-top: 6px;
      font-size: 0.8rem;
      color: var(--down);
    }
    
    .validation-message.success {
      color: var(--up);
    }
    
    /* Button Variants */
    .btn-secondary {
      background: var(--panel);
      border: 1px solid var(--border);
      color: var(--text);
    }
    
    .btn-secondary:hover {
      background: var(--panel-hover);
      border-color: var(--accent);
    }
    
    .btn-danger {
      background: var(--down);
      border-color: var(--down);
      color: white;
    }
    
    .btn-danger:hover {
      background: #dc2626;
      border-color: #dc2626;
    }
    
    /* Modal Specific Styles */
    .modal-suggestions {
      position: relative;
      margin-top: -10px;
    }
    
    .validation-hidden {
      display: none;
    }
    
    .button-group {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
    }
    
    .template-buttons {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    
    /* Utilities */
    .symbol-stats {
      display: flex;
      gap: 20px;
      font-size: 0.85rem;
      color: var(--text-muted);
    }
    
    .symbol-stats > div {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }
    
    .symbol-stats .label {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 2px;
    }
    
    .symbol-stats .value {
      font-weight: 600;
      color: var(--text);
    }
    
    /* Tab System */
    .tab-container {
      background: var(--panel);
      border-bottom: 1px solid var(--border);
      margin: 0 16px;
      border-radius: 8px 8px 0 0;
      overflow: hidden;
    }
    
    .tab-nav {
      display: flex;
      background: var(--panel);
      border-bottom: 1px solid var(--border);
    }
    
    .tab-button {
      background: transparent;
      border: none;
      color: var(--text-muted);
      padding: 12px 20px;
      cursor: pointer;
      font-size: 0.9rem;
      font-weight: 500;
      transition: all 0.2s ease;
      border-bottom: 3px solid transparent;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .tab-button:hover {
      color: var(--text);
      background: var(--panel-hover);
    }
    
    .tab-button.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
      background: var(--chart-bg);
    }
    
    .tab-content {
      display: none;
      height: calc(100vh - 160px);
      overflow-y: auto;
    }
    
    .tab-content.active {
      display: block;
    }
    
    /* Grid/List View Toggle */
    .view-toggle {
      display: flex;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 6px;
      overflow: hidden;
    }
    
    .view-toggle button {
      background: transparent;
      border: none;
      color: var(--text-muted);
      padding: 6px 12px;
      cursor: pointer;
      font-size: 0.8rem;
      transition: all 0.2s ease;
    }
    
    .view-toggle button:hover {
      color: var(--text);
    }
    
    .view-toggle button.active {
      background: var(--accent);
      color: white;
    }
    
    /* Watchlist Grid View */
    .watchlist-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 12px;
      padding: 12px 0;
    }
    
    .watchlist-card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 16px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .watchlist-card:hover {
      background: var(--panel-hover);
      border-color: var(--accent);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .watchlist-card.active {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--accent);
    }
    
    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 12px;
    }
    
    .card-symbol {
      font-weight: 700;
      font-size: 1.1rem;
      color: var(--text-accent);
    }
    
    .card-price {
      font-weight: 600;
      font-size: 1.2rem;
    }
    
    .card-change {
      font-size: 0.85rem;
      font-weight: 500;
    }
    
    .card-actions {
      display: flex;
      gap: 4px;
      opacity: 0;
      transition: opacity 0.2s ease;
    }
    
    .watchlist-card:hover .card-actions {
      opacity: 1;
    }
    
    .card-actions button {
      background: var(--panel-hover);
      border: 1px solid var(--border);
      color: var(--text-muted);
      border-radius: 4px;
      padding: 4px 6px;
      cursor: pointer;
      font-size: 0.75rem;
      transition: all 0.2s ease;
    }
    
    .card-actions button:hover {
      background: var(--accent);
      border-color: var(--accent);
      color: white;
    }
    
    .card-actions button.danger:hover {
      background: var(--down);
      border-color: var(--down);
    }

    /* Watchlist List View - Card Style */
    .watchlist-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 8px 0;
    }

    .watchlist-card-list {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 12px 16px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      justify-content: space-between;
      align-items: center;
      min-height: 60px;
    }

    .watchlist-card-list:hover {
      background: var(--panel-hover);
      border-color: var(--accent);
      transform: translateX(4px);
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .watchlist-card-list.active {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--accent);
      background: var(--panel-hover);
    }

    .watchlist-card-list .card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0;
      flex: 1;
    }

    .watchlist-card-list .card-actions {
      display: flex;
      gap: 4px;
      opacity: 0;
      transition: opacity 0.2s ease;
      margin-left: 12px;
    }

    .watchlist-card-list:hover .card-actions {
      opacity: 1;
    }

    .watchlist-card-list .card-symbol {
      font-weight: 700;
      font-size: 1rem;
      color: var(--text-accent);
    }

    .watchlist-card-list .card-price {
      font-weight: 600;
      font-size: 1rem;
      margin-bottom: 2px;
    }

    .watchlist-card-list .card-change {
      font-size: 0.8rem;
      font-weight: 500;
    }

    /* Panel Layouts */
    .analysis-panel {
      padding: 20px;
      background: var(--chart-bg);
      height: 100%;
    }
    
    .panel-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      height: 100%;
    }
    
    .panel-section {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 16px;
      overflow-y: auto;
    }
    
    .panel-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }
    
    .panel-title {
      font-size: 1rem;
      font-weight: 600;
      color: var(--text-accent);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    /* Utilities */
    .muted { color: var(--text-muted); }
    .text-accent { color: var(--text-accent); }
    .btn-small { font-size: 0.85rem; }
    
    /* Mobile-First Responsive Design */
    
    /* Base Mobile Styles (320px+) */
    * {
      box-sizing: border-box;
    }
    
    html {
      font-size: 14px; /* Smaller base font for mobile */
      -webkit-text-size-adjust: 100%;
      touch-action: manipulation;
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
      line-height: 1.4;
      overflow-x: hidden;
    }
    
    /* Mobile-first button styling */
    .btn {
      min-height: 44px; /* Apple's minimum touch target */
      min-width: 44px;
      padding: 8px 16px;
      border: none;
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }
    
    .btn:active {
      transform: scale(0.95);
    }
    
    /* Mobile header */
    .tv-header {
      flex-direction: column;
      padding: 8px 12px;
      gap: 8px;
      position: sticky;
      top: 0;
      z-index: 100;
      background: var(--header-bg);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--border);
    }
    
    .mobile-header-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
    }
    
    .mobile-menu-toggle {
      display: block;
      background: none;
      border: none;
      color: var(--text);
      font-size: 1.2rem;
      padding: 8px;
      cursor: pointer;
    }
    
    /* Mobile search */
    .search-container {
      width: 100%;
      max-width: none;
      min-width: auto;
      order: 3;
    }
    
    .search-input {
      width: 100%;
      padding: 12px 16px;
      font-size: 1rem;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
    }
    
    /* Mobile symbol info */
    .symbol-main {
      text-align: center;
      margin: 0;
      padding: 8px 0;
    }
    
    .symbol-price-large {
      font-size: 1.6rem;
      font-weight: 600;
    }
    
    .symbol-stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
      gap: 8px;
      margin: 8px 0;
      text-align: center;
    }
    
    .symbol-stats > div {
      padding: 6px;
      background: var(--panel);
      border-radius: 6px;
    }
    
    .symbol-stats .label {
      font-size: 0.7rem;
      color: var(--text-muted);
      margin-bottom: 2px;
    }
    
    .symbol-stats .value {
      font-size: 0.8rem;
      font-weight: 600;
    }
    
    /* Mobile tabs */
    .tab-nav {
      display: flex;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
      padding: 0 4px;
      gap: 4px;
    }
    
    .tab-nav::-webkit-scrollbar {
      display: none;
    }
    
    .tab-button {
      padding: 12px 16px;
      white-space: nowrap;
      flex-shrink: 0;
      min-width: 80px;
      text-align: center;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 500;
    }
    
    /* Mobile chart */
    #ultimateChartArea {
      height: 55vh;
      margin: 8px;
      border-radius: 12px;
      touch-action: pan-x pan-y;
    }
    
    /* Mobile grids */
    .panel-grid,
    .grid-2 {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    
    .watchlist-grid {
      grid-template-columns: 1fr;
      gap: 8px;
    }
    
    /* Mobile cards */
    .watchlist-card,
    .watchlist-card-list {
      padding: 12px;
      border-radius: 12px;
      margin-bottom: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .watchlist-card:active,
    .watchlist-card-list:active {
      transform: scale(0.98);
    }
    
    /* Mobile bottom navigation */
    .mobile-bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: var(--header-bg);
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: space-around;
      padding: 8px 0;
      z-index: 1000;
      backdrop-filter: blur(10px);
    }
    
    .mobile-nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      padding: 8px 12px;
      color: var(--text-muted);
      text-decoration: none;
      border-radius: 8px;
      transition: all 0.2s ease;
      min-width: 60px;
    }
    
    .mobile-nav-item.active {
      color: var(--accent);
      background: var(--panel);
    }
    
    .mobile-nav-item i {
      font-size: 1.1rem;
    }
    
    .mobile-nav-item span {
      font-size: 0.7rem;
      font-weight: 500;
    }
    
    /* Hide desktop sidebar on mobile */
    aside.watchlist {
      display: none;
    }
    
    /* Adjust main content for bottom nav */
    .tab-content {
      padding-bottom: 80px;
      min-height: calc(100vh - 160px);
    }
    
    /* Mobile drawing tools */
    .financial-drawing-toolbox {
      width: 280px;
      max-width: calc(100vw - 20px);
      top: 80px;
      right: 10px;
    }
    
    .toolbox-content {
      max-height: 50vh;
    }
    
    .tool-btn {
      min-height: 40px;
      min-width: 40px;
    }
    
    /* Mobile menu overlay */
    .mobile-menu-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 2000;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
    }
    
    .mobile-menu-overlay.active {
      opacity: 1;
      visibility: visible;
    }
    
    .mobile-menu-content {
      position: absolute;
      top: 0;
      left: 0;
      width: 280px;
      height: 100%;
      background: var(--panel);
      padding: 20px;
      overflow-y: auto;
      transform: translateX(-100%);
      transition: transform 0.3s ease;
    }
    
    .mobile-menu-overlay.active .mobile-menu-content {
      transform: translateX(0);
    }
    
    .mobile-menu-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 1px solid var(--border);
    }
    
    .mobile-menu-header h5 {
      margin: 0;
      color: var(--text);
    }
    
    .mobile-menu-close {
      background: none;
      border: none;
      color: var(--text);
      font-size: 1.2rem;
      cursor: pointer;
      padding: 8px;
    }
    
    .mobile-menu-section {
      margin-bottom: 20px;
    }
    
    .mobile-menu-section h6 {
      color: var(--text-muted);
      font-size: 0.8rem;
      text-transform: uppercase;
      margin-bottom: 10px;
      font-weight: 600;
    }
    
    .mobile-timeframes,
    .mobile-tools {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
      gap: 8px;
    }
    
    .mobile-tools {
      grid-template-columns: 1fr;
    }
    
    .mobile-tools .btn {
      justify-content: flex-start;
      text-align: left;
      padding: 12px 16px;
    }
    
    /* Symbol info section */
    .symbol-info-section {
      padding: 16px;
      background: var(--panel);
      margin: 8px;
      border-radius: 12px;
      border: 1px solid var(--border);
    }
    
    /* Main container */
    .main-container {
      display: flex;
      flex-direction: column;
    }
    
    /* Desktop controls visibility */
    .desktop-controls {
      display: none;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
    }
    
    /* Touch-friendly sizing */
    .btn {
      min-height: 44px;
    }
    
    .watchlist-item {
      min-height: 48px;
    }
    
    .form-control {
      min-height: 44px;
    }
    
    /* Mobile menu overlay */
    .mobile-menu-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 2000;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
    }
    
    .mobile-menu-overlay.active {
      opacity: 1;
      visibility: visible;
    }
    
    .mobile-menu-content {
      position: absolute;
      top: 0;
      left: 0;
      width: 280px;
      height: 100%;
      background: var(--panel);
      padding: 20px;
      overflow-y: auto;
      transform: translateX(-100%);
      transition: transform 0.3s ease;
    }
    
    .mobile-menu-overlay.active .mobile-menu-content {
      transform: translateX(0);
    }
    
    .mobile-menu-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 1px solid var(--border);
    }
    
    .mobile-menu-header h5 {
      margin: 0;
      color: var(--text);
    }
    
    .mobile-menu-close {
      background: none;
      border: none;
      color: var(--text);
      font-size: 1.2rem;
      cursor: pointer;
      padding: 8px;
    }
    
    .mobile-menu-section {
      margin-bottom: 20px;
    }
    
    .mobile-menu-section h6 {
      color: var(--text-muted);
      font-size: 0.8rem;
      text-transform: uppercase;
      margin-bottom: 10px;
      font-weight: 600;
    }
    
    .mobile-timeframes,
    .mobile-tools {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
      gap: 8px;
    }
    
    .mobile-tools {
      grid-template-columns: 1fr;
    }
    
    .mobile-tools .btn {
      justify-content: flex-start;
      text-align: left;
      padding: 12px 16px;
    }
    
    /* Symbol info section */
    .symbol-info-section {
      padding: 16px;
      background: var(--panel);
      margin: 8px;
      border-radius: 12px;
      border: 1px solid var(--border);
    }
    
    /* Main container */
    .main-container {
      display: flex;
      flex-direction: column;
    }
    
    /* Desktop controls visibility */
    .desktop-controls {
      display: none;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
    }

    /* Tablet Breakpoint (768px+) */
    @media (min-width: 768px) {
      html {
        font-size: 15px;
      }
      
      .tv-header {
        flex-direction: row;
        padding: 12px 20px;
        align-items: center;
      }
      
      .mobile-header-row {
        display: contents;
      }
      
      .mobile-menu-toggle {
        display: none;
      }
      
      .desktop-controls {
        display: flex;
      }
      
      .search-container {
        width: auto;
        min-width: 300px;
        max-width: 400px;
        order: initial;
      }
      
      .symbol-main {
        text-align: left;
        margin-right: auto;
      }
      
      .symbol-price-large {
        font-size: 1.8rem;
      }
      
      .symbol-stats {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin: 0;
      }
      
      .symbol-stats > div {
        min-width: 100px;
        background: transparent;
        text-align: left;
      }
      
      #ultimateChartArea {
        height: 60vh;
        margin: 12px;
      }
      
      .grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
      }
      
      .watchlist-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 12px;
      }
      
      .mobile-bottom-nav {
        display: none;
      }
      
      .tab-content {
        padding-bottom: 0;
        min-height: calc(100vh - 120px);
      }
      
      .financial-drawing-toolbox {
        width: 320px;
        top: 100px;
        right: 20px;
      }
      
      .symbol-info-section {
        margin: 0;
        background: transparent;
        border: none;
        padding: 16px 0;
      }
    }
    
    /* Desktop Small (1024px+) */
    @media (min-width: 1024px) {
      html {
        font-size: 16px;
      }
      
      .tv-header {
        padding: 16px 24px;
      }
      
      .search-container {
        min-width: 350px;
        max-width: 500px;
      }
      
      .symbol-price-large {
        font-size: 2rem;
      }
      
      #ultimateChartArea {
        height: 65vh;
        margin: 16px;
      }
      
      aside.watchlist {
        display: block;
      }
      
      .panel-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
      }
      
      .tab-content {
        height: calc(100vh - 140px);
      }
      
      .financial-drawing-toolbox {
        width: 340px;
        right: 30px;
      }
    }
    
    /* Desktop Large (1200px+) */
    @media (min-width: 1200px) {
      .tv-header {
        padding: 16px 32px;
      }
      
      .search-container {
        min-width: 400px;
        max-width: 600px;
      }
      
      .symbol-stats {
        gap: 20px;
      }
      
      .symbol-stats > div {
        min-width: 120px;
      }
      
      #ultimateChartArea {
        height: 70vh;
        margin: 20px;
      }
      
      .panel-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 24px;
      }
      
      .watchlist-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 16px;
      }
      
      .financial-drawing-toolbox {
        width: 360px;
        right: 40px;
      }
    }
    
    /* Desktop XL (1400px+) */
    @media (min-width: 1400px) {
      .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
      }
      
      .tv-header {
        padding: 20px 40px;
      }
      
      .panel-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 28px;
      }
      
      .financial-drawing-toolbox {
        width: 380px;
      }
    }

    /* Research Links Styles */
    .research-links-container {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .research-category {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 20px;
    }

    .category-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--text-accent);
      margin: 0 0 16px 0;
    }

    .links-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 12px;
    }

    .research-link {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      background: var(--background);
      border: 1px solid var(--border);
      border-radius: 6px;
      text-decoration: none;
      color: var(--text);
      transition: all 0.2s ease;
    }

    .research-link:hover {
      background: var(--panel-hover);
      border-color: var(--primary);
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .link-icon {
      font-size: 1.5rem;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--panel);
      border-radius: 6px;
      flex-shrink: 0;
    }

    .link-info {
      flex-grow: 1;
    }

    .link-title {
      font-weight: 600;
      color: var(--text-accent);
      margin-bottom: 2px;
    }

    .link-desc {
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    .search-result-info {
      cursor: pointer;
      flex-grow: 1;
    }

    .search-result-info:hover {
      color: var(--text-accent);
    }

    /* News styling */
    .news-item {
      margin-bottom: 16px;
    }

    .news-item .border {
      border-color: var(--border) !important;
      background: var(--panel);
    }

    .news-item .border:hover {
      background: var(--panel-hover);
      border-color: var(--primary) !important;
    }

    .news-title a:hover {
      color: var(--primary) !important;
    }

    .news-thumbnail img {
      border: 1px solid var(--border);
    }

    .related-tickers .badge {
      background: var(--panel);
      border: 1px solid var(--border);
      color: var(--text);
    }

    .related-tickers .badge:hover {
      background: var(--primary);
      border-color: var(--primary);
      color: white;
    }

    .badge-outline {
      background: transparent;
      border: 1px solid var(--border);
    }

    /* Portfolio Off-canvas Styles */
    .offcanvas {
      position: fixed;
      top: 0;
      right: -100%;
      width: 500px;
      height: 100vh;
      background: var(--panel);
      border-left: 1px solid var(--border);
      z-index: 1050;
      transition: right 0.3s ease;
      overflow-y: auto;
    }

    .offcanvas.show {
      right: 0;
    }

    .offcanvas-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 1040;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
    }

    .offcanvas-backdrop.show {
      opacity: 1;
      visibility: visible;
    }

    .offcanvas-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
    }

    .offcanvas-title {
      font-size: 1.25rem;
      font-weight: 600;
      color: var(--text-accent);
      margin: 0;
    }

    .offcanvas-close {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 1.5rem;
      cursor: pointer;
      padding: 8px;
      border-radius: 4px;
      transition: all 0.2s ease;
    }

    .offcanvas-close:hover {
      background: var(--panel-hover);
      color: var(--text-accent);
    }

    .offcanvas-body {
      padding: 20px;
    }

    .portfolio-summary {
      background: var(--background);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 16px;
      margin-bottom: 20px;
    }

    .portfolio-tabs {
      display: flex;
      margin-bottom: 20px;
      border-bottom: 1px solid var(--border);
    }

    .portfolio-tab {
      padding: 12px 16px;
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: all 0.2s ease;
    }

    .portfolio-tab.active {
      color: var(--text-accent);
      border-bottom-color: var(--primary);
    }

    .portfolio-tab:hover {
      color: var(--text-accent);
      background: var(--panel-hover);
    }

    .trade-item {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 12px;
      margin-bottom: 12px;
      transition: all 0.2s ease;
    }

    .trade-item:hover {
      background: var(--panel-hover);
      border-color: var(--primary);
    }

    .trade-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }

    .trade-symbol {
      font-weight: 600;
      color: var(--text-accent);
    }

    .trade-type {
      padding: 2px 6px;
      border-radius: 3px;
      font-size: 0.75rem;
      font-weight: 500;
    }

    .trade-type.buy {
      background: var(--up);
      color: white;
    }

    .trade-type.sell {
      background: var(--down);
      color: white;
    }

    .trade-details {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      font-size: 0.85rem;
    }

    .trade-detail {
      text-align: center;
    }

    .trade-detail-label {
      color: var(--text-muted);
      font-size: 0.75rem;
    }

    .trade-detail-value {
      color: var(--text-accent);
      font-weight: 500;
    }

    .pl-positive {
      color: var(--up);
    }

    .pl-negative {
      color: var(--down);
    }

    .add-trade-form {
      background: var(--background);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 16px;
      margin-bottom: 20px;
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 12px;
    }

    .form-row.full-width {
      grid-template-columns: 1fr;
    }

    @media (max-width: 768px) {
      .offcanvas {
        width: 100%;
        right: -100%;
      }
      
      .form-row {
        grid-template-columns: 1fr;
      }
    }

    /* Loading Screen Styles */
    .wallet360-loader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, #0d1421 0%, #1e2329 100%);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      transition: opacity 0.5s ease, visibility 0.5s ease;
    }

    .wallet360-loader.hidden {
      opacity: 0;
      visibility: hidden;
    }

    .loader-logo {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 40px;
      animation: logoFloat 3s ease-in-out infinite;
    }

    .loader-logo i {
      font-size: 4rem;
      color: var(--primary);
      text-shadow: 0 0 20px var(--primary);
    }

    .loader-logo h1 {
      font-size: 2.5rem;
      font-weight: 700;
      color: var(--text-accent);
      margin: 0;
      text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }

    .loader-subtitle {
      color: var(--accent);
      font-size: 1.2rem;
      margin-bottom: 50px;
      opacity: 0.8;
    }

    .progress-container {
      width: 400px;
      max-width: 80vw;
      margin-bottom: 30px;
    }

    .progress-bar-custom {
      width: 100%;
      height: 6px;
      background: rgba(255,255,255,0.1);
      border-radius: 10px;
      overflow: hidden;
      position: relative;
    }

    .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--primary), var(--accent));
      border-radius: 10px;
      width: 0%;
      transition: width 0.3s ease;
      position: relative;
      box-shadow: 0 0 10px var(--primary);
    }

    .progress-fill::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
      animation: shimmer 2s infinite;
    }

    .loading-messages {
      text-align: center;
      min-height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .loading-message {
      color: var(--text-muted);
      font-size: 1rem;
      opacity: 0;
      animation: messageSlide 0.5s ease forwards;
    }

    .loader-stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 30px;
      margin-top: 40px;
      width: 100%;
      max-width: 600px;
    }

    .loader-stat {
      text-align: center;
      opacity: 0;
      animation: statFade 0.6s ease forwards;
    }

    .loader-stat:nth-child(1) { animation-delay: 1s; }
    .loader-stat:nth-child(2) { animation-delay: 1.2s; }
    .loader-stat:nth-child(3) { animation-delay: 1.4s; }

    .loader-stat-number {
      font-size: 1.8rem;
      font-weight: 700;
      color: var(--primary);
      margin-bottom: 5px;
    }

    .loader-stat-label {
      font-size: 0.9rem;
      color: var(--text-muted);
      opacity: 0.7;
    }

    .loading-dots {
      display: inline-block;
      animation: loadingDots 1.5s infinite;
    }

    /* Animations */
    @keyframes logoFloat {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-10px); }
    }

    @keyframes shimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    @keyframes messageSlide {
      from { 
        opacity: 0; 
        transform: translateY(20px); 
      }
      to { 
        opacity: 1; 
        transform: translateY(0); 
      }
    }

    @keyframes statFade {
      from { 
        opacity: 0; 
        transform: scale(0.8); 
      }
      to { 
        opacity: 1; 
        transform: scale(1); 
      }
    }

    @keyframes loadingDots {
      0%, 20% { content: ''; }
      40% { content: '.'; }
      60% { content: '..'; }
      80%, 100% { content: '...'; }
    }

    @media (max-width: 768px) {
      .loader-logo h1 {
        font-size: 2rem;
      }
      
      .loader-logo i {
        font-size: 3rem;
      }
      
      .progress-container {
        width: 320px;
      }
      
      .loader-stats {
        grid-template-columns: 1fr;
        gap: 20px;
      }
    }

    /* Drawing Settings Styles */
    .drawing-section {
      border-bottom: 1px solid var(--border);
      padding-bottom: 1rem;
    }

    .drawing-section:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }

    .drawing-tools-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
    }

    .drawing-tool-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      padding: 12px 8px;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      text-decoration: none;
      transition: all 0.2s ease;
      cursor: pointer;
      font-size: 0.8rem;
    }

    .drawing-tool-btn:hover {
      background: var(--panel-hover);
      border-color: var(--accent);
      color: var(--text);
      text-decoration: none;
    }

    .drawing-tool-btn.active {
      background: var(--accent);
      border-color: var(--accent);
      color: white;
    }

    .drawing-tool-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .drawing-tool-btn i {
      font-size: 1.2rem;
    }

    .drawing-controls {
      background: var(--panel);
      border-radius: 8px;
      padding: 1rem;
    }

    .form-control,
    .form-range,
    .form-control-color {
      background: var(--bg);
      border: 1px solid var(--border);
      color: var(--text);
    }

    .form-control:focus,
    .form-range:focus,
    .form-control-color:focus {
      background: var(--bg);
      border-color: var(--accent);
      color: var(--text);
      box-shadow: 0 0 0 0.2rem rgba(41, 98, 255, 0.25);
    }

    .form-check-input:checked {
      background-color: var(--accent);
      border-color: var(--accent);
    }

    .form-check-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 0.2rem rgba(41, 98, 255, 0.25);
    }

    .form-label {
      color: var(--text);
      font-weight: 500;
      margin-bottom: 0.5rem;
    }

    .offcanvas {
      background: var(--panel);
      border-left: 1px solid var(--border);
      width: 320px !important;
    }

    .offcanvas-header {
      background: var(--header-bg);
      border-bottom: 1px solid var(--border);
      color: var(--text);
    }

    .offcanvas-title {
      color: var(--text);
      font-weight: 600;
    }

    .btn-close {
      filter: invert(1);
      opacity: 0.8;
    }

    .btn-close:hover {
      opacity: 1;
    }

    /* Dark theme adjustments for form controls */
    .form-control-color {
      width: 3rem;
      height: 2.5rem;
      border-radius: 0.375rem;
    }

    .form-range {
      background: transparent;
    }

    .form-range::-webkit-slider-track {
      background: var(--border);
      border-radius: 0.5rem;
      height: 0.5rem;
    }

    .form-range::-webkit-slider-thumb {
      background: var(--accent);
      border: none;
      border-radius: 50%;
      height: 1.2rem;
      width: 1.2rem;
    }

    .form-range::-moz-range-track {
      background: var(--border);
      border-radius: 0.5rem;
      height: 0.5rem;
      border: none;
    }

    .form-range::-moz-range-thumb {
      background: var(--accent);
      border: none;
      border-radius: 50%;
      height: 1.2rem;
      width: 1.2rem;
    }

    /* Drawing button in toolbar */
    #btnDrawingSettings.active {
      background: var(--accent);
      color: white;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
      .offcanvas {
        width: 100% !important;
      }
      
      .drawing-tools-grid {
        grid-template-columns: repeat(3, 1fr);
      }
      
      /* Hide desktop watchlist on mobile */
      aside.watchlist {
        display: none;
      }
      
      /* Mobile layout adjustments */
      .layout {
        min-height: calc(100vh - 120px); /* Adjust for mobile header */
      }
      
      /* Mobile watchlist off-canvas specific styles */
      .offcanvas-start {
        left: -100%;
        right: auto;
        width: 320px !important;
      }
      
      .offcanvas-start.show {
        left: 0;
      }
      
      /* Mobile watchlist content */
      #mobileWatchlistContainer .watchlist-card,
      #mobileWatchlistContainer .watchlist-card-list {
        margin-bottom: 8px;
      }
      
      /* View toggle buttons in mobile */
      .view-toggle {
        display: flex;
        background: var(--panel-hover);
        border-radius: 6px;
        overflow: hidden;
      }
      
      .view-toggle button {
        background: none;
        border: none;
        color: var(--text-muted);
        padding: 8px 12px;
        cursor: pointer;
        transition: all 0.2s ease;
      }
      
      .view-toggle button.active {
        background: var(--accent);
        color: white;
      }
      
      .view-toggle button:hover:not(.active) {
        background: var(--panel);
        color: var(--text);
      }
    }