:root {
    --green-dark: #6a8a15;
    --green: #8ca11a;
    --green-light: #a8bb3e;
    --green-soft: #f5f8e8;
    --accent-gold: #e5ba73;
    --accent-blue: #a2c3d7;
    --accent-blue-light: #d4e5f0;
    --bg: #fafbf5;
    --white: #ffffff;
    --text: #2c3e1a;
    --text-light: #6b7a5a;
    --error: #e53935;
    --success: #4caf50;
    --shadow: 0 4px 12px rgba(140, 161, 26, 0.08);
    --shadow-md: 0 6px 20px rgba(140, 161, 26, 0.12);
    --shadow-lg: 0 10px 30px rgba(140, 161, 26, 0.15);
    --radius: 20px;
    --radius-sm: 14px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: linear-gradient(-45deg, #f5f8e8, #d4e5f0, #fef8ec, #e8f4e8);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: gradientBG 15s ease infinite;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes gradientBG {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* HEADER - Enhanced Professional Design */
.header {
    background: linear-gradient(135deg, #7fa840 0%, #6c892e 50%, #5a7525 100%);
    padding: 0.8rem 1.2rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(106, 138, 21, 0.2);
}

.header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(229, 186, 115, 0.15) 0%, transparent 50%);
    animation: headerShimmer 15s ease-in-out infinite;
}

@keyframes headerShimmer {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(10%, 10%);
    }
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    position: relative;
    z-index: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.logo-img {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.2));
    transition: var(--transition);
    animation: logoFloat 4s ease-in-out infinite;
}

.logo-img:hover {
    transform: scale(1.05);
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.brand-name {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.98);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.5px;
}

.header-left {
    margin-left: 0 !important;
}

.logo-img {
    margin-left: 0 !important;
}

.brand-ai {
    color: var(--accent-gold);
    font-weight: 900;
}

.brand-slogan {
    font-size: 1.05rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    letter-spacing: 0.3px;
    line-height: 1;
}

/* Dark mode adjustments */
.dark .brand-name {
    color: var(--text);
}

.dark .brand-slogan {
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .header-left {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .logo-img {
        width: 90px;
    }

    .brand-name {
        font-size: 1.5rem;
    }

    .brand-slogan {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 1.3rem;
    }

    .brand-slogan {
        font-size: 0.8rem;
    }
}

.app-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
    line-height: 1.4;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Theme Toggle - Enhanced */
.theme-toggle {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    flex: 1;
}

/* HERO SECTION - Enhanced */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3.5rem 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 245, 233, 0.85) 100%);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
    border: 1px solid rgba(140, 161, 26, 0.12);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-gold), var(--green), var(--accent-blue), var(--green), var(--accent-gold));
    background-size: 200% 100%;
    animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

.hero-section::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(140, 161, 26, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    background: linear-gradient(135deg, #6a8a15 0%, #8ca11a 40%, #a8bb3e 80%, #8ca11a 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.3rem;
    font-weight: 900;
    letter-spacing: -1.2px;
    line-height: 1.2;
    animation: textShine 8s ease-in-out infinite;
}

@keyframes textShine {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.hero-text {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--text-light);
    max-width: 720px;
    margin: 0 auto;
    font-weight: 500;
    line-height: 1.8;
}

/* CONTENT GRID */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

/* CARDS - Premium Design */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border: 1px solid rgba(140, 161, 26, 0.08);
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-gold), var(--green), var(--accent-blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.card::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -120px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(162, 195, 215, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover::after {
    right: -80px;
    opacity: 0.6;
}

.card-header {
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.75rem;
    color: var(--green-dark);
    margin-bottom: 0.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.card-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 28px;
    background: linear-gradient(180deg, var(--accent-gold), var(--green));
    border-radius: 3px;
}

.card-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
    font-weight: 500;
    padding-left: 1.2rem;
}

/* UPLOAD ZONE - Professional Interactive */
.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2.5rem;
    border: 3px dashed var(--green);
    border-radius: var(--radius);
    background: linear-gradient(145deg, #f5f8e8 0%, #fef8ec 50%, #f5f8e8 100%);
    cursor: pointer;
    transition: var(--transition);
    color: var(--green-dark);
    text-align: center;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220%;
    height: 220%;
    background: radial-gradient(circle, rgba(140, 161, 26, 0.15) 0%, transparent 65%);
    opacity: 0;
    transition: var(--transition);
}

.upload-zone::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 2px dashed rgba(140, 161, 26, 0.25);
    border-radius: calc(var(--radius) - 6px);
    pointer-events: none;
    transition: var(--transition);
}

