:root {
    /* Base timing and transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Default: Light Theme */
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --primary-color: #16a34a; /* Elegant botanical forest green */
    --primary-hover: #15803d;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.06);
    --input-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --nav-active-bg: rgba(22, 163, 74, 0.08);
    --nav-active-color: #16a34a;
    --primary-glow: rgba(22, 163, 74, 0.2);
    --toggle-bg-off: #cbd5e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* System Dark Theme Option */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #0b0f14;
        --surface-color: #12161a;
        --primary-color: #10b981; /* High-quality emerald green */
        --primary-hover: #059669;
        --text-primary: #f8fafc;
        --text-secondary: #94a3b8;
        --border-color: #22272e;
        --glass-bg: rgba(18, 22, 26, 0.7);
        --glass-border: rgba(255, 255, 255, 0.06);
        --input-bg: rgba(0, 0, 0, 0.25);
        --sidebar-bg: #0b0f14;
        --nav-active-bg: rgba(255, 255, 255, 0.08);
        --nav-active-color: #ffffff;
        --primary-glow: rgba(16, 185, 129, 0.25);
        --toggle-bg-off: #334155;
        
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
    }
}

/* Explicit Dark Theme Option */
html[data-theme="dark"] {
    --bg-color: #0b0f14;
    --surface-color: #12161a;
    --primary-color: #10b981;
    --primary-hover: #059669;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #22272e;
    --glass-bg: rgba(18, 22, 26, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
    --input-bg: rgba(0, 0, 0, 0.25);
    --sidebar-bg: #0b0f14;
    --nav-active-bg: rgba(255, 255, 255, 0.08);
    --nav-active-color: #ffffff;
    --primary-glow: rgba(16, 185, 129, 0.25);
    --toggle-bg-off: #334155;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}

/* Explicit Light Theme Option */
html[data-theme="light"] {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --primary-color: #16a34a;
    --primary-hover: #15803d;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.06);
    --input-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --nav-active-bg: rgba(22, 163, 74, 0.08);
    --nav-active-color: #16a34a;
    --primary-glow: rgba(22, 163, 74, 0.2);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Utility */
.mobile-only { display: none !important; }
@media (max-width: 768px) {
    .mobile-only { display: flex !important; }
    .desktop-only { display: none !important; }
}

/* Floating Add Button */
.fab-add {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0 1.5rem;
    height: 54px;
    border-radius: 27px;
    background: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 0 4px var(--primary-glow);
    cursor: pointer;
    z-index: 999;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast) cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fab-add:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 0 6px var(--primary-glow);
    background: var(--primary-hover);
}

.fab-icon {
    font-size: 1.4rem;
    line-height: 1;
    display: inline-block;
}

.fab-text {
    display: inline;
}

@media (max-width: 768px) {
    .fab-add {
        bottom: calc(80px + env(safe-area-inset-bottom));
        right: 1.5rem;
        width: 56px;
        height: 56px;
        border-radius: 28px;
        padding: 0;
        justify-content: center;
    }
    .fab-text {
        display: none;
    }
}

.pepper-card.selected,
.pepper-list-item.selected {
    box-shadow: 0 0 0 3px var(--primary-color) !important;
    background: var(--nav-active-bg) !important;
}

.selection-indicator {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.selected .selection-indicator {
    background: var(--primary-color);
    border-color: white;
}

.selection-indicator::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
    margin-bottom: 2px;
}

.selected .selection-indicator::after {
    display: block;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent; /* Smooth touch feel */
}

.app-layout {
    display: flex;
    flex-direction: column; /* Mobile: vertical layout stack */
    min-height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 100%;
    height: auto;
    background: var(--sidebar-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    z-index: 3000;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    min-height: calc(65px + env(safe-area-inset-bottom));
    transition: transform var(--transition-normal) cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sidebar-header {
    display: none; /* Hidden on mobile bottom tab nav */
}

.sidebar-toggle-btn {
    display: none; /* Hidden on mobile */
}

.toggle-icon {
    font-size: 1.25rem;
    transition: transform var(--transition-normal) cubic-bezier(0.25, 0.8, 0.25, 1);
    line-height: 1;
    display: inline-block;
}

.brand-text {
    display: none; /* Hidden on mobile */
}

.sidebar-nav-btn svg {
    flex-shrink: 0;
    transition: transform var(--transition-fast) ease;
}

.sidebar-nav-btn:hover svg {
    transform: scale(1.1);
}

.sidebar-nav {
    display: flex;
    flex-direction: row;
    width: 100%;
    padding: 0.5rem 0.6rem; 
    justify-content: space-around;
    gap: 8px;
    position: relative; /* Context for children popovers */
}

.sidebar-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.1rem;
    background: transparent !important;
    color: var(--text-secondary);
    border: none;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    flex: 1;
    min-height: 55px;
    min-width: 0;
    overflow: hidden;
}

.sidebar-nav-btn:hover {
    color: var(--text-primary);
}

.sidebar-nav-btn.active {
    color: var(--primary-color) !important;
    background: var(--nav-active-bg) !important;
}

.sidebar-nav-btn.active span {
    font-weight: 700;
}

.main-content {
    flex-grow: 1;
    order: 1;
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top));
    padding-bottom: calc(120px + env(safe-area-inset-bottom)); /* Safe spacing for bottom nav */
    height: auto;
    min-height: calc(100vh - 80px);
    overflow: visible;
    position: relative;
    z-index: 10;
    -webkit-overflow-scrolling: touch;
    background: transparent;
}

/* Desktop overrides for main layout items */
@media (min-width: 769px) {
    .app-layout {
        flex-direction: row;
    }

    .sidebar {
        width: 260px;
        height: auto;
        flex-direction: column;
        border-right: 1px solid var(--border-color);
        border-top: none;
        background: var(--sidebar-bg);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding-bottom: 0;
        box-shadow: none;
        position: relative;
        min-height: 100vh;
        z-index: 100;
        bottom: auto;
        left: auto;
        right: auto;
    }

    .sidebar-header {
        display: flex;
        padding: 1.5rem;
        align-items: center;
        gap: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        transition: padding var(--transition-normal) cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .sidebar-toggle-btn {
        display: flex;
        background: transparent;
        border: none;
        color: var(--text-secondary);
        cursor: pointer;
        padding: 6px;
        border-radius: 6px;
        align-items: center;
        justify-content: center;
        transition: all var(--transition-fast);
    }

    .sidebar-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-primary);
    }

    .brand-text {
        display: block;
        transition: opacity var(--transition-fast) ease, transform var(--transition-fast) ease;
    }

    .sidebar-nav {
        flex-direction: column;
        padding: 1.5rem 1rem;
        gap: 0.5rem;
    }

    .sidebar-nav-btn {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        gap: 0.75rem;
        border-radius: 8px;
        text-align: left;
        width: 100%;
        min-height: auto;
        background: transparent;
        color: var(--text-secondary);
    }

    .sidebar-nav-btn:hover {
        background: rgba(255,255,255,0.05);
        color: var(--text-primary);
    }

    .sidebar-nav-btn.active {
        background: var(--nav-active-bg);
        color: var(--nav-active-color) !important;
        box-shadow: inset 3px 0 0 0 var(--primary-color);
    }

    .sidebar-nav-btn svg {
        width: 20px;
        height: 20px;
    }

    .main-content {
        padding: 2rem 3rem;
        height: auto;
        overflow-y: auto;
    }

    /* Sidebar Collapse Mode - Desktop Only */
    html.sidebar-collapsed .sidebar {
        width: 72px;
    }

    html.sidebar-collapsed .brand-text {
        opacity: 0;
        pointer-events: none;
        width: 0;
        height: 0;
        transform: translateX(-10px);
        overflow: hidden;
    }

    html.sidebar-collapsed .sidebar-header {
        justify-content: center;
        padding: 1.5rem 0.5rem;
    }

    html.sidebar-collapsed .sidebar-toggle-btn .toggle-icon {
        transform: rotate(180deg);
    }

    html.sidebar-collapsed .sidebar-nav-btn {
        justify-content: center;
        padding: 0.75rem 0;
        gap: 0;
    }

    html.sidebar-collapsed .sidebar-nav-btn .btn-text {
        display: none;
    }

    /* Desktop Modal overrides */
    .modal {
        align-items: center;
        justify-content: center;
    }
    
    .modal-content {
        width: 90%;
        max-width: 500px;
        border-radius: 20px;
        padding: 2.5rem;
        transform: scale(0.95);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        max-height: 90vh;
    }
    
    .modal.show .modal-content {
        transform: scale(1);
    }
    
    .modal-content.large {
        max-width: 1000px;
    }
    
    .modal-drag-handle {
        display: none;
    }
}

