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

:root {
    --primary-orange: #ff6b35;
    --primary-green: #2ecc71;
    --primary-yellow: #f1c40f;
    --primary-pink: #e74c3c;
    --primary-purple: #9b59b6;
    --warm-white: #fefefe;
    --soft-gray: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Modern Font Stack */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'Roboto Mono', monospace;
}

/* Dark mode variables */
[data-theme="dark"] {
    --warm-white: #1a1a1a;
    --soft-gray: #2d2d2d;
    --text-dark: #f8f9fa;
    --text-light: #cbd5e0;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.4);
    --bg-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-gradient);
    min-height: 100vh;
    transition: all 0.3s ease;
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Modern Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

h2 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

h3 {
    font-size: 1.875rem;
    font-weight: 600;
}

h4 {
    font-size: 1.5rem;
    font-weight: 600;
}

h5 {
    font-size: 1.25rem;
    font-weight: 600;
}

h6 {
    font-size: 1.125rem;
    font-weight: 600;
}

p {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 1rem 0;
    color: var(--text-dark);
}

small {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-light);
}

/* Improved text contrast and readability */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] p {
    color: #FFFFFF;
}

[data-theme="dark"] small {
    color: #A0A0A0;
}

/* Header Styles - Modern glass-morphism design */
.header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid #CCCCCC;
    padding: 0;
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 1000;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: visible;
}

[data-theme="dark"] .header {
    background: rgba(26, 26, 26, 0.15);
    border: 1px solid #5A5A5A;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 70px;
    border-radius: 24px;
    overflow: visible;
}

/* Logo Styling */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
    justify-self: start;
}

.logo:hover {
    opacity: 0.7;
}

.logo-icon {
    font-size: 1.5rem;
    filter: none;
    animation: none;
}

.logo-image {
    height: 75px;
    width: auto;
    object-fit: contain;
    content: url('logo.png');
}

[data-theme="dark"] .logo-image {
    content: url('logo-dark.png');
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: #111111;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-family: var(--font-display);
}

[data-theme="dark"] .logo-text {
    color: #FFFFFF;
}

/* Center Navigation */
.nav-center {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-self: center;
    height: 100%;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.8);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link:hover {
    color: var(--primary-orange);
    text-decoration: none;
}

.nav-link.active {
    color: var(--primary-orange);
    font-weight: 600;
}

[data-theme="dark"] .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .nav-link:hover {
    color: var(--primary-orange);
}

[data-theme="dark"] .nav-link.active {
    color: var(--primary-orange);
}

/* Right Side Navigation */
.nav-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-self: end;
    height: 100%;
}

/* Dark Mode Toggle - Modern minimal style */
.dark-mode-toggle {
    background: #F5F5F5;
    border: 1px solid #E5E5E5;
    border-radius: 20px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    background: #E5E5E5;
    border-color: #CCCCCC;
}

[data-theme="dark"] .dark-mode-toggle {
    background: #2D2D30;
    border-color: #3A3A3C;
}

[data-theme="dark"] .dark-mode-toggle:hover {
    background: #3A3A3C;
    border-color: #48484A;
}

