/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2E7D32;
    --primary-dark: #1F5A24;
    --secondary-color: #66BB6A;
    --success-color: #9CCC65;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #F1F8E9;
    --card-background: #ffffff;
    --text-primary: #263238;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 2rem;
}

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

.nav-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--primary-color);
    color: white;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
}

/* Page Management */
.page {
    display: none;
    padding: 2rem 0;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-note {
    margin-top: 1.5rem;
}

.hero-note small {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.hero-note a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--success-color);
    color: white;
}

.btn-secondary:hover {
    background: #7CB342;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Scan Container */
.scan-container {
    max-width: 800px;
    margin: 0 auto;
}

.scan-container h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.scan-container > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--card-background);
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 2rem;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.upload-text p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Camera Options */
.camera-options {
    text-align: center;
    margin-bottom: 2rem;
}

/* Image Preview */
.image-preview {
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results */
.results {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.confidence-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--success-color);
    color: white;
}

.confidence-badge.low {
    background: var(--warning-color);
}

.confidence-badge.very-low {
    background: var(--error-color);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.result-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.disease-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.confidence-score {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Severity Meter */
.severity-meter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.severity-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.severity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--error-color));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.severity-text {
    font-weight: 700;
    min-width: 3rem;
    text-align: right;
}

/* Severity Indicator */
.severity-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--card-background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.severity-emoji {
    font-size: 2rem;
    line-height: 1;
}

.severity-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Inline severity indicator for history */
.severity-indicator-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Grad-CAM Section */
.gradcam-section {
    margin-bottom: 2rem;
}

.gradcam-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gradcam-section > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.gradcam-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}

.gradcam-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gradcam-image img {
    width: 100%;
    height: auto;
    display: block;
}

.gradcam-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
}

.gradcam-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gradcam-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Treatment Section */
.treatment-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.treatment-card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.treatment-loading {
    text-align: center;
    color: var(--text-secondary);
}

.fertilizer-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    background: rgba(16, 185, 129, 0.05);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-weight: 500;
}