.upload-zone:hover {
    border-color: var(--green-dark);
    background: linear-gradient(145deg, #eef3d5 0%, #f5eddc 50%, #eef3d5 100%);
    transform: scale(1.02);
    box-shadow: inset 0 0 40px rgba(140, 161, 26, 0.15);
}

.upload-zone:hover::before {
    opacity: 1;
}

.upload-zone:hover::after {
    border-color: var(--green);
}

.upload-zone svg {
    margin-bottom: 1.8rem;
    color: var(--green);
    transition: var(--transition);
}

.upload-zone:hover svg {
    transform: scale(1.25) translateY(-8px);
    filter: drop-shadow(0 6px 12px rgba(140, 161, 26, 0.35));
}

.upload-text {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    display: block;
}

.upload-hint {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* PREVIEW - Enhanced */
.preview {
    position: relative;
    margin: 2rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s ease;
    border: 2px solid rgba(140, 161, 26, 0.1);
}

.preview img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.preview-remove {
    background: rgba(229, 57, 53, 0.95);
    border: none;
    color: white;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

.preview-remove:hover {
    background: var(--error);
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.6);
}

/* BUTTONS - Premium Design */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 1.35rem 2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #6a8a15 0%, #8ca11a 50%, #a8bb3e 100%);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 6px 20px rgba(140, 161, 26, 0.4);
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 320px;
    height: 320px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(140, 161, 26, 0.5);
    background-position: right center;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--green-dark);
    border: 2px solid var(--green);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #f5f8e8 0%, #e8f0dc 100%);
    border-color: var(--green-dark);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(140, 161, 26, 0.25);
}

/* RESULTS - Enhanced */
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-item {
    background: linear-gradient(135deg, #f5f8e8 0%, #fef8ec 100%);
    padding: 2rem;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(140, 161, 26, 0.1);
}

.result-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-gold), var(--green));
    transform: scaleY(0);
    transition: var(--transition);
}

.result-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.result-item:hover::before {
    transform: scaleY(1);
}

.result-item.full-width {
    grid-column: 1 / -1;
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-label::before {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(140, 161, 26, 0.4);
}

.result-value {
    font-size: 1.6rem;
    color: var(--green-dark);
    font-weight: 800;
}

/* CONFIDENCE BAR - Premium */
.confidence-bar {
    position: relative;
    height: 46px;
    background: rgba(140, 161, 26, 0.08);
    border-radius: 23px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: inset 0 2px 6px rgba(140, 161, 26, 0.08);
}

.confidence-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #a8bb3e 0%, #8ca11a 50%, #6a8a15 100%);
    border-radius: 23px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
    box-shadow: 0 0 24px rgba(140, 161, 26, 0.45);
}

.confidence-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.confidence-text {
    position: relative;
    z-index: 1;
    color: var(--text);
    font-weight: 800;
    font-size: 1.25rem;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

/* ADVICE SECTION - Enhanced */
.advice-section {
    background: linear-gradient(135deg, #f5f8e8 0%, #fef8ec 100%);
    border-radius: var(--radius);
    padding: 2.2rem;
    border-left: 5px solid var(--green);
    box-shadow: inset 0 2px 10px rgba(140, 161, 26, 0.06);
    position: relative;
    overflow: hidden;
}

.advice-section::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(229, 186, 115, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.advice-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--green-dark);
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    position: relative;
}

.advice-title svg {
    color: var(--green);
}

.advice-content {
    color: var(--text);
    line-height: 1.9;
    font-size: 1.05rem;
    position: relative;
}

.advice-content strong {
    color: var(--green-dark);
    font-weight: 700;
}

/* LOADING - Enhanced */
.loading-dots {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    padding: 2rem 0;
}

.loading-dots span {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, var(--accent-gold), var(--green));
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
    box-shadow: 0 4px 10px rgba(140, 161, 26, 0.35);
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* FEATURES - Premium Cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.feature {
    text-align: center;
    padding: 3.8rem 2.2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 245, 233, 0.85) 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid rgba(140, 161, 26, 0.12);
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: "";
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(162, 195, 215, 0.12) 0%, transparent 60%);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-14px);
    box-shadow: var(--shadow-lg);
    border-color: var(--green);
}