.toggle-icon {
    font-size: 1rem;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .toggle-icon {
    transform: rotate(180deg);
}

/* Hide default emoji and show theme-specific ones */
[data-theme="dark"] .toggle-icon {
    font-size: 0;
}

[data-theme="dark"] .toggle-icon::after {
    content: '☀️';
    font-size: 1.5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Navigation Menu Layout */
.nav-desktop {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    height: 100%;
}

.mobile-menu-toggle {
    display: none;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    backdrop-filter: blur(10px);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

[data-theme="dark"] .mobile-menu-toggle {
    background: rgba(45, 45, 48, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-menu-toggle:hover {
    background: rgba(45, 45, 48, 1);
    border-color: rgba(255, 255, 255, 0.2);
}

.hamburger-line {
    position: absolute;
    width: 20px;
    height: 2px;
    background: #333333;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger-line:nth-child(1) {
    transform: translateY(-6px);
}

.hamburger-line:nth-child(2) {
    transform: translateY(0);
}

.hamburger-line:nth-child(3) {
    transform: translateY(6px);
}

[data-theme="dark"] .hamburger-line {
    background: #FFFFFF;
}

/* Active state - transforms to X */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
}

/* Mobile Navigation Menu */
.mobile-nav {
    position: fixed;
    top: calc(1rem + 70px);
    left: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 1500;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    overflow: hidden;
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    max-height: 480px;
}


[data-theme="dark"] .mobile-nav {
    background: rgba(26, 26, 26, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mobile-nav-links {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.75rem;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-nav-link:hover {
    color: var(--primary-orange);
}

[data-theme="dark"] .mobile-nav-link {
    color: #ffffff;
    background: #2d2d30;
    border: 1px solid #48484a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .mobile-nav-link:hover {
    color: var(--primary-orange);
}


.nav-text {
    font-size: 0.95rem;
    font-weight: 500;
}


/* Button Styles - Modern rounded design */
.btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    position: relative;
    font-family: var(--font-primary);
    min-height: 40px;
}

.btn:hover {
    transform: none;
    opacity: 0.7;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: #111111;
    color: white;
    border-color: #111111;
}

.btn-primary:hover {
    background: #111111;
    border-width: 1px;
    border-style: solid;
    border-color: #111111;
    opacity: 0.7;
}

.btn-secondary {
    background: transparent;
    color: #111111;
    border-color: #CCCCCC;
}

.btn-secondary:hover {
    background: #F5F5F5;
    border-width: 1px;
    border-style: solid;
    border-color: #CCCCCC;
    opacity: 1;
}

[data-theme="dark"] .btn-primary {
    background: #FFFFFF;
    color: #111111;
    border-color: #FFFFFF;
}

[data-theme="dark"] .btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border-color: #5A5A5A;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #2D2D30;
    border-width: 1px;
    border-style: solid;
    border-color: #5A5A5A;
}

.btn-accent {
    background: linear-gradient(135deg, #FF9500, #FF6B35);
    color: white;
    border-color: transparent;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #E08600, #E55A2B);
    opacity: 1;
}

.btn-ghost {
    background: transparent;
    color: #757575;
    border-color: transparent;
    font-weight: 500;
}

.btn-ghost:hover {
    color: #111111;
    background: transparent;
    opacity: 1;
}

[data-theme="dark"] .btn-ghost {
    color: #8E8E93;
}

[data-theme="dark"] .btn-ghost:hover {
    color: #FFFFFF;
}


/* Main Content */
.main-content {
    margin-top: 0;
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* Map Container */
.map-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Custom Leaflet marker styles */
.custom-div-icon {
    background: none !important;
    border: none !important;
}

/* Custom Leaflet zoom control styling */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-zoom a {
    background: var(--warm-white) !important;
    border: none !important;
    border-radius: 12px !important;
    margin-bottom: 4px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    transition: all 0.3s ease !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-control-zoom a:first-child {
    border-radius: 12px 12px 6px 6px !important;
}

.leaflet-control-zoom a:last-child {
    border-radius: 6px 6px 12px 12px !important;
    margin-bottom: 0 !important;
}

/* Dark mode zoom controls */
[data-theme="dark"] .leaflet-control-zoom a {
    background: var(--soft-gray) !important;
    color: var(--text-dark) !important;
}

[data-theme="dark"] .leaflet-control-zoom a:hover {
    background: #3a3a3a !important;
}

/* Custom refresh control - positioned by JavaScript */
.refresh-control.leaflet-control {
    z-index: 1000;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.refresh-control .refresh-btn {
    pointer-events: auto;
}

.refresh-btn {
    background: var(--warm-white) !important;
    border: none !important;
    border-radius: 12px !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    cursor: pointer !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    transition: all 0.3s ease !important;
    margin-bottom: 4px !important;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.refresh-btn:active {
    transform: scale(0.95) !important;
}

/* Dark mode refresh control */
[data-theme="dark"] .refresh-btn {
    background: var(--soft-gray) !important;
    color: var(--text-dark) !important;
}

[data-theme="dark"] .refresh-btn:hover {
    background: #3a3a3a !important;
}

/* Refresh animation when active */
.refresh-btn.refreshing {
    pointer-events: none;
    opacity: 0.7;
}

.refresh-btn.refreshing {
    animation: refreshSpin 1s linear infinite;
}

/* Footer Styles - glass-morphism design matching header */
.site-footer {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 2rem);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid #CCCCCC;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    z-index: 500;
}

.site-footer:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateX(-50%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .site-footer {
    background: rgba(26, 26, 26, 0.15);
    border: 1px solid #444444;
}

[data-theme="dark"] .site-footer:hover {
    background: rgba(26, 26, 26, 0.25);
    transform: translateX(-50%);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.footer-link:hover {
    color: var(--primary-orange);
    text-decoration: underline;
}

.footer-divider {
    color: var(--text-light);
    opacity: 0.5;
    font-size: 0.75rem;
}

.footer-text {
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    white-space: nowrap;
}

.footer-text p {
    margin: 0;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

[data-theme="dark"] .footer-link {
    color: #b0b0b0;
}

[data-theme="dark"] .footer-link:hover {
    color: var(--primary-orange);
}

[data-theme="dark"] .footer-divider,
[data-theme="dark"] .footer-text {
    color: #888;
}

/* Privacy Policy and Terms Modal Content */
.privacy-content,
.terms-content {
    padding: 1rem 0;
}

.privacy-section,
.terms-section {
    margin-bottom: 2rem;
}

.privacy-section h3,
.terms-section h3 {
    color: var(--primary-orange);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 149, 0, 0.2);
    padding-bottom: 0.25rem;
}

.privacy-section p,
.terms-section p {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.privacy-section ul,
.terms-section ul {
    color: var(--text-dark);
    line-height: 1.6;
    margin-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.privacy-section li,
.terms-section li {
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .privacy-section h3,
[data-theme="dark"] .terms-section h3 {
    color: var(--primary-orange);
    border-bottom-color: rgba(255, 149, 0, 0.3);
}

[data-theme="dark"] .privacy-section p,
[data-theme="dark"] .terms-section p,
[data-theme="dark"] .privacy-section ul,
[data-theme="dark"] .terms-section ul,
[data-theme="dark"] .privacy-section li,
[data-theme="dark"] .terms-section li {
    color: #FFFFFF;
}

.fruit-marker {
    background: linear-gradient(135deg, var(--warm-white), var(--soft-gray));
    border: 3px solid var(--primary-orange);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.fruit-marker::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.3s ease;
    opacity: 0;
}

.fruit-marker:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-pink);
}

.fruit-marker:hover::before {
    opacity: 1;
    animation: shimmer 0.6s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Claimed fruit marker highlighting */
.fruit-marker.claimed {
    border-color: var(--primary-green);
    background: linear-gradient(135deg, #e8f5e8, #c8e6c8);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3), var(--shadow-soft);
    animation: claimedPulse 2s infinite;
}


.fruit-marker.claimed:hover {
    transform: scale(1.15) rotate(5deg);
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.4), var(--shadow-medium);
}

@keyframes claimedPulse {
    0% { box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3), var(--shadow-soft); }
    50% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0.2), var(--shadow-soft); }
    100% { box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3), var(--shadow-soft); }
}

.user-location-marker {
    background: #e53e3e;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: calc(1rem + 70px + 1rem);
    left: 1.5rem;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid #CCCCCC;
    padding: 1rem 1.25rem;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    color: rgba(0, 0, 0, 0.8);
    text-align: left;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #CCCCCC;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Refresh icon animation */
@keyframes refreshSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fruit-filter {
    position: relative;
}

.fruit-filter select {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid #CCCCCC;
    padding: 1rem 1.25rem;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 180px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    color: rgba(0, 0, 0, 0.8);
}

.fruit-filter select:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #CCCCCC;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

.fruit-filter select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--warm-white);
    margin: 4% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-medium);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Compact modal for fruit details */
#fruitDetailsModal .modal-content {
    max-width: 600px;
    padding: 1.5rem;
    max-height: 85vh;
    overflow-y: auto;
    margin: 4% auto;
    scroll-behavior: smooth;
}

/* Custom scrollbar for fruit details modal */
#fruitDetailsModal .modal-content::-webkit-scrollbar {
    width: 6px;
}

#fruitDetailsModal .modal-content::-webkit-scrollbar-track {
    background: var(--soft-gray);
    border-radius: 3px;
}

#fruitDetailsModal .modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 3px;
}

#fruitDetailsModal .modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-pink);
}

[data-theme="dark"] #fruitDetailsModal .modal-content::-webkit-scrollbar-track {
    background: #3a3a3a;
}

[data-theme="dark"] #fruitDetailsModal .modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
}

/* Universal scrollbar styling for dark mode */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 6px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #3a3a3a;
    border-radius: 3px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 3px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-pink);
}