.fertilizer-section strong {
    color: var(--success-color);
    font-size: 1.1em;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* History */
.history-container {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.history-empty {
    text-align: center;
    padding: 3rem 0;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.history-empty h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.history-empty p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Voice Assistant */
.voice-container {
    max-width: 800px;
    margin: 0 auto;
}

.voice-header {
    text-align: center;
    margin-bottom: 2rem;
}

.voice-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.voice-header > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.permission-notice {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(46, 125, 50, 0.3);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.permission-notice small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.permission-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: var(--transition);
}

.permission-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.voice-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-info .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-info .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.voice-interface {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.voice-display {
    margin-bottom: 2rem;
    position: relative;
    text-align: center;
}

.voice-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.voice-display p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.voice-wave {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 4px;
    height: 40px;
}

.wave-bar {
    width: 6px;
    background: var(--primary-color);
    border-radius: 3px;
    animation: wave 1.5s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 10px; }
    50% { height: 30px; }
}

.voice-controls {
    margin-bottom: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.voice-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.3);
    position: relative;
    overflow: hidden;
}

.voice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.voice-btn:hover::before {
    left: 100%;
}

.voice-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(46, 125, 50, 0.4);
}

.voice-btn.listening {
    background: linear-gradient(135deg, var(--error-color), #ff6b6b);
    animation: pulse 1.5s infinite;
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.4);
}

.voice-status {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    display: inline-block;
}

.voice-response {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: left;
    animation: slideInFromBottom 0.5s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.response-header span:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.response-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.action-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

.response-text {
    line-height: 1.7;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.voice-examples {
    margin-bottom: 2rem;
}

.voice-examples p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.example-questions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.example-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.example-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.2);
}

.example-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.voice-history {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

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

.history-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.clear-history-btn {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.clear-history-btn:hover {
    background: #c62828;
    transform: scale(1.05);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.history-question {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.history-answer {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
    color: white;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
}

.speak-btn {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        order: 1;
        flex: 1;
    }

    .auth-section, .user-section {
        order: 2;
        display: flex;
        gap: 0.5rem;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-background);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        order: 4;
    }

    .nav.show {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        order: 3;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .gradcam-container {
        grid-template-columns: 1fr;
    }

    .result-actions {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .preview-actions {
        flex-direction: column;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .auth-modal .modal-body {
        padding: 1.5rem 1rem;
    }

    .auth-modal .modal-header h3 {
        font-size: 1.25rem;
    }

    .footer {
        padding: 1rem 0 0.75rem;
        margin-top: 1rem;
    }

    .footer-content {
        gap: 0.75rem;
    }

    .footer-section {
        padding: 0 0.25rem;
    }

    .footer-logo {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .footer-logo .logo-icon {
        font-size: 1.25rem;
    }

    .footer-section h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .footer-section p {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .footer-section ul li {
        margin-bottom: 0.25rem;
    }

    .footer-section ul li a {
        font-size: 0.85rem;
    }

    .footer-social {
        margin-top: 0.5rem;
    }

    .social-link {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .footer-bottom {
        padding-top: 0.75rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }

    .footer-bottom-links a {
        font-size: 0.8rem;
    }

    .footer-tagline {
        font-size: 0.75rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Enhanced History Page Styles */
.history-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--background-color) 0%, #e2e8f0 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.history-search {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    position: relative;
}

.history-search::before {
    content: "🔍";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.history-search input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.history-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.history-filter {
    min-width: 150px;
}

.history-filter select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: white;
    transition: var(--transition);
    cursor: pointer;
}

.history-filter select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, white 0%, var(--background-color) 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color), var(--warning-color));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.history-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.history-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
}

.history-card:hover::before {
    opacity: 1;
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    position: relative;
}

.history-card-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.history-status {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.history-status.healthy {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
}

.history-status.diseased {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.3);
}

.history-date {
    font-size: 0.8rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.history-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.history-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.history-card:hover .history-image {
    transform: scale(1.05);
}

.history-confidence {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.history-content {
    padding: 1rem;
}

.history-disease {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    text-transform: capitalize;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.history-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--background-color);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex: 1;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-weight: 600;
    color: var(--text-primary);
}

.history-treatment-preview {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    background: linear-gradient(135deg, var(--background-color) 0%, #e0f2fe 100%);
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.history-actions {
    padding: 1rem;
    padding-top: 0;
    display: flex;
    gap: 0.5rem;
}

.btn-outline {
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-outline:hover::before {
    left: 100%;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.btn-outline.danger:hover {
    border-color: var(--error-color);
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.2);
}

.history-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    background: linear-gradient(135deg, var(--background-color) 0%, #e2e8f0 100%);
    border-radius: var(--border-radius-lg);
    border: 2px dashed var(--border-color);
    margin: 2rem 0;
}

.history-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.history-empty h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.history-empty p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Modal Styles for History Details */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, white 0%, var(--background-color) 100%);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 10px 20px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.detail-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.detail-image img:hover {
    transform: scale(1.02);
}

.detail-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-transform: capitalize;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--background-color) 0%, #e2e8f0 100%);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.metric-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.metric-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-value {
    font-weight: 600;
    color: var(--text-primary);
}

.healthy-text {
    color: var(--success-color);
    font-weight: 700;
}

.diseased-text {
    color: var(--warning-color);
    font-weight: 700;
}

.detail-treatment {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--background-color) 0%, #e0f2fe 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.detail-treatment h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.treatment-details p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.treatment-details strong {
    color: var(--primary-color);
    font-weight: 600;
}

.no-treatment {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

/* Responsive Design for History */
@media (max-width: 768px) {
    .history-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .history-search {
        min-width: auto;
        max-width: none;
    }

    .history-filter {
        min-width: auto;
    }

    .history-list {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .history-card-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .history-metrics {
        flex-direction: column;
        gap: 0.5rem;
    }

    .history-actions {
        flex-direction: column;
    }

    .btn-outline {
        justify-content: center;
    }

    .detail-metrics {
        grid-template-columns: 1fr;
    }
}

/* Authentication Pages */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-full {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

.auth-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
    display: none;
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Header Authentication */
.auth-section {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    font-weight: 600;
    color: var(--text-primary);
}

/* Anonymous User Banner */
.anonymous-banner {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
    color: #92400e;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 73px; /* Below header */
    z-index: 99;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.banner-icon {
    font-size: 1.1rem;
}

.banner-text a {
    color: #92400e;
    text-decoration: underline;
    font-weight: 600;
}

.banner-text a:hover {
    color: #78350f;
}

.banner-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #92400e;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.banner-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success-color), var(--secondary-color), var(--success-color));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    padding: 0 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo .logo-icon {
    font-size: 2rem;
}

.footer-logo .logo-text {
    background: linear-gradient(135deg, white, var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--success-color);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-section ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-section ul li a.active {
    color: var(--success-color);
    font-weight: 600;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: white;
}

.footer-tagline {
    color: var(--success-color);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 0 1rem;
        margin-top: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-section {
        text-align: center;
        padding: 0 0.5rem;
    }

    .footer-logo {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .footer-logo .logo-icon {
        font-size: 1.5rem;
    }

    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .footer-section p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .footer-section ul li {
        margin-bottom: 0.375rem;
    }

    .footer-social {
        justify-content: center;
        margin-top: 0.75rem;
    }

    .footer-bottom {
        padding-top: 1rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-tagline {
        font-size: 0.8rem;
    }
}

/* Auth Modal Styles */
.auth-modal {
    max-width: 450px;
    width: 100%;
}

.auth-form-container {
    padding: 0;
}

.auth-modal .modal-header {
    text-align: center;
    padding-bottom: 1rem;
}

.auth-modal .modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-modal .modal-body {
    padding: 2rem;
}

.auth-form {
    margin: 1.5rem 0;
}

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

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--card-background);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.auth-form .btn-full {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-links p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.auth-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    display: none;
}

.auth-message.success {
    background: rgba(156, 204, 101, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(156, 204, 101, 0.3);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #d32f2f;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Responsive Auth Modal */
@media (max-width: 480px) {
    .auth-modal .modal-body {
        padding: 1.5rem;
    }

    .auth-form input {
        padding: 0.625rem;
    }
}

/* Help Center Styles */
.help-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.help-header {
    text-align: center;
    margin-bottom: 3rem;
}

.help-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.help-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.help-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.help-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.help-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.help-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.help-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.help-card ul {
    text-align: left;
    list-style: none;
}

.help-card li {
    padding: 0.25rem 0;
    color: var(--text-primary);
    position: relative;
    padding-left: 1.5rem;
}

.help-card li:before {
    content: "✓";
    color: var(--success-color);
    position: absolute;
    left: 0;
}

.help-contact {
    background: var(--card-background);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}

.help-contact h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.help-contact p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* FAQ Styles */
.faq-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.faq-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-background);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.faq-question:hover {
    background: rgba(46, 125, 50, 0.05);
}

.faq-icon {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: bold;
    transition: var(--transition);
}

.faq-answer {
    display: none;
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Privacy Policy Styles */
.privacy-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.privacy-header {
    text-align: center;
    margin-bottom: 3rem;
}

.privacy-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.privacy-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-article {
    background: var(--card-background);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.privacy-article h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.privacy-article h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.25rem;
}

.privacy-article p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.privacy-article ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.privacy-article li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.privacy-article strong {
    color: var(--text-primary);
}

.contact-info {
    background: rgba(46, 125, 50, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Responsive Design for Support Pages */
@media (max-width: 768px) {
    .help-section,
    .faq-section,
    .privacy-section {
        padding: 2rem 0;
    }

    .help-header h1,
    .faq-header h1,
    .privacy-header h1 {
        font-size: 2rem;
    }

    .help-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .help-card,
    .help-contact {
        padding: 1.5rem;
    }

    .contact-options {
        flex-direction: column;
        align-items: center;
    }

    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }

    .faq-answer {
        padding: 0 1rem 1rem 1rem;
    }

    .privacy-article {
        padding: 1.5rem;
    }
}

/* Settings Page Styles */
.settings-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.settings-header {
    text-align: center;
    margin-bottom: 3rem;
}

.settings-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.settings-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.settings-content {
    max-width: 800px;
    margin: 0 auto;
}

.settings-card {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.settings-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-group {
    margin-bottom: 2rem;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.setting-item input[type="text"],
.setting-item input[type="email"],
.setting-item select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--card-background);
    color: var(--text-primary);
    transition: var(--transition);
}

.setting-item input:focus,
.setting-item select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.setting-item input[readonly] {
    background: rgba(0, 0, 0, 0.05);
    cursor: not-allowed;
}

.setting-item small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-item input[type="checkbox"] {
    margin-top: 0.25rem;
    width: auto;
}

.checkbox-item label {
    flex: 1;
    cursor: pointer;
    margin-bottom: 0;
}

.settings-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background: #374151;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.data-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(46, 125, 50, 0.05);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
}

.danger-zone {
    border: 2px solid var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.danger-zone h2 {
    color: var(--error-color);
}

.danger-zone p {
    color: var(--error-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Settings */
@media (max-width: 768px) {
    .settings-section {
        padding: 2rem 0;
    }

    .settings-header h1 {
        font-size: 2rem;
    }

    .settings-card {
        padding: 1.5rem;
    }

    .settings-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .data-stats {
        grid-template-columns: 1fr;
    }
}

/* Terms of Service and Cookies Policy Styles */
.terms-section,
.cookies-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.terms-header,
.cookies-header {
    text-align: center;
    margin-bottom: 3rem;
}

.terms-header h1,
.cookies-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.terms-header p,
.cookies-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.terms-content,
.cookies-content {
    max-width: 800px;
    margin: 0 auto;
}

.terms-article,
.cookies-article {
    background: var(--card-background);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.terms-article h2,
.cookies-article h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.terms-article h3,
.cookies-article h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.125rem;
}

.terms-article p,
.cookies-article p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.terms-article ul,
.cookies-article ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.terms-article li,
.cookies-article li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.terms-article a,
.cookies-article a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-article a:hover,
.cookies-article a:hover {
    text-decoration: underline;
}

.contact-info {
    background: rgba(46, 125, 50, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.terms-agreement {
    background: rgba(46, 125, 50, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.terms-agreement p {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

.cookies-consent {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
    text-align: center;
}

.cookies-consent h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cookies-consent p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.cookie-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Terms and Cookies */
@media (max-width: 768px) {
    .terms-section,
    .cookies-section {
        padding: 2rem 0;
    }

    .terms-header h1,
    .cookies-header h1 {
        font-size: 2rem;
    }

    .terms-article,
    .cookies-article {
        padding: 1.5rem;
    }

    .terms-agreement,
    .cookies-consent {
        padding: 1.5rem;
    }

    .cookie-controls {
        flex-direction: column;
        align-items: center;
    }

    .cookie-controls .btn {
        width: 100%;
        max-width: 200px;
    }
}