.feature:hover::before {
    top: -50%;
    left: -50%;
}

.feature-icon {
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 85px;
    height: 85px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(135deg, rgba(140, 161, 26, 0.12), rgba(229, 186, 115, 0.18));
    border-radius: 50%;
    transition: var(--transition);
    color: var(--green-dark);
    box-shadow: 0 4px 12px rgba(140, 161, 26, 0.15);
}

.feature-icon svg {
    filter: drop-shadow(0 3px 6px rgba(140, 161, 26, 0.25));
    transition: var(--transition);
    stroke: currentColor;
}

.feature:hover .feature-icon {
    transform: scale(1.15) translateY(-8px);
    background: linear-gradient(135deg, rgba(140, 161, 26, 0.22), rgba(229, 186, 115, 0.3));
    box-shadow: 0 10px 24px rgba(140, 161, 26, 0.3);
}

.feature:hover .feature-icon svg {
    transform: scale(1.1);
    filter: drop-shadow(0 5px 10px rgba(140, 161, 26, 0.4));
}

.feature h3 {
    color: var(--green-dark);
    margin-bottom: 1.2rem;
    font-size: 1.45rem;
    font-weight: 800;
    position: relative;
}

.feature h3::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-gold), var(--green));
    border-radius: 2px;
}

.feature p {
    color: var(--text-light);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.7;
    margin-top: 1.8rem;
}

/* FOOTER - Enhanced */
.footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(245, 248, 232, 0.92) 100%);
    backdrop-filter: blur(12px);
    border-top: 3px solid rgba(140, 161, 26, 0.25);
    padding: 2.8rem 1rem;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(140, 161, 26, 0.08);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-copy {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ERROR MESSAGE */
.error-message {
    background: rgba(229, 57, 53, 0.1);
    color: var(--error);
    padding: 1.3rem;
    border-radius: var(--radius-sm);
    margin-top: 1.5rem;
    font-weight: 600;
    border-left: 5px solid var(--error);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.15);
}