/* Share fruit modal styling - similar to fruit list modal */
.share-fruit-modal {
    max-width: 600px;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    margin: 4% auto;
}

.share-fruit-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Share fruit modal auth header styling */
.share-fruit-content .auth-modal-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
}

[data-theme="dark"] .share-fruit-content .auth-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Remove header dividers and reduce padding for privacy, terms, and about modals */
#privacyModal .share-fruit-content .auth-modal-header,
#termsModal .share-fruit-content .auth-modal-header {
    border-bottom: none;
    padding-bottom: 0.5rem;
}

#aboutModal .share-fruit-content .auth-modal-header {
    border-bottom: none;
    padding-bottom: 0.15rem;
}

[data-theme="dark"] #privacyModal .share-fruit-content .auth-modal-header,
[data-theme="dark"] #termsModal .share-fruit-content .auth-modal-header {
    border-bottom: none;
    padding-bottom: 0.5rem;
}

[data-theme="dark"] #aboutModal .share-fruit-content .auth-modal-header {
    border-bottom: none;
    padding-bottom: 0.15rem;
}

[data-theme="dark"] .auth-modal-title {
    color: #ffffff;
}

[data-theme="dark"] .auth-modal-subtitle {
    color: #b0b0b0;
}

.share-fruit-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.close {
    color: #a0aec0;
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: var(--text-dark);
}

.modal h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

/* Compact modal titles */
.share-fruit-modal h2,
#fruitDetailsModal h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-help-text {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Compact form styling for share fruit modal */
.share-fruit-form .form-group {
    margin-bottom: 0.5rem;
}

.share-fruit-form .form-group label {
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--soft-gray);
    font-weight: 500;
    font-family: var(--font-primary);
}

/* Compact inputs for share fruit modal */
.share-fruit-form input[type="text"],
.share-fruit-form input[type="date"],
.share-fruit-form select,
.share-fruit-form textarea {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    background: var(--warm-white);
    transform: translateY(-1px);
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--primary-orange);
    background: var(--warm-white);
}