/* More Menu Popover (Relative to app-layout) */
.more-menu-popover {
    position: absolute;
    display: none;
    flex-direction: column;
    padding: 0.5rem;
    z-index: 3000; /* Above nav and everything else */
    width: 200px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    border-radius: 12px;
    bottom: 0;
    left: calc(100% + 15px); /* To the right of sidebar */
}

.more-menu-popover.show {
    display: flex;
}

.more-menu-item {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.more-menu-item:hover {
    background: var(--nav-active-bg);
    color: var(--nav-active-color);
}

/* Desktop specific alignment - override any parent constraints */
.sidebar-nav .more-menu-popover {
    bottom: 1rem;
    left: calc(100% + 10px); 
}

@media (max-width: 768px) {
    .sidebar-nav .more-menu-popover {
        bottom: calc(70px + env(safe-area-inset-bottom));
        right: 0.5rem;
        left: auto;
        width: 200px;
        max-width: 90vw;
    }
}

@media (max-width: 400px) {
    .sidebar-nav {
        gap: 4px !important;
        padding: 0.5rem 0.4rem !important;
    }
    .sidebar-nav-btn {
        font-size: 0.6rem !important;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 0.9rem;
}

.btn.primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn.primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 var(--primary-glow);
}

.btn.full-width {
    width: 100%;
    min-height: 48px;
}

.peppers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.pepper-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.pepper-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-glow);
}

