@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&family=Press+Start+2P&display=swap');
      @font-palette-values --brand-colors {
        font-family: "Nabla";
        base-palette: 0; 
        override-colors:
            /* Nabla's specific layer map: */
            6 #ff0055, /* Index 6 is the Front Face */
            7 #e9f10d, /* Index 7 is the 3D Side/Extrusion */
            1 #ffffff, /* Index 1 is the Highlight Edge */
            2 #e9f10d; /* Index 2 is the Inner Shadow */
        }
  :root {
            /* Light mode (default) */
            --primary: #0077FF;
            --primary-dark: #0057cc;
            --primary-light: #e6f0ff;
            --secondary: #6c757d;
            --background: #f5f9ff;
            --card-bg: #000;
            --text-main: #fff;
            --text-secondary: #4b5563;
            --border-color: #e5e7eb;
            --chart-grid: #f3f4f6;
            --success: #10b981;
            --info: #0ea5e9;
            --warning: #fbbf24;
            --danger: #ef4444;
            --gray-100: #f3f4f6;
            --gray-200: #e5e7eb;
            --gray-300: #d1d5db;
            --gray-600: #4b5563;
            --gray-800: #1f2937;
            --header-bg: linear-gradient(135deg, #0077FF, #00aaff);
            --radius: 12px;
            --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
            --gradient: linear-gradient(135deg, #0077FF, #00aaff);
            
            /* Bullish/Bearish Colors */
            --bullish-bg: rgba(16, 185, 129, 0.15);
            --bullish-color: #10b981;
            --bullish-border: rgba(16, 185, 129, 0.3);
            
            --bearish-bg: rgba(239, 68, 68, 0.15);
            --bearish-color: #ef4444;
            --bearish-border: rgba(239, 68, 68, 0.3);
            
            --neutral-bg: rgba(107, 114, 128, 0.15);
            --neutral-color: #6b7280;
            --neutral-border: rgba(107, 114, 128, 0.3);
        }

        [data-theme="dark"] {
            --primary: #3b82f6;
            --primary-dark: #2563eb;
            --primary-light: rgba(59, 130, 246, 0.15);
            --secondary: #9ca3af;
            --background: #111827;
            --card-bg: #1f2937;
            --text-main: #f9fafb;
            --text-secondary: #d1d5db;
            --border-color: #374151;
            --chart-grid: #1f2937;
            --gray-100: #1f2937;
            --gray-200: #374151;
            --gray-300: #4b5563;
            --gray-600: #9ca3af;
            --gray-800: #f3f4f6;
            --header-bg: linear-gradient(135deg, #1f2937, #111827);
            --shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
            --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
            
            /* Bullish/Bearish Colors in Dark Mode */
            --bullish-bg: rgba(16, 185, 129, 0.2);
            --bullish-color: #34d399;
            --bullish-border: rgba(16, 185, 129, 0.4);
            
            --bearish-bg: rgba(239, 68, 68, 0.2);
            --bearish-color: #f87171;
            --bearish-border: rgba(239, 68, 68, 0.4);
            
            --neutral-bg: rgba(156, 163, 175, 0.2);
            --neutral-color: #d1d5db;
            --neutral-border: rgba(156, 163, 175, 0.4);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
           /* font-family: 'Orbitron', sans-serif; */
           font-family: monospace;
        }


        body {
            background-color: deepskyblue;
            color: var(--text-main);
            line-height: 1.6;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem;
        }

        header {
            text-align: center;
            margin-bottom: 2rem;
        }

        h1 {
            color: var(--text-main);
            margin-bottom: 0.5rem;
            font-weight: 800;
            font-size: 2rem;
        }

        .subtitle {
            color: var(--text-secondary);
            font-size: 1.1rem;
            max-width: 600px;
            margin: 0 auto;
        }

        /* Site Header */
        .site-header {
            background: var(--header-bg);
            color: white;
            padding: 1rem 0;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 100;
            transition: background 0.3s ease;
        }

        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .theme-toggle {
            background: transparent;
            border: none;
            color: white;
            cursor: pointer;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            transition: background-color 0.2s ease;
        }

        .theme-toggle:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        .history-toggle {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            cursor: pointer;
            padding: 0.5rem 0.8rem;
            border-radius: 20px;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 0.3rem;
            transition: background-color 0.2s ease;
        }

        .history-toggle:hover {
            background-color: rgba(255, 255, 255, 0.3);
        }
        
        .logo {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .logo-icon {
            font-size: 1.8rem;
            color: white;
        }

        .logo-text {
        font-family: "Nabla", system-ui;
        color: #ff0055;
        font-palette: --brand-colors; /* This links to the rule above */
        font-optical-sizing: auto;
        font-weight: 400;
        font-style: normal;
        font-size: 4em;
        letter-spacing: -0.5px;
        
        font-variation-settings: "EDPT" 95, "EHLT" 18;
        transition: font-variation-settings 0.3s ease-in-out;
        cursor: pointer;
        }

        /* COOl hover state ! */
        .logo-text:hover {
        font-variation-settings: "EDPT" 170, "EHLT" 28;
        }

        @media (max-width: 768px) {
        .logo-text {
        font-family: "Orbitron", sans-serif;
        font-weight: 800;
        font-size: 2.2rem;
        letter-spacing: 0.18em;
        color: #05070f;
        font-palette: normal;
        font-variation-settings: normal;
        text-transform: uppercase;
        text-shadow:
            1px 1px 0 #00e5ff,
            2px 2px 0 #00e5ff,
            3px 3px 0 #ff4d6d,
            4px 4px 0 #ff4d6d,
            5px 5px 0 #ffffff;
        }

        .logo-text:hover {
        font-variation-settings: normal;
        }
        }
/*
        .logo-text {
          font-family: "Orbitron", sans-serif;
          font-optical-sizing: auto;
          font-weight: 400;
          font-style: normal;
        }
*/
.lexendGiga {
  font-family: "Lexend Giga", sans-serif;
  font-optical-sizing: auto;
  font-weight: 200;
  font-style: normal;
}

        @media (min-width: 797px){
            #disclaimer {
                width: 75%;
                margin-left: 10%;
            }
        }

        #disclaimer p {
          text-align: justify; 
      }

        #disclaimer p, #disclaimer h3 {margin-top: 10px;}

        #disclaimer p, #disclaimer h3, span.stips {
            font-family: monospace !important;
        }

        #disclaimer h3 {font-size: 15px;}

        #disclaimer p, span.stips {
            font-size: 9px;
        }

        .header-tagline {
            font-size: 0.85rem;
            font-weight: 500;
            opacity: 0.9;
            color: white;
        }

        /* Modern Cards */
        .card {
            background-color: transparent;
            border-radius: var(--radius);
            padding: 1.5rem;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            border: 1px solid var(--border-color);
        }

        .card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow);
        }

        /* Upload Container */
        .upload-container {
            text-align: center;
        }

        .upload-area {
            border: 2px dashed var(--border-color);
            border-radius: var(--radius);
            padding: 1.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 1rem;
            position: relative;
            height: 335px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            background-color: var(--card-bg);
        }

        .upload-default-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            transition: opacity 0.3s ease;
        }

        .upload-preview {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: none;
            align-items: center;
            justify-content: center;
            background-color: var(--card-bg);
        }

        .upload-preview.show {
            display: flex;
        }

        .close-preview {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 30px;
            height: 30px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 12px;
            z-index: 10;
            transition: all 0.2s ease;
        }

        .close-preview:hover {
            background-color: rgba(0, 0, 0, 0.8);
            transform: scale(1.1);
        }

        .upload-area:hover {
            border-color: var(--primary);
            background-color: rgba(var(--primary), 0.05);
        }

        .upload-area.active {
            border-color: var(--primary);
            background-color: rgba(var(--primary), 0.1);
        }

        .upload-icon {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='64' height='64'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zm9-10v7h-2V9H6l6-6 6 6h-5z' fill='%230077FF'/%3E%3C/svg%3E");
            width: 64px;
            height: 64px;
            margin-bottom: 1rem;
            display: block;
            transition: filter 0.3s ease;
        }

        [data-theme="dark"] .upload-icon {
            filter: brightness(0) invert(1);
        }

        .upload-text {
            margin-bottom: .7rem;
            color: deepskyblue;
            font-size: 1rem;
        }

        /* Results Container */
        .results-container {
            height: 100%;
            display: none;
        }

        .results-container.show {
            display: block;
        }

        .results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 0.75rem;
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .results-actions {
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        .result-title {
            color: var(--text-main);
            font-weight: 700;
            font-size: 1.4rem;
            margin: 0;
        }

        #resultsList {
            display: grid;
            gap: 1rem;
        }

        #resultsList .food-header {
            position: relative;
            display: grid;
            grid-template-columns: minmax(120px, 180px) 1fr;
            gap: 1.25rem;
            align-items: stretch;
            padding: 1rem;
            border: 1px solid rgba(0, 170, 255, 0.32);
            border-radius: 22px;
            background:
                radial-gradient(circle at 12% 8%, rgba(0, 170, 255, 0.28), transparent 34%),
                linear-gradient(135deg, rgba(0, 119, 255, 0.18), rgba(0, 0, 0, 0.94) 58%);
            box-shadow: 0 22px 45px rgba(0, 0, 0, 0.24);
            overflow: hidden;
        }

        #resultsList .food-header::after {
            content: "AI READOUT";
            position: absolute;
            right: 1rem;
            top: 0.8rem;
            color: rgba(255, 255, 255, 0.26);
            font-family: 'Press Start 2P', monospace;
            font-size: 0.55rem;
            letter-spacing: 0.08em;
        }

        #resultsList .food-image-container {
            min-height: 155px;
            border-radius: 18px;
            overflow: hidden;
            border: 2px solid rgba(255, 255, 255, 0.24);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 16px 28px rgba(0, 0, 0, 0.28);
            background: #07111f;
        }

        #resultsList .food-result-image {
            width: 100%;
            height: 100%;
            min-height: 155px;
            object-fit: cover;
            display: block;
        }

        #resultsList .food-info {
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 0.7rem;
            padding: 0.75rem 0.25rem;
        }

        #resultsList .food-name {
            color: #ffffff;
            font-family: 'Orbitron', monospace;
            font-size: clamp(1.45rem, 4vw, 2.55rem);
            line-height: 1;
            letter-spacing: 0.02em;
            margin: 0;
            text-shadow: 0 0 18px rgba(0, 170, 255, 0.45);
        }

        #resultsList .food-description {
            color: #b9ecff;
            font-size: 1rem;
            max-width: 56ch;
            margin: 0;
        }

        #resultsList .macro-chart {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.75rem;
        }

        #resultsList .macro-item {
            position: relative;
            min-height: 112px;
            padding: 1rem 0.75rem;
            border-radius: 18px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
                #07111f;
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
            overflow: hidden;
        }

        #resultsList .macro-item::before {
            content: "";
            position: absolute;
            inset: 0 auto 0 0;
            width: 5px;
            background: linear-gradient(180deg, #00e5ff, #0077ff);
        }

        #resultsList .macro-value {
            color: #ffffff;
            font-family: 'Orbitron', monospace;
            font-size: clamp(1.55rem, 4vw, 2.25rem);
            font-weight: 800;
            line-height: 1;
            margin-bottom: 0.55rem;
        }

        #resultsList .macro-label {
            color: #8adfff;
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        #resultsList .nutrition-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            overflow: hidden;
            border: 1px solid rgba(0, 170, 255, 0.24);
            border-radius: 18px;
            background: #07111f;
            box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
        }

        #resultsList .nutrition-table th {
            padding: 0.95rem 1rem;
            color: #00111f;
            background: linear-gradient(135deg, #e9f10d, #00e5ff);
            font-family: 'Orbitron', monospace;
            font-size: 0.82rem;
            letter-spacing: 0.08em;
            text-align: left;
            text-transform: uppercase;
        }

        #resultsList .nutrition-table th:last-child,
        #resultsList .nutrition-table td:last-child {
            text-align: right;
        }

        #resultsList .nutrition-table td {
            padding: 0.85rem 1rem;
            color: #f7fbff;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            font-size: 0.96rem;
        }

        #resultsList .nutrition-table tr:nth-child(even) td {
            background: rgba(255, 255, 255, 0.035);
        }

        #resultsList .nutrition-table tr:last-child td {
            border-bottom: 0;
        }

        #resultsList .health-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.55rem;
        }

        #resultsList .health-tag {
            display: inline-flex;
            align-items: center;
            min-height: 34px;
            padding: 0.45rem 0.75rem;
            border: 1px solid rgba(233, 241, 13, 0.35);
            border-radius: 999px;
            color: #f8ff91;
            background: rgba(233, 241, 13, 0.12);
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        #resultsList .recipe-section,
        #resultsList .additional-info {
            padding: 1.1rem;
            border-radius: 18px;
            border: 1px solid rgba(0, 170, 255, 0.26);
            background:
                linear-gradient(135deg, rgba(0, 119, 255, 0.14), rgba(0, 229, 255, 0.06)),
                #07111f;
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
        }

        #resultsList .recipe-title {
            color: #ffffff;
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            letter-spacing: 0.08em;
            margin: 0 0 0.65rem;
            text-transform: uppercase;
        }

        #resultsList .recipe-text,
        #resultsList .additional-info {
            color: #d6f5ff;
            font-size: 0.95rem;
            line-height: 1.75;
        }

        #resultsList .additional-info {
            margin: 0;
        }

        #resultsList .additional-info strong {
            color: #e9f10d;
            font-family: 'Orbitron', monospace;
            letter-spacing: 0.04em;
        }

        /* Chart header with image */
        .chart-header {
            display: flex;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
            align-items: center;
        }

        .chart-image-container {
            width: 130px;
            height: 130px;
            border-radius: var(--radius);
            overflow: hidden;
            flex-shrink: 0;
            border: 2px solid var(--primary-light);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .chart-result-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .chart-info {
            flex: 1;
        }

        .asset-name {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: var(--text-main);
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .asset-description {
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-bottom: 0.5rem;
            font-family: monospace;
        }

        /* Indicator Tags */
        .market-indicator {
            display: inline-block;
            padding: 0.25rem 0.6rem;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .bullish {
            background-color: var(--bullish-bg);
            color: var(--bullish-color);
            border: 1px solid var(--bullish-border);
        }

        .bearish {
            background-color: var(--bearish-bg);
            color: var(--bearish-color);
            border: 1px solid var(--bearish-border);
        }

        .neutral {
            background-color: var(--neutral-bg);
            color: var(--neutral-color);
            border: 1px solid var(--neutral-border);
        }

        /* Analysis Overview */
        .analysis-box {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 1rem;
            margin-bottom: 1rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            border-left: 3px solid var(--primary);
            border-top: 1px solid var(--border-color);
            border-right: 1px solid var(--border-color);
            border-bottom: 1px solid var(--border-color);
        }

        .analysis-box p {font-family: monospace;
        }


        .analysis-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }

        .analysis-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-main);
            margin: 0;
        }

        .price-tag {
            font-weight: 700;
            color: var(--primary);
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }

        .trend-arrow {
            font-size: 0.9rem;
        }

        .trend-up {
            color: var(--success);
        }

        .trend-down {
            color: var(--danger);
        }

        /* Analytics Grid */
        .analytics-grid {
            display: grid;
            grid-template-columns: repeat(1, 1fr);
            gap: 0.75rem;
            margin: 1rem 0;
        }

        @media (min-width: 768px) {
            .analytics-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        .analytics-item {
            background: var(--card-bg);
            padding: 0.75rem;
            border-radius: var(--radius);
            border: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 0.75rem;
            transition: all 0.2s ease;
        }

        .analytics-item:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
        }

        .analytics-icon {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: var(--primary);
        }

        .analytics-content {
            flex: 1;
        }

        .analytics-value {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-main);
            line-height: 1.2;
        }

        .analytics-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-top: 0.2rem;
        }

        /* Table Styling */
        .levels-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            border-radius: var(--radius);
            overflow: hidden;
        }

        .levels-table th {
            background-color: var(--primary);
            color: white;
            text-align: left;
            padding: 0.75rem 1rem;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .levels-table td {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid var(--border-color);
            font-size: 0.9rem;
            color: var(--text-main);
            background-color: var(--card-bg);
        }

        .levels-table tr:last-child td {
            border-bottom: none;
        }

        /* Buttons */
        .btn {
            background: var(--gradient);
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 30px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            box-shadow: 0 4px 10px rgba(0, 119, 255, 0.2);
            position: relative;
        }

        .btn-icon {
            font-style: normal;
            font-size: 1.1rem;
        }

        .btn-download {
            background: linear-gradient(135deg, #4CAF50, #8BC34A);
            box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);
        }

        .btn-download:hover {
            background: linear-gradient(135deg, #388E3C, #689F38);
            box-shadow: 0 6px 15px rgba(76, 175, 80, 0.3);
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(0, 119, 255, 0.3);
        }

        .btn:disabled {
            background: linear-gradient(135deg, #9E9E9E, #BDBDBD);
            cursor: not-allowed;
            transform: none;
            box-shadow: 0 4px 10px rgba(158, 158, 158, 0.2);
        }

        .analyze-btn {
            min-width: 160px;
        }

        .btn-loader {
            display: none;
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top: 2px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            position: absolute;
            right: 15px;
            margin-left: 10px;
        }

        .btn-loader.show {
            display: block;
        }

        .btn-loader.show ~ span {
            margin-right: 20px;
        }

        .upload-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
        }

        .button-group {
            display: flex;
            gap: 1rem;
            justify-content: center;
            margin-top: 1rem;
        }

        .image-preview {
            max-width: 90%;
            max-height: 90%;
            border-radius: var(--radius);
            object-fit: contain;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        /* Trading Strategy Section */
        .strategy-section {
            margin: 1.5rem 0;
            padding: 1rem;
            background: var(--card-bg);
            border-radius: var(--radius);
            border-left: 4px solid var(--primary);
            border-top: 1px solid var(--border-color);
            border-right: 1px solid var(--border-color);
            border-bottom: 1px solid var(--border-color);
        }

        .strategy-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 0.75rem;
        }

        .strategy-text {
            font-size: 0.95rem;
            line-height: 1.5;
            color: var(--text-secondary);
        }

        /* History Panel */
        .history-panel {
            position: fixed;
            top: 0;
            right: -320px;
            width: 320px;
            height: 100%;
            background: var(--card-bg);
            box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            transition: right 0.3s ease;
            overflow-y: auto;
            border-left: 1px solid var(--border-color);
            scrollbar-width: none; /* For Firefox */
            -ms-overflow-style: none; /* For Internet Explorer and Edge */
        }
        
        /* Hide scrollbar for Chrome, Safari and Opera */
        .history-panel::-webkit-scrollbar {
            display: none;
        }

        .history-panel.active {
            right: 0;
        }

        .history-header {
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            background-color: var(--card-bg);
            z-index: 5;
        }

        .history-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-main);
        }

        .close-history {
            background: transparent;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            width: 30px;
            height: 30px;
            border-radius: 50%;
        }

        .close-history:hover {
            background-color: var(--border-color);
        }

        .history-list {
            padding: 1rem;
            scrollbar-width: none;
            overflow-y: auto;
            max-height: calc(100vh - 130px); /* Allow scrolling within the list, adjusted for header + buttons */
        }

        .history-item {
            padding: 0.75rem;
            border-radius: var(--radius);
            border: 1px solid var(--border-color);
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .history-item:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: var(--card-shadow);
        }

        .history-asset-name {
            font-weight: 600;
            font-size: 0.95rem;
            color: var(--text-main);
            margin-bottom: 0.3rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .history-date {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }

        .history-thumbnail {
            width: 100%;
            height: 100px;
            object-fit: cover;
            border-radius: 6px;
            margin-top: 0.5rem;
        }

        .clear-history {
            width: 100%;
            background-color: var(--chart-grid);
            border: 1px solid var(--border-color);
            color: var(--text-main);
            padding: 0.75rem;
            border-radius: var(--radius);
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.2s ease;
            font-weight: 500;
        }

        .clear-history:hover {
            background-color: var(--bearish-bg);
            color: var(--bearish-color);
        }

        /* Responsive Adjustments */
        @media (max-width: 768px) {
            .header-tagline {
                display: none;
            }
            
            .chart-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .chart-image-container {
                width: 100%;
                height: 200px;
            }
            
            .analytics-item {
                padding: 0.5rem;
            }
            
            .analytics-icon {
                font-size: 1rem;
            }
            
            .analytics-value {
                font-size: 0.85rem;
            }
            
            .analytics-label {
                font-size: 0.7rem;
            }

            .history-panel {
                width: 300px;
            }
        }

        .main-content {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }

        @media (min-width: 768px) {
            .main-content {
                grid-template-columns: 1fr;
                margin: 0 auto;
            }
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .error-message {
            color: var(--danger);
            margin-top: 1rem;
            display: none;
            padding: 0.75rem;
            background-color: rgba(239, 68, 68, 0.1);
            border-radius: var(--radius);
            font-weight: 500;
        }

        input[type="file"] {
            display: none;
        }

        footer {
            text-align: center;
            margin-top: 3rem;
            color: var(--text-secondary);
            padding: 1.5rem 0;
            border-top: 1px solid var(--border-color);
        }

        /* Dark Mode Transition */
        *, *::before, *::after {
            transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        }

        /* Loader Animation */
        .loader {
            display: none;
            width: 40px;
            height: 40px;
            border: 4px solid var(--primary-light);
            border-top: 4px solid var(--primary);
            border-radius: 50%;
            margin: 2rem auto;
            animation: spin 1s linear infinite;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .header-tagline {
                display: none;
            }

            #resultsList .food-header {
                grid-template-columns: 1fr;
            }

            #resultsList .food-header::after {
                top: 1rem;
            }

            #resultsList .food-info {
                padding: 0.25rem 0;
            }

            #resultsList .macro-chart {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .chart-header {
                flex-direction: column;
            }
            
            .chart-image-container {
                width: 100%;
                height: 180px;
                margin-bottom: 1rem;
            }
            
            .analytics-grid {
                grid-template-columns: repeat(1, 1fr);
            }
            
            .results-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .results-actions {
                width: 100%;
                justify-content: space-between;
                margin-top: 1rem;
            }
            
            .btn {
                padding: 0.7rem 1.2rem;
                font-size: 0.85rem;
            }
            
            .history-panel {
                width: 280px;
                right: -280px;
            }
        }
        
        @media (max-width: 480px) {
            #resultsList .macro-chart {
                grid-template-columns: 1fr;
            }

            #resultsList .nutrition-table th,
            #resultsList .nutrition-table td {
                padding: 0.75rem;
            }

            .upload-buttons {
                flex-direction: column;
                gap: 0.5rem;
            }
            
            .btn {
                width: 100%;
            }
            
            .result-title {
                font-size: 1.2rem;
            }
            
            .asset-name {
                font-size: 1.1rem;
            }
            
            .analytics-grid {
                grid-template-columns: 1fr;
            }
            
            .levels-table th,
            .levels-table td {
                padding: 0.5rem;
                font-size: 0.85rem;
            }
        }

        /* Additional JS transition helpers */
        .fade-in {
            animation: fadeIn 0.3s ease forwards;
        }

        .fade-out {
            animation: fadeOut 0.3s ease forwards;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes fadeOut {
            from { opacity: 1; }
            to { opacity: 0; }
        }

        /* Features Section */
        .features-section {
            margin: 4rem 0;
        }

        .features-title {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 2rem;
            text-align: center;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1.5rem;
        }

        .feature-card {
            background-color: var(--card-bg);
            padding: 1.5rem;
            border-radius: var(--radius);
            box-shadow: var(--card-shadow);
            border: 1px solid var(--border-color);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            text-align: center;
        }

        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow);
        }

        .feature-icon {
            margin-bottom: 1rem;
            color: var(--primary);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)), var(--primary-light);
            width: 60px;
            height: 60px;
            border-radius: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            border: 1px solid rgba(0, 119, 255, 0.18);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
        }

        .feature-icon svg {
            width: 28px;
            height: 28px;
            stroke-width: 2.1;
        }

        .feature-title {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--text-main);
        }

        .feature-desc {
            color: deepskyblue;
            font-size: 0.95rem;
            line-height: 1.5;
            font-family: monospace;
        }

        /* How it works section */
        .how-it-works {
            margin: 4rem 0;
        }

        .how-title {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 2rem;
            text-align: center;
        }

        .steps {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }

        @media (min-width: 768px) {
            .steps {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        .step {
            position: relative;
            padding: 1.5rem;
            background-color: var(--card-bg);
            border-radius: var(--radius);
            box-shadow: var(--card-shadow);
            border: 1px solid var(--border-color);
            transition: transform 0.3s ease;
            text-align: center;
        }

        .step:hover {
            transform: translateY(-5px);
        }

        .step-number {
            position: absolute;
            top: -15px;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--primary);
            color: white;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
        }

        .step-title {
            margin: 0.5rem 0 1rem;
            font-weight: 600;
            color: var(--text-main);
            font-size: 1.1rem;
        }

        .step-desc {
            color: deepskyblue;
            font-size: 0.95rem;
            line-height: 1.5;
            font-family: monospace;
        }

        /* FAQ Section */
        .faq-section {
            margin: 4rem 0;
        }

        .faq-title {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 2rem;
            text-align: center;
        }

        .faq-list {
            display: grid;
            gap: 1rem;
        }

        .faq-item {
            background-color: var(--card-bg);
            border-radius: var(--radius);
            padding: 1.5rem;
            box-shadow: var(--card-shadow);
            border: 1px solid var(--border-color);
            transition: transform 0.3s ease;
        }

        .faq-item:hover {
            transform: translateY(-3px);
        }

        .faq-question {
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 0.75rem;
            font-size: 1.1rem;
        }

        .faq-answer {
            color: deepskyblue;
            font-size: 0.95rem;
            line-height: 1.5;
        }

        /* Consistent spacing between all sections */
        .features-section,
        .how-it-works,
        .faq-section {
            padding: 2rem 1rem;
            max-width: 1200px;
            margin-left: auto;
            margin-right: auto;
        }
        
        @media (max-width: 768px) {
            .features-title,
            .how-title,
            .faq-title {
                font-size: 1.5rem;
                margin-bottom: 1.5rem;
            }
            
            .feature-card,
            .step,
            .faq-item {
                padding: 1.25rem;
            }
            
            .feature-icon {
                width: 50px;
                height: 50px;
                border-radius: 16px;
            }

            .feature-icon svg {
                width: 24px;
                height: 24px;
            }
            
            .features-section,
            .how-it-works,
            .faq-section {
                margin: 3rem 0;
                padding: 1.5rem 1rem;
            }
        }
        
        #longAd img {width: 100%;}

        @media (min-width: 769px){
            #longAd img {
                width: 50%;
                margin-left: 25%;
            }
        }

.food-image-container img { width: 100%;}