/* HIDDEN */
.hidden {
    display: none !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header {
        padding: 0.8rem 1.2rem;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .header-left {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .logo-img {
        width: 110px;
    }

    .theme-toggle {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .hero-section {
        padding: 2.5rem 1.8rem;
        margin-bottom: 3rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card {
        padding: 2rem;
        min-height: 380px;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .feature {
        padding: 2.8rem 1.8rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.9rem 1.5rem;
    }

    .logo-img {
        width: 100px;
    }

    .app-subtitle {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .hero-section {
        padding: 2rem 1.5rem;
    }

    .card {
        padding: 1.8rem;
        min-height: 360px;
    }

    .upload-zone {
        padding: 3rem 1.5rem;
        min-height: 240px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 1.2rem 1.8rem;
        font-size: 1.05rem;
    }
}

/*------------------------------DARK MODE-------------------------------*/
/*----------------------------------------------------------------------*/
.theme-toggle {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: rgba(255, 255, 255, 0.25);
}

/* TRUE DARK MODE – refined eco palette */
.dark {
    /* Backgrounds */
    --bg: #0c1110;
    --card-bg: #151d19;
    /* Text - Enhanced contrast */
    --text: #e8f7ea;
    --text-light: #a8bdac;
    /* Greens - Brighter for better visibility */
    --green-dark: #4a7d4f;
    --green: #5fa564;
    --green-light: #8fcd94;
    /* Accents */
    --accent-gold: #e5c179;
    --accent-blue: #73c9c6;
    --accent-blue-light: #92dbd7;
    /* Shadows */
    --shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.75);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.85);
}

/* Dark global background */
body.dark {
    background: radial-gradient(circle at top, #1b271f 0%, #080c0a 40%, #040605 100%) !important;
    background-size: cover !important;
    animation: none !important;
    /* <-- MOST IMPORTANT */
}


/* Dark header */
.dark .header {
    background: linear-gradient(135deg, #162018 0%, #1f3627 50%, #1a2d20 100%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .app-subtitle {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text);
}

.dark .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Cards - darker background with better text contrast */
.dark .card,
.dark .hero-section,
.dark .result-item,
.dark .advice-section,
.dark .feature {
    background: rgba(16, 22, 18, 0.96) !important;
    border-color: rgba(127, 205, 148, 0.15) !important;
}

/* Upload zone - specific styling for better visibility */
.dark .upload-zone {
    background: rgba(20, 28, 24, 0.98) !important;
    border-color: var(--green) !important;
}

.dark .upload-zone::after {
    border-color: rgba(127, 205, 148, 0.3);
}

.dark .upload-text {
    color: var(--text);
}

.dark .upload-hint {
    color: var(--text-light);
}

.dark .upload-zone svg {
    color: var(--green-light);
}

/* Card titles and text */
.dark .card-title {
    color: var(--green-light);
}

.dark .card-subtitle {
    color: var(--text-light);
}

/* Hero section */
.dark .hero-title {
    background: linear-gradient(135deg, var(--green-light) 0%, var(--accent-gold) 40%, var(--green-light) 80%, var(--green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .hero-text {
    color: var(--text-light);
}

/* Feature cards - enhanced visibility */
.dark .feature h3 {
    color: var(--green-light);
}

.dark .feature p {
    color: var(--text-light);
}

.dark .feature-icon {
    color: var(--green-light);
    background: linear-gradient(135deg, rgba(127, 205, 148, 0.15), rgba(229, 193, 121, 0.15));
}

.dark .feature:hover .feature-icon {
    background: linear-gradient(135deg, rgba(127, 205, 148, 0.25), rgba(229, 193, 121, 0.25));
}

/* Result items */
.dark .result-label {
    color: var(--text-light);
}

.dark .result-value {
    color: var(--green-light);
}

/* Advice section */
.dark .advice-title {
    color: var(--green-light);
}

.dark .advice-content {
    color: var(--text);
}

.dark .advice-content strong {
    color: var(--green-light);
}

/* Footer */
.dark .footer {
    background: rgba(16, 22, 19, 0.95);
    border-top-color: rgba(127, 205, 148, 0.15);
}

.dark .footer-copy {
    color: var(--text-light);
}

/* Buttons */
.dark .btn-primary {
    background: linear-gradient(135deg, var(--green-dark), var(--green), var(--green-light));
    box-shadow: 0 0 20px rgba(127, 205, 148, 0.4);
}

.dark .btn-secondary {
    color: var(--green-light);
    border-color: var(--green);
}

.dark .btn-secondary:hover {
    background: rgba(127, 205, 148, 0.1);
    border-color: var(--green-light);
}

/* Confidence bar */
.dark .confidence-bar {
    background: rgba(21, 31, 25, 0.8);
}

.dark .confidence-fill {
    background: linear-gradient(90deg, var(--green-light), var(--green), var(--green-dark));
    box-shadow: 0 0 24px rgba(127, 205, 148, 0.5);
}

.dark .confidence-text {
    color: var(--text);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Ensure all text elements are visible */
.dark h1,
.dark h2,
.dark h3,
.dark h4 {
    color: var(--text);
}

.dark p,
.dark span {
    color: var(--text);
}

/* Add ONLY these improvements to your existing CSS */
/* Better header layout */
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Eco badge (lightweight version - no external icons) */
.eco-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Better card header style */
.card-header {
    padding: var(--space-md);
    background: var(--eco-bg-alt);
    border-bottom: 1px solid rgba(140, 161, 26, 0.1);
}

/* Subtle pulse (CPU-friendly version) */
@keyframes subtlePulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.upload-zone::after {
    animation: subtlePulse 3s ease-in-out infinite;
}

.brand-slogan {
    background: linear-gradient(90deg, #ffffffcc, #e5ba73, #ffffffcc);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sloganShine 4s ease-in-out infinite;
}

@keyframes sloganShine {
    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }

    100% {
        background-position: 0% center;
    }
}