.pepper-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pepper-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.pepper-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.badge {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Modals as bottom sheets on mobile by default */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 4000;
    align-items: flex-end; /* Mobile: bottom alignment for slide up sheet */
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px 24px 0 0; /* Rounded top corners on mobile drawer */
    box-shadow: var(--shadow-xl);
}

.modal-content {
    width: 100%;
    max-width: 100%;
    padding: 2rem 1.5rem calc(2.25rem + env(safe-area-inset-bottom)) 1.5rem;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.94, 0.6, 1);
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-content.large {
    max-width: 100%;
}

.modal-drag-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    margin: 0 auto 1.5rem auto;
    display: block;
}

html[data-theme="light"] .modal-drag-handle {
    background: rgba(0, 0, 0, 0.12);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close {
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), textarea, select {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--surface-color);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.1em;
    padding-right: 2.5rem !important;
    cursor: pointer;
}

/* Update chevron arrow color in dark mode */
html[data-theme="dark"] select,
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) select {
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    }
}

.modal-actions {
    margin-top: 2rem;
}

.logs-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: auto;
}

.logs-list-container {
    overflow-y: auto;
    padding-right: 1.5rem;
}
.logs-list-container::-webkit-scrollbar {
    width: 8px;
}
.logs-list-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.log-entry {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.log-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    display: inline-block;
    background: var(--nav-active-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.log-notes {
    margin-bottom: 1rem;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.log-image img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.file-upload {
    background: rgba(0,0,0,0.25);
    border: 1px dashed var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.2s;
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--primary-color);
}

.file-upload input {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.user-photo-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.6rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 10;
    font-size: 0.9rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tag-new {
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.photo-gallery {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
}
.photo-gallery::-webkit-scrollbar {
    height: 8px;
}
.photo-gallery::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}
.gallery-item {
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: transform 0.2s;
}
.gallery-item:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logs-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 5vh auto;
}

.logs-container {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 1rem;
}
.logs-container::-webkit-scrollbar { width: 8px; }
.logs-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.2s;
}
.nav-btn:hover { color: var(--text-color); }
.nav-btn.active { color: var(--primary-color); }
.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.peppers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pepper-list-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pepper-list-item:hover {
    border-color: var(--primary-color);
    background: rgba(255,255,255,0.02);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.pepper-list-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
    gap: 1.5rem;
}

.pepper-list-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pepper-list-meta {
    display: flex;
    align-items: center;
}

/* Controls Bar & Mobile Filters Drawer */
.controls-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-wrapper {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.search-wrapper input {
    flex: 1;
}

.secondary-filters {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border-radius: 24px 24px 0 0;
    padding: 2rem 1.5rem calc(2rem + env(safe-area-inset-bottom)) 1.5rem;
    z-index: 5000;
    box-shadow: var(--shadow-xl);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: bottom var(--transition-normal) cubic-bezier(0.32, 0.94, 0.6, 1),
                visibility var(--transition-normal);
    visibility: hidden;
}

.secondary-filters.show {
    bottom: 0;
    visibility: visible;
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mobile-drawer-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-drawer-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.drawer-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 4500;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.drawer-backdrop.show {
    display: block;
    opacity: 1;
}

.filter-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-group select {
    width: 100%;
}

.view-mode-pill {
    display: flex;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    width: max-content;
}

.view-mode-pill button {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
}

.view-mode-pill button.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* Light mode overrides for compact filter drawer components */
html[data-theme="light"] .secondary-filters {
    background: #ffffff;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
}

/* Demo Banner */
.demo-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(29, 78, 216, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.demo-banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.demo-icon {
    font-size: 1.2rem;
}

/* Light mode support for demo banner */
html[data-theme="light"] .demo-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
    color: #1e40af;
}

html[data-theme="light"] .demo-banner-content {
    color: #1e3a8a;
}

@media (max-width: 768px) {
    .demo-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        text-align: center;
    }
    
    .demo-banner-content {
        flex-direction: column;
        gap: 0.4rem;
    }
}

/* Desktop overrides for dashboard controls and logs layout */
@media (min-width: 769px) {
    .controls-bar {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .search-wrapper {
        flex: 1;
        width: auto;
    }

    .secondary-filters {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        visibility: visible;
        width: auto;
        height: auto;
        z-index: auto;
        transition: none;
    }

    html[data-theme="light"] .secondary-filters {
        background: transparent;
        box-shadow: none;
    }

    .filter-group {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .filter-group select {
        width: auto;
    }

    #pepper-filter-species {
        min-width: 200px;
    }

    .full-width-mobile {
        width: auto !important;
    }

    .logs-layout {
        display: grid;
        grid-template-columns: 3fr 2fr;
        gap: 3rem;
        height: 60vh;
    }
}

/* ========================================= */
/* MOBILE RESPONSIVE PWA LAYOUT              */
/* ========================================= */

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only-nav-btn {
        display: flex !important;
        background: var(--primary-color) !important;
        color: white !important;
        border-radius: 12px;
        margin: 0 4px;
        box-shadow: 0 4px 12px var(--primary-glow);
    }
    
    .container {
        padding-bottom: 2rem;
    }
    
    .peppers-grid {
        grid-template-columns: 1fr;
    }
    
    .pepper-card {
        padding: 1.25rem;
    }
    
    /* Ensure action buttons are always visible or at the bottom */
    .modal-actions {
        margin-top: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), textarea, select {
        font-size: 16px !important; /* Force 16px to prevent iOS zoom */
        padding: 0.9rem;
        min-height: 48px;
    }
    
    #pepper-details-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    
    #details-image {
        width: 100% !important;
        border-radius: 20px;
        max-width: none;
    }
    
    #details-meta {
        justify-content: center;
    }

    .guide-settings-bar, .guide-ai-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1.25rem !important;
    }
    
    .guide-settings-bar > div, .guide-ai-header > div {
        width: 100% !important;
    }
    
    .guide-settings-bar button, .guide-ai-header button {
        width: 100% !important;
        padding: 1rem !important;
    }

    .main-content {
        z-index: auto;
    }
}
/* Moisture Meter & Footer Styles */
.moisture-meter {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.moisture-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.moisture-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.moisture-fill {
    height: 100%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.moisture-disclaimer {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.6rem;
    opacity: 0.7;
    font-style: italic;
    text-align: center;
}

footer {
    transition: opacity 0.3s;
}

footer:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .moisture-meter {
        padding: 0.8rem;
    }
}

/* User Preferences Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--toggle-bg-off);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Pagination Controls */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pagination-select {
    width: auto;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.pagination-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.pagination-nav {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Toggle Switch Wrapper */
.toggle-switch-container {
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    padding: 0.6rem 1rem; 
    background: rgba(255,255,255,0.03); 
    border-radius: 14px; 
    border: 1px solid var(--border-color); 
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-switch-container:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--primary-color);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--toggle-bg-off);
    transition: .3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-glow);
}