/* Dark mode form element overrides */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #3a3a3a;
    border-color: #4a4a4a;
    color: var(--text-dark);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    background: #404040;
    border-color: var(--primary-orange);
    color: var(--text-dark);
}

[data-theme="dark"] input:hover,
[data-theme="dark"] select:hover,
[data-theme="dark"] textarea:hover {
    background: #404040;
    border-color: var(--primary-orange);
}

textarea {
    min-height: 80px;
    resize: vertical;
}

/* Compact textarea for share fruit modal */
.share-fruit-form textarea {
    min-height: 60px;
}


/* Modern Auth Modals */
.auth-modal-header {
    text-align: center;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .auth-modal-header {
}

.auth-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem auto;
}

[data-theme="dark"] .auth-modal-icon {
}

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

.auth-modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

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

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form textarea {
    padding: 0.875rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    background: var(--soft-gray);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-family: var(--font-primary);
}

.auth-form input:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
    background: white;
}

/* Password input container with toggle */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 3rem !important; /* Make room for the toggle button */
    flex: 1;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    z-index: 1;
}

.password-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle-icon {
    font-size: 1.1rem;
    user-select: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.password-toggle-btn:hover .password-toggle-icon {
    opacity: 0.8;
}

[data-theme="dark"] .auth-form input[type="text"],
[data-theme="dark"] .auth-form input[type="email"],
[data-theme="dark"] .auth-form input[type="password"],
[data-theme="dark"] .auth-form textarea {
    background: #3a3a3a;
    border-color: #4a4a4a;
    color: var(--text-dark);
}

[data-theme="dark"] .auth-form input:focus,
[data-theme="dark"] .auth-form textarea:focus {
    background: #2a2a2a;
    border-color: var(--primary-orange);
}

/* Dark mode password toggle styles */
[data-theme="dark"] .password-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.auth-form .btn {
    margin-top: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}


.auth-footer {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: var(--primary-pink);
}

/* Specific modal sizing for auth modals */
#loginModal .modal-content,
#registerModal .modal-content {
    max-width: 600px;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    margin: 4% auto;
}

