:root {
    --primary: #15803d; /* Forest Green 700 */
    --primary-hover: #166534; /* Forest Green 800 */
    --primary-light: #22c55e; /* Vibrant Green 500 */
    --accent: #eab308; /* Harvest Gold 500 */
    --dark: #14532d; /* Deep Pine 900 */
    --bg-dark: #022c22; /* Premium Deep Green-Slate 950 */
    --text-main: #f8fafc;
    --text-muted: #cbd5e1; /* Slate 300 */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-heavy: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/bg.jpg') center/cover no-repeat;
    opacity: 0.15;
    z-index: -2;
    filter: brightness(1.0) contrast(1.1);
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%);
    filter: blur(80px);
    border-radius: 50%;
}

.blob-1 { top: -10%; left: -10%; animation: float 20s infinite alternate; }
.blob-2 { bottom: -10%; right: -10%; background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0) 70%); animation: float 25s infinite alternate-reverse; }
.blob-3 { top: 40%; left: 30%; background: radial-gradient(circle, rgba(52, 211, 153, 0.1) 0%, rgba(52, 211, 153, 0) 70%); animation: float 30s infinite alternate; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: var(--glass-heavy);
    transform: translateY(-8px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 25px 50px -12px rgba(16, 185, 129, 0.25);
}

/* Navbar Styling */
.navbar {
    background: rgba(2, 6, 23, 0.8) !important;
    backdrop-filter: blur(12px);
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    background: rgba(2, 6, 23, 0.95) !important;
}

.logo-img {
    height: 45px;
    width: auto;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-brand:hover .logo-img {
    transform: scale(1.1) rotate(5deg);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    color: #fff !important;
    font-family: 'Playfair Display', serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    margin: 0 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-highlight {
    padding: 0.5rem 0.9rem !important;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8) !important;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-highlight:hover {
    background: rgba(52, 211, 153, 0.1) !important;
    border-color: var(--primary) !important;
    color: var(--primary-light) !important;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
    transform: translateY(-2px);
}

/* Dropdown Menu Improvements */
.dropdown-menu {
    background: rgba(2, 6, 23, 0.98) !important; /* Deep dark slate */
    backdrop-filter: blur(25px);
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    padding: 0.75rem !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6) !important;
    border-radius: 1.25rem !important;
    min-width: 240px;
    margin-top: 10px !important;
}

.dropdown-item {
    color: var(--text-muted) !important;
    border-radius: 0.75rem;
    padding: 0.6rem 1rem !important;
    margin-bottom: 2px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(16, 185, 129, 0.12) !important;
    color: var(--primary-light) !important;
    transform: translateX(5px);
}

.dropdown-item i {
    transition: all 0.3s ease;
}

.dropdown-item:hover i {
    color: var(--primary-light) !important;
    transform: scale(1.2);
}

.nav-info-card {
    position: fixed;
    width: 380px;
    z-index: 1050;
    backdrop-filter: blur(25px);
    border: 1px solid rgba(52, 211, 153, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.footer-modern {
    padding: 8rem 0 6rem;
    position: relative;
}

/* Premium Buttons */
.glow-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.glow-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.5) !important;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.4s ease;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-3px);
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .display-2 {
        font-size: 2.8rem !important;
        letter-spacing: -1px !important;
    }
    
    .display-4 {
        font-size: 2.2rem !important;
    }

    .hero {
        padding-top: 6rem !important;
        padding-bottom: 4rem !important;
    }

    .hero .gap-4 {
        gap: 1rem !important;
    }

    .btn-lg {
        padding: 0.8rem 1.5rem !important;
        font-size: 1rem !important;
        width: 100%; /* Full width buttons on mobile */
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 2rem !important;
    }

    .nav-info-card {
        width: 90% !important;
        left: 5% !important;
        top: 20% !important;
        position: fixed !important;
    }
    
    .navbar-brand span {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 480px) {
    .display-2 {
        font-size: 2.2rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
}

.glass-input-neon {
    background: rgba(14, 165, 233, 0.15) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    color: white !important;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}

.glass-input-neon:focus {
    background: rgba(14, 165, 233, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    outline: none;
}

.glass-input-neon option {
    background: #0f172a;
    color: white;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 1rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px -10px rgba(16, 185, 129, 0.5);
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -10px rgba(16, 185, 129, 0.6);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: var(--glass);
    border-color: var(--primary);
    color: white;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 3rem 0;
}

.plant-card {
    text-align: center;
    overflow: hidden;
}

.plant-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.plant-card:hover img {
    transform: scale(1.08);
}

/* Upload Box */
.upload-box {
    padding: 5rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed var(--glass-border);
    border-radius: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
}

.upload-icon {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 15px rgba(16, 185, 129, 0.3));
}

/* Footer */
.footer-modern {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0) 0%, rgba(2, 6, 23, 1) 100%);
    padding: 8rem 0 3rem;
    margin-top: 8rem;
    position: relative;
}

.footer-top-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: #fff;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-5px);
    color: #fff;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

/* Mirror Button Effect */
.btn-mirror {
    background: rgba(16, 185, 129, 0.15) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-mirror::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: rotate(45deg);
    transition: all 0.8s ease;
}

.btn-mirror:hover::before {
    left: 150%;
}

.btn-mirror:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.5);
    transform: translateY(-3px);
}

/* Prediction Results */
.result-container {
    max-width: 1100px;
    margin: 4rem auto;
}

.result-image-wrapper {
    border-radius: 3rem;
    overflow: hidden;
    border: 4px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.badge-diagnosis {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-light);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.75rem; }
    .hero { text-align: center; }
    .hero p { margin: 0 auto 2rem; }
}

/* Neon Text Utilities */
.neon-text {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(16, 185, 129, 0.5);
}

.text-neon-emerald {
    color: var(--primary-light) !important;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