input:checked + .toggle-slider:before {
    transform: translateX(16px);
}


/* QR Scanner & Display */
#qr-scanner-overlay {
    z-index: 11000;
    background: #000 !important; /* Solid black to prevent dashboard bleed */
    visibility: visible !important;
}

#qr-reader {
    background: #000;
}

#qr-reader__scan_region {
    background: #000 !important;
}

#qr-reader video {
    object-fit: cover !important;
    border-radius: 12px;
}

#qr-display-modal {
    z-index: 5500; /* Higher than logs-modal */
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
}

#qr-display-modal .modal-content {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    opacity: 1 !important;
    visibility: visible !important;
}

/* Batch Action Bar */
.batch-action-bar {
    position: fixed;
    bottom: -150px; /* Hidden by default */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 320px;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.8rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 6000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.batch-action-bar.visible {
    bottom: calc(2rem + env(safe-area-inset-bottom));
}

.batch-info {
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.batch-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .batch-action-bar {
        width: 90%;
        bottom: -200px;
    }
    .batch-action-bar.visible {
        bottom: calc(85px + env(safe-area-inset-bottom)); /* Above mobile nav */
    }
}

#qr-code-container canvas, #qr-code-container img {
    max-width: 100%;
    height: auto !important;
}

.scanner-header h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    #nav-scan {
        display: flex !important;
        transform: translateY(-5px);
        box-shadow: 0 8px 24px var(--primary-glow);
        border: 2px solid rgba(255,255,255,0.1);
        z-index: 10;
    }
}