/* Modern Fruit Details Modal */
.fruit-details-modern {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fruit-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .fruit-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.fruit-icon-large {
    font-size: 3rem;
    background: var(--soft-gray);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

[data-theme="dark"] .fruit-icon-large {
    background: #3a3a3a;
}

.fruit-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.fruit-username {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.fruit-info-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* Reduce spacing between owner name and quantity in fruit modal */
.fruit-details-modern .auth-modal-subtitle {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Editable field styling */
.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.field-controls {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.info-value-container {
    width: 100%;
}

.info-edit-input,
.info-edit-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--primary-orange);
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 250px;
}

.field-edit-btn,
.field-save-btn,
.field-cancel-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.field-edit-btn:hover {
    background-color: rgba(255, 107, 53, 0.1);
}

.field-save-btn:hover {
    background-color: rgba(46, 204, 113, 0.1);
}

.field-cancel-btn:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

/* Make info cards with editable fields have consistent height */
.info-card.editable .info-content {
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

[data-theme="dark"] .info-edit-input,
[data-theme="dark"] .info-edit-select {
    background: #3a3a3a;
    color: white;
    border-color: var(--primary-orange);
}

.info-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--soft-gray);
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

[data-theme="dark"] .info-card {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
}

.info-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.fruit-notes {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--soft-gray);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-orange);
}

.fruit-notes.editable .notes-content {
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

[data-theme="dark"] .fruit-notes {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-left: 4px solid var(--primary-orange);
}

.notes-icon {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-top: 0.2rem;
}

.notes-content {
    flex: 1;
}

.notes-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.5rem;
}

.notes-text {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

.notes-content .info-edit-input {
    min-height: 60px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
}

.claim-section-modern {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
    padding: 1.25rem;
    border-radius: var(--border-radius-sm);
    color: white;
}

.claim-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

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

.claim-title {
    font-size: 1rem;
    font-weight: 600;
}

.claim-input-modern {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.claim-input-field {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    color: var(--text-dark);
}

.claim-input-field::placeholder {
    color: #666;
}

.claim-btn {
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

/* Claimed section styles */
.claimed-section-modern {
    background: linear-gradient(135deg, var(--primary-green), #27ae60);
    padding: 1.25rem;
    border-radius: var(--border-radius-sm);
    color: white;
}

.claimed-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

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

.claimed-title {
    font-size: 1rem;
    font-weight: 600;
}

.claimed-info {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.claimed-info:last-child {
    margin-bottom: 0;
}

.claim-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Ripeness Display Styles */
.ripeness-display {
    margin-top: 0.5rem;
}

.ripeness-rating-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ripeness-stars {
    display: flex;
    gap: 0.25rem;
}

.ripeness-star {
    font-size: 0.9rem;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.ripeness-star.active {
    opacity: 1;
    transform: scale(1.1);
}

.ripeness-text {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Owner Actions Section */
.owner-actions-section {
    background: linear-gradient(135deg, #dc3545, #c82333);
    padding: 1.25rem;
    border-radius: var(--border-radius-sm);
    color: white;
}

.owner-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

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

.owner-title {
    font-size: 1rem;
    font-weight: 600;
}

.owner-actions {
    display: flex;
    gap: 0.75rem;
}

.delete-fruit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.delete-fruit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.delete-fruit-btn .btn-icon {
    font-size: 1rem;
}

/* Generic danger button style */
.btn-danger {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-width: 1px;
    border-style: solid;
    border-color: #dc3545;
}

.login-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--border-radius-sm);
    color: var(--primary-pink);
    font-weight: 500;
}

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

.login-text {
    font-size: 0.9rem;
}

/* About Modal Styles */
/* Fruit List Modal Styling */
.fruit-list-modal {
    max-width: 600px;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
}

.fruit-list-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.list-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .list-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.list-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.fruit-table-container {
    overflow-x: auto;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
}

[data-theme="dark"] .fruit-table-container {
    border-color: rgba(255, 255, 255, 0.15);
    background: #2a2a2a;
}

.fruit-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-primary);
    font-size: 0.9rem;
}

.fruit-table th {
    background: #F8F9FA;
    color: #495057;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .fruit-table th {
    background: #3a3a3a;
    color: #FFFFFF;
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.fruit-table td {
    padding: 1rem;
    vertical-align: middle;
}

[data-theme="dark"] .fruit-table td {
    color: #FFFFFF;
}

.fruit-table tbody tr:hover {
    background: rgba(255, 149, 0, 0.05);
    cursor: pointer;
}

[data-theme="dark"] .fruit-table tbody tr:hover {
    background: rgba(255, 149, 0, 0.1);
}

.fruit-type-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.fruit-icon {
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-cell {
    color: var(--text-light);
    font-size: 0.875rem;
}

.date-cell {
    font-weight: 500;
    white-space: nowrap;
}

.date-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-status.expires-soon {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.date-status.expires-later {
    background: rgba(40, 167, 69, 0.2);
    color: #155724;
}

[data-theme="dark"] .date-status.expires-soon {
    background: rgba(255, 193, 7, 0.3);
    color: #FFC107;
}

[data-theme="dark"] .date-status.expires-later {
    background: rgba(40, 167, 69, 0.3);
    color: #28A745;
}


/* Empty state styling */
.empty-state td {
    padding: 3rem 2rem !important;
    text-align: center;
    border: none !important;
}

.empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.empty-message {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.empty-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
    opacity: 0.8;
}

[data-theme="dark"] .empty-message {
    color: var(--text-dark);
}

[data-theme="dark"] .empty-subtitle {
    color: #888;
}


#aboutModal .auth-modal-header {
    padding-bottom: 0;
    margin-bottom: 0.126rem;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.about-hero {
    text-align: center;
    padding: 1rem 0;
}

.about-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.about-tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}

.about-section h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.about-section p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.how-it-works {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--soft-gray);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-orange);
}

[data-theme="dark"] .step {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-left: 4px solid var(--primary-orange);
}

.step-icon {
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.step-content h4 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.step-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--soft-gray);
    border-radius: var(--border-radius-sm);
}

[data-theme="dark"] .stat {
    background: #3a3a3a;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.about-footer {
    text-align: center;
    padding: 0.5rem 0 0 0;
    background: transparent;
    border-radius: 0;
    color: inherit;
}

.join-community-link {
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 24px;
    background: var(--primary-orange);
    display: block;
    text-align: center;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.join-community-link:hover {
    background: #e55a2b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

[data-theme="dark"] .join-community-link {
    color: white;
    background: var(--primary-orange);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

[data-theme="dark"] .join-community-link:hover {
    background: #e55a2b;
    color: white;
}

/* Loading Spinner */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e2e8f0;
    border-top: 5px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary-green), #27ae60);
    color: white;
    padding: 1.25rem 1.75rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-medium);
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3000;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    max-width: 400px;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 0.95rem;
}

.toast.show {
    transform: translateX(0) scale(1);
    animation: toastBounce 0.4s ease-out;
}

.toast.error {
    background: linear-gradient(135deg, var(--primary-pink), #c0392b);
}

@keyframes toastBounce {
    0% { transform: translateX(400px) scale(0.8); }
    60% { transform: translateX(-10px) scale(1.05); }
    100% { transform: translateX(0) scale(1); }
}

/* Profile Styles */
.profile-modal-content {
    padding: 0;
}

#profileModal .modal-content {
    max-width: 600px;
    padding: 0;
    max-height: 90vh;
    overflow: hidden;
    margin: 4% auto;
    border-radius: 20px;
}

.profile-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 85vh;
}

.profile-container .auth-modal-header {
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

[data-theme="dark"] .profile-container .auth-modal-header {
    border-bottom: 1px solid #3a3a3a;
}

.profile-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* About info list styling to match fruit posts */
.about-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-info-item {
    background-color: transparent;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.about-info-item:hover {
    background-color: rgba(255, 107, 53, 0.05);
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.about-info-content {
    flex: 1;
}

.about-info-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.about-info-value {
    font-size: 0.875rem;
    color: var(--text-light);
}

.about-info-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* About Modal Styles */
.about-avatar {
    text-align: center;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
}

.avatar-image {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-orange);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

[data-theme="dark"] .avatar-image {
    border-color: var(--primary-orange);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.about-content {
    padding: 1rem 0;
}

/* Contact Modal Styles */
.contact-modal-content {
    padding: 1rem 0;
}

#aboutModal .modal-content,
#contactModal .modal-content {
    padding: 2rem;
    max-height: 85vh;
    overflow-y: auto;
    margin: 4% auto;
    scroll-behavior: smooth;
}

/* Custom scrollbar for about and contact modals */
#aboutModal .modal-content::-webkit-scrollbar,
#contactModal .modal-content::-webkit-scrollbar {
    width: 6px;
}

#aboutModal .modal-content::-webkit-scrollbar-track,
#contactModal .modal-content::-webkit-scrollbar-track {
    background: var(--soft-gray);
    border-radius: 3px;
}

#aboutModal .modal-content::-webkit-scrollbar-thumb,
#contactModal .modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 3px;
}

#aboutModal .modal-content::-webkit-scrollbar-thumb:hover,
#contactModal .modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-pink);
}

[data-theme="dark"] #aboutModal .modal-content::-webkit-scrollbar-track,
[data-theme="dark"] #contactModal .modal-content::-webkit-scrollbar-track {
    background: #3a3a3a;
}

[data-theme="dark"] #aboutModal .modal-content::-webkit-scrollbar-thumb,
[data-theme="dark"] #contactModal .modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
}