#qr-scanner-overlay button {
    font-weight: 600;
    transition: all 0.2s ease;
}

#qr-scanner-overlay button:active {
    transform: scale(0.95);
}

/* Bulk QR Print Styles */
#print-area {
    display: none;
}

@media print {
    body {
        background: white !important;
        color: black !important;
    }
    .app-layout, footer, .modal, .fab-add, .batch-action-bar, .sidebar {
        display: none !important;
    }
    #print-area {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 10px;
        margin: 0;
    }
    .qr-print-tag {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px;
        border: 1px dashed #eee;
        break-inside: avoid;
        text-align: center;
        background: white;
    }
    .qr-print-code {
        margin-bottom: 10px;
    }
    .qr-print-code img, .qr-print-code canvas {
        max-width: 100%;
        height: auto !important;
    }
    .qr-print-label {
        font-family: 'Inter', sans-serif;
        color: #000;
        font-size: 11px;
        line-height: 1.3;
    }
}

/* ==========================================================================
   LANDING PAGE & MARKETING FLOW
   ========================================================================== */

#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    z-index: 9999;
    overflow-y: auto;
    display: none; /* Controlled by JS checkAuth() */
    flex-direction: column;
}

.landing-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    color: var(--text-primary);
}

/* Header & Navbar */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.landing-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.landing-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Hero Section */
.landing-hero {
    position: relative;
    padding: 8rem 5% 6rem;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(22, 163, 74, 0.15), transparent 60%),
                radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.1), transparent 65%);
    overflow: hidden;
}

/* Specific styling for dark theme radial background */
html[data-theme="dark"] .landing-hero,
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .landing-hero {
        background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 50%),
                    radial-gradient(circle at bottom left, rgba(22, 163, 74, 0.08), transparent 60%),
                    var(--surface-color);
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-tagline {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--nav-active-bg);
    color: var(--primary-color);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid var(--primary-glow);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: -0.8px;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.large-cta {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
}

/* Section Header Utility */
.section-header-centered {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    padding: 0 5%;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.8px;
}

.section-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Highlights Section & Scrolling */
.landing-highlights {
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
}

.highlights-scroll-outer {
    position: relative;
    padding: 0 5%;
    display: flex;
    align-items: center;
}

.highlights-scroll-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1.5rem 0.5rem;
    width: 100%;
    scrollbar-width: none; /* Firefox */
}

.highlights-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.scroll-arrow {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 10;
    transition: all var(--transition-fast);
}

.scroll-arrow:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.08);
}

.scroll-arrow.prev {
    left: 2%;
}

.scroll-arrow.next {
    right: 2%;
}

@media (max-width: 768px) {
    .scroll-arrow {
        display: none; /* Swipe on mobile */
    }
}

/* Highlight Card */
.highlight-card {
    flex: 0 0 320px;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    transition: transform var(--transition-fast) ease, border-color var(--transition-fast) ease;
}

.highlight-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.highlight-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    background: rgba(0,0,0,0.05);
    overflow: hidden;
}

.highlight-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.highlight-card-shu {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.highlight-card-shu.mild { background: rgba(16, 185, 129, 0.85); }
.highlight-card-shu.medium { background: rgba(245, 158, 11, 0.85); }
.highlight-card-shu.hot { background: rgba(239, 68, 68, 0.85); }
.highlight-card-shu.extreme { background: rgba(220, 38, 38, 0.9); }
.highlight-card-shu.nuclear { background: rgba(153, 27, 27, 0.95); animation: pulse 2s infinite; }

.highlight-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.highlight-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.highlight-card-species {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.highlight-card-origin {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.highlight-card-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.highlight-card-skeleton {
    width: 100%;
    padding: 4rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Features Grid */
.landing-features {
    padding: 6rem 5%;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    padding: 2.5rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    transition: transform var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-glow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Landing Footer */
.landing-footer {
    text-align: center;
    padding: 3rem 5%;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--surface-color);
}

/* Auth Modal Overlay & Modal Window */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.auth-modal-overlay.show {
    display: flex;
    animation: fadeIn 0.25s ease forwards;
}

.auth-modal-content {
    max-width: 440px;
    width: 90%;
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-modal-overlay.show .auth-modal-content {
    transform: scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}

.auth-modal-close:hover {
    color: var(--text-primary);
}

.auth-modal-logo {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.auth-modal-title {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.auth-input {
    width: 100%;
    padding: 0.9rem 1.1rem !important;
    margin-bottom: 1.1rem !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    box-sizing: border-box;
}

.auth-modal-switch-text {
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-modal-switch-text a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: text-decoration var(--transition-fast);
}

.auth-modal-switch-text a:hover {
    text-decoration: underline;
}