.contact-hero {
    text-align: center;
    margin-bottom: 2rem;
}

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

.contact-tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

.contact-section {
    margin-bottom: 1.5rem;
}

.contact-section:last-child {
    margin-bottom: 0;
}

.contact-section:first-of-type {
    margin-top: 0rem;
}

.contact-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--soft-gray);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.social-link:hover {
    background: rgba(255, 149, 0, 0.1);
    border-color: var(--primary-orange);
    transform: translateY(-1px);
}

.social-link.instagram:hover {
    background: rgba(225, 48, 108, 0.1);
    border-color: #e1306c;
}

.social-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-orange);
    border-radius: 50%;
}

.social-link.instagram .social-icon {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-info {
    display: flex;
    flex-direction: column;
}

.social-platform {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.social-handle {
    color: var(--text-light);
    font-size: 0.875rem;
}

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

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

.contact-form label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
    font-family: var(--font-primary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Dark mode contact styles */
[data-theme="dark"] .contact-tagline {
    color: #888;
}

[data-theme="dark"] .contact-section h3 {
    color: var(--text-dark);
}

[data-theme="dark"] .social-link {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
}

[data-theme="dark"] .social-link:hover {
    background: rgba(255, 149, 0, 0.15);
}

[data-theme="dark"] .social-platform {
    color: var(--text-dark);
}

[data-theme="dark"] .social-handle {
    color: #888;
}

[data-theme="dark"] .contact-form label {
    color: var(--text-dark);
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    color: var(--text-dark);
}

[data-theme="dark"] .contact-form input::placeholder,
[data-theme="dark"] .contact-form textarea::placeholder {
    color: #888;
}

[data-theme="dark"] .contact-footer {
    border-top: 1px solid #4a4a4a;
    color: #888;
}

.profile-section {
    margin-bottom: 2rem;
    background: var(--warm-white);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-section h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 600;
    padding-bottom: 0;
    border-bottom: none;
}

[data-theme="dark"] .profile-section {
    background: #2d2d2d;
    border: 1px solid #3a3a3a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .profile-section h3 {
    color: var(--text-dark);
}

.profile-info {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
    color: var(--text-dark);
}

.fruit-history {
    list-style: none;
}

.fruit-history li {
    background-color: transparent;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.fruit-history li:hover {
    background-color: rgba(255, 107, 53, 0.05);
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.fruit-history .fruit-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.fruit-history .fruit-details {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.fruit-history .fruit-location {
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.8;
}

/* Archive-specific styles */
.archive-description {
    margin-bottom: 1.5rem;
}

.archive-description p {
    color: var(--text-light);
    font-style: italic;
    margin: 0;
}

.fruit-archive-status {
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.claimed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-badge.expired {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.archive-item {
    opacity: 0.8;
}

.archive-item:hover {
    opacity: 1;
}

[data-theme="dark"] .fruit-history li {
    border: 1px solid #4a4a4a;
    background-color: transparent;
}

[data-theme="dark"] .fruit-history li:hover {
    background-color: rgba(255, 107, 53, 0.1);
    border-color: var(--primary-orange);
}

[data-theme="dark"] .status-badge.claimed {
    background: rgba(40, 167, 69, 0.2);
    color: #40c057;
}

[data-theme="dark"] .status-badge.expired {
    background: rgba(108, 117, 125, 0.2);
    color: #adb5bd;
}

/* Mobile responsive styles for profile */
@media (max-width: 767px) {
    #profileModal .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 4% auto;
    }
    
    .profile-container .auth-modal-header {
        padding: 1rem;
    }
    
    .profile-content {
        padding: 1rem;
    }
    
    .profile-section {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .profile-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .profile-edit-field {
        margin-bottom: 1rem;
        padding: 0.75rem;
    }
    
    .profile-edit-info {
        margin-bottom: 0.5rem;
    }
    
    .profile-edit-info strong {
        display: block;
        margin-bottom: 0.25rem;
        color: var(--primary-orange);
        font-size: 0.9rem;
    }
    
    .profile-edit-input, 
    textarea.profile-edit-input {
        width: 100%;
        margin-top: 0.5rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .profile-edit-buttons {
        justify-content: flex-start;
        margin-top: 0.75rem;
    }
    
    .profile-edit-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .fruit-history .fruit-name {
        font-size: 0.95rem;
    }
    
    .fruit-history .fruit-details,
    .fruit-history .fruit-location {
        font-size: 0.8rem;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .archive-description p {
        font-size: 0.875rem;
    }
}

/* Enhanced fruit post item styling */
.fruit-post-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fruit-post-content {
    flex: 1;
}

.fruit-post-content .fruit-location {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    opacity: 0.8;
}

.fruit-post-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-delete-fruit {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.btn-delete-fruit:hover {
    background: #c82333;
    border-width: 1px;
    border-style: solid;
    border-color: #dc3545;
}

.btn-delete-fruit:active {
    transform: scale(0.95);
}

/* Dark mode adjustments for delete button */
[data-theme="dark"] .btn-delete-fruit {
    background: #dc3545;
}

[data-theme="dark"] .btn-delete-fruit:hover {
    background: #c82333;
    border-width: 1px;
    border-style: solid;
    border-color: #dc3545;
}

/* Dark mode profile overrides */
[data-theme="dark"] .profile-info {
    background-color: #3a3a3a;
    border: 1px solid #4a4a4a;
}

[data-theme="dark"] .about-info-item {
    border-color: #3a3a3a;
}

[data-theme="dark"] .about-info-item:hover {
    background-color: rgba(255, 107, 53, 0.1);
    border-color: var(--primary-orange);
}

[data-theme="dark"] .about-info-label {
    color: #ffffff !important;
}

[data-theme="dark"] .about-info-value {
    color: #b0b0b0;
}

/* Profile editing styles */
.profile-edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--soft-gray);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .profile-edit-field {
        flex-direction: row;
        align-items: center;
    }
}

[data-theme="dark"] .profile-edit-field {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
}

.profile-edit-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

@media (min-width: 768px) {
    .profile-edit-content {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
}

.profile-edit-info {
    flex: 1;
    min-width: 0;
}

.profile-edit-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.profile-edit-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.profile-edit-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.profile-edit-btn.edit {
    background: #007bff;
    color: white;
}

.profile-edit-btn.save {
    background: #28a745;
    color: white;
}

.profile-edit-btn.cancel {
    background: #6c757d;
    color: white;
}

.profile-edit-btn:hover {
    opacity: 0.9;
}

.profile-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.profile-action-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
}

.profile-action-link:hover {
    text-decoration: underline;
}

[data-theme="dark"] .profile-edit-input {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    color: var(--text-dark);
}

[data-theme="dark"] .profile-actions {
    border-top: 1px solid #4a4a4a;
}

[data-theme="dark"] .fruit-history li {
    background-color: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-left: 4px solid var(--primary-orange);
}

/* Dark mode link and text overrides */
[data-theme="dark"] a {
    color: var(--primary-orange);
}

[data-theme="dark"] a:hover {
    color: var(--primary-pink);
}

[data-theme="dark"] .close {
    color: var(--text-light);
}

[data-theme="dark"] .close:hover {
    color: var(--text-dark);
}

/* Dark mode placeholders */
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #888;
}

/* Dark mode modal backgrounds */
[data-theme="dark"] .modal-content {
    background: #2a2a2a;
    border: 1px solid #4a4a4a;
}

/* Dark mode control buttons */
[data-theme="dark"] .control-btn {
    background: rgba(26, 26, 26, 0.15);
    border: 1px solid #5A5A5A;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .control-btn:hover {
    background: rgba(26, 26, 26, 0.28);
    border: 1px solid #5A5A5A;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .fruit-filter select {
    background: rgba(26, 26, 26, 0.15);
    border: 1px solid #5A5A5A;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .fruit-filter select:hover {
    background: rgba(26, 26, 26, 0.28);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .fruit-filter select option {
    background: #2d2d2d;
    color: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.5rem 1rem;
}

[data-theme="dark"] .fruit-filter select option:hover,
[data-theme="dark"] .fruit-filter select option:focus {
    background: #404040;
    color: white;
}

[data-theme="dark"] .fruit-filter select option:checked {
    background: var(--primary-orange);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Add safe area support for mobile devices */
    body {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    
    .nav-container {
        padding: 0 1.5rem;
        height: 56px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-desktop {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-right {
        display: flex;
        gap: 0.75rem;
        align-items: center;
    }
    
    .nav-center {
        display: none;
    }
    
    .mobile-nav {
        top: calc(1rem + 56px);
        left: 0;
        right: 0;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1.25rem;
    }
    
    .logo {
        display: flex;
        align-items: center;
        justify-self: auto;
        margin-top: 6px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-height: 36px;
    }
    
    .nav-desktop {
        display: none;
    }
    
    .nav-menu {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .modal-content {
        margin: 4% auto;
        padding: 2rem;
        width: 95%;
        border-radius: var(--border-radius-sm);
    }
    
    #fruitDetailsModal .modal-content {
        padding: 1.25rem;
        margin: 6% auto;
    }
    
    .share-fruit-modal {
        padding: 1.25rem;
        margin: 4% auto;
        max-height: 85vh;
        max-width: 95vw;
    }
    
    #aboutModal .modal-content,
    #contactModal .modal-content,
    #loginModal .modal-content,
    #registerModal .modal-content {
        padding: 1.5rem;
        margin: 4% auto;
        max-height: 85vh;
    }
    
    .fruit-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .fruit-icon-large {
        width: 50px;
        height: 50px;
        font-size: 2.5rem;
    }
    
    .claim-input-modern {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .map-controls {
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + 60px);
        left: 1rem;
        top: auto;
        gap: 0.75rem;
    }
    
    .control-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .fruit-filter select {
        min-width: 150px;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Move Leaflet zoom controls to bottom right on mobile */
    .leaflet-control-zoom {
        position: absolute !important;
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + 60px) !important;
        right: 1rem !important;
        top: auto !important;
        left: auto !important;
    }
    
    /* Refresh control positioning handled by JavaScript on mobile */
    
    /* Hide footer on mobile - links are in hamburger menu instead */
    .site-footer {
        display: none;
    }
    
    .toast {
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + 20px);
        right: 1rem;
        left: 1rem;
        text-align: center;
        border-radius: var(--border-radius-sm);
        max-width: none;
        font-size: 0.9rem;
        padding: 1rem 1.25rem;
        line-height: 1.5;
        white-space: pre-wrap;
    }
    
    .main-content {
        margin-top: 0;
        height: 100vh;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .modal-content {
        margin: 4% auto;
        padding: 1rem;
    }
    
    .share-fruit-modal {
        margin: 4% auto;
        padding: 1rem;
        max-height: 95vh;
        max-width: 95vw;
    }
    
    #fruitDetailsModal .modal-content {
        margin: 6% auto;
        padding: 1rem;
    }
    
    #aboutModal .modal-content,
    #contactModal .modal-content,
    #loginModal .modal-content,
    #registerModal .modal-content {
        padding: 1.25rem;
        margin: 6% auto;
        max-height: 90vh;
    }
    
    .auth-modal-icon {
        font-size: 2rem;
    }
    
    .auth-modal-title {
        font-size: 1.25rem;
    }
    
    .auth-form {
        gap: 0.75rem;
    }
    
    .auth-form input,
    .auth-form textarea {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Extra compact form for very small screens */
    .share-fruit-form .form-group {
        margin-bottom: 0.4rem;
    }
    
    .share-fruit-form input[type="text"],
    .share-fruit-form input[type="date"],
    .share-fruit-form select,
    .share-fruit-form textarea {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .share-fruit-form textarea {
        min-height: 50px;
    }
    
    .fruit-icon {
        font-size: 3rem;
    }
    
    /* Hide fruit icons in active fruit list table on mobile */
    .fruit-table .fruit-icon {
        display: none;
    }
    
    .claim-input {
        flex-direction: column;
    }
}

/* Archive Pagination Styles */
.archive-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
}

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

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-orange);
    color: white;
    border-color: var(--primary-orange);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--soft-gray);
    color: var(--text-light);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.archive-pagination-info {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    margin: 0.5rem 0;
}

/* Dark theme pagination styles */
[data-theme="dark"] .archive-pagination {
    border-top-color: #3a3a3a;
}

[data-theme="dark"] .pagination-btn {
    border-color: #3a3a3a;
    background: #2a2a2a;
    color: var(--text-primary);
}

[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
}

[data-theme="dark"] .pagination-btn:disabled {
    background: #1a1a1a;
    color: #666;
}

/* Mobile pagination styles */
@media (max-width: 480px) {
    .archive-pagination {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .pagination-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .pagination-info,
    .archive-pagination-info {
        text-align: center;
        font-size: 0.8rem;
    }
}