/* CSS Load Detection Marker */
.style-test {
    position: absolute !important;
}

:root {
    --primary-color: #ff4742;
    --text-dark: #1a1a1a;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Dark mode variables */
[data-theme="dark"] {
    --text-dark: #ffffff;
    --text-gray: #d1d5db;
    --bg-light: #111827;
    --bg-white: #1f2937;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: var(--bg-light);
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Dark mode navbar */
[data-theme="dark"] .navbar {
    background: rgba(31, 41, 55, 0.9);
    border-bottom: 1px solid rgba(55, 65, 81, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-logo h2 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-logo-img {
    height: auto;
    max-height: 43px;
    width: auto;
    max-width: 200px;
    transition: opacity 0.3s ease;
}

.nav-logo-img:hover {
    opacity: 0.8;
}

/* Logo link styling */
.nav-logo a {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s ease;
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
}

.nav-logo a:hover {
    opacity: 0.8;
}

.footer-section a {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 0.8;
}

.footer-logo {
    color: var(--text-gray);
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
}

/* Dark mode logo switching */
[data-theme="dark"] .nav-logo-img {
    content: url('/logo-dark.svg');
}

[data-theme="dark"] .footer-logo {
    content: url('/logo-dark.svg');
    filter: none; /* Remove the white filter for dark mode */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    overflow: hidden;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-menu a:hover {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Dark mode nav menu hover - 统一样式 */
[data-theme="dark"] .nav-menu a:hover {
    color: #ffffff !important;
    background: rgba(255, 71, 66, 0.15) !important;
    box-shadow: 0 4px 16px rgba(255, 71, 66, 0.2);
}

[data-theme="dark"] .nav-menu a::before {
    background: rgba(255, 71, 66, 0.1);
}

.nav-menu a:hover::before {
    opacity: 1;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.theme-toggle svg {
    transition: all 0.3s ease;
    color: var(--text-gray);
}

/* Icon visibility states */
.theme-toggle .moon-icon {
    position: absolute;
    opacity: 0;
    transform: rotate(90deg);
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Dark mode icon states */
[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

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

/* Dark mode theme toggle styling */
[data-theme="dark"] .theme-toggle {
    border-color: rgba(55, 65, 81, 0.5);
    background: rgba(55, 65, 81, 0.3);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: rgba(55, 65, 81, 0.7);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    color: var(--text-gray);
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Dark mode language selector */
[data-theme="dark"] .lang-toggle {
    border-color: rgba(55, 65, 81, 0.5);
    background: rgba(55, 65, 81, 0.3);
}

[data-theme="dark"] .lang-toggle:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: rgba(55, 65, 81, 0.7);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.lang-toggle svg {
    transition: transform 0.2s;
}

.language-selector.open .lang-toggle svg {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Dark mode language dropdown */
[data-theme="dark"] .lang-dropdown {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(55, 65, 81, 0.5);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
}

.language-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-gray);
    border-radius: 12px;
    margin: 4px;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--text-dark);
}

/* Dark mode language option hover */
[data-theme="dark"] .lang-option:hover {
    background: rgba(55, 65, 81, 0.5);
    color: var(--text-dark);
}

.lang-option.active {
    background: linear-gradient(135deg, var(--primary-color), #ff6b5b);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 71, 66, 0.3);
}


.btn-login {
    text-decoration: none;
    color: var(--text-dark);
    padding: 8px 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Dark mode login button */
[data-theme="dark"] .btn-login:hover {
    background: rgba(55, 65, 81, 0.4);
}

.btn-signup {
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), #ff6b5b);
    color: white;
    padding: 8px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-shadow: 0 4px 16px rgba(255, 71, 66, 0.3);
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 71, 66, 0.4);
}

/* Hero Section */
.hero {
    margin-top: 70px;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-backgrounds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 3s ease-in-out;
    filter: saturate(1.3) contrast(1.1) brightness(1.05);
}

.hero-background.active {
    opacity: 1;
}

/* High quality background images - mix of urban nature and landscapes */
.hero-background[data-bg="1"] {
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=2000&auto=format&fit=crop&q=80');
}

.hero-background[data-bg="2"] {
    background-image: url('https://images.unsplash.com/photo-1449824913935-59a10b8d2000?w=2000&auto=format&fit=crop&q=80');
}

.hero-background[data-bg="3"] {
    background-image: url('https://images.unsplash.com/photo-1519677100203-a0e668c92439?w=2000&auto=format&fit=crop&q=80');
}

.hero-background[data-bg="4"] {
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=2000&auto=format&fit=crop&q=80');
}

.hero-background[data-bg="5"] {
    background-image: url('https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=2000&auto=format&fit=crop&q=80');
}

.hero-background[data-bg="6"] {
    background-image: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?w=2000&auto=format&fit=crop&q=80');
}

.hero-background[data-bg="7"] {
    background-image: url('https://images.unsplash.com/photo-1469474968028-56623f02e42e?w=2000&auto=format&fit=crop&q=80');
}

.hero-background[data-bg="8"] {
    background-image: url('https://images.unsplash.com/photo-1517760444937-f6397edcbbcd?w=2000&auto=format&fit=crop&q=80');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 2;
}

/* Dark mode hero overlay */
[data-theme="dark"] .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 3;
    padding: 4rem 2rem;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3rem;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 71, 66, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 66, 0.4);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}


/* Cities Ranking Section */
.cities-ranking {
    padding: 4rem 0;
    background: var(--bg-white);
}

.cities-ranking h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Filter and Sort */
.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-gray);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

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

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-size: 1rem;
    color: var(--text-dark);
    cursor: pointer;
    font-family: inherit;
}

/* Cities Grid */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.city-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

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

.city-image {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.city-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.city-rank {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.city-emoji {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    font-size: 2.5rem;
    z-index: 2;
}

.city-location {
    position: absolute;
    bottom: 1rem;
    left: 4rem;
    color: white;
    z-index: 2;
}

.city-location h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.city-location p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.city-info {
    padding: 1.25rem;
}

.city-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.overall-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-label {
    font-size: 0.85rem;
    color: var(--text-gray);
}

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

.city-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

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

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

.metric-info {
    flex: 1;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    line-height: 1.2;
}

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

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--bg-light);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    text-align: center;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Why Free Section */
.why-free {
    padding: 4rem 0;
    background: var(--bg-white);
}

.why-free h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

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

.reason-card {
    text-align: center;
    padding: 2rem;
}

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

.reason-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.reason-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Testimonials */
.testimonials {
    padding: 4rem 0;
    background: var(--bg-light);
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.testimonial p {
    font-style: italic;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author h4 {
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.author p {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-style: normal;
    margin: 0;
}

/* CTA Section */
.cta {
    background: var(--primary-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary.large {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary-color);
}

.btn-primary.large:hover {
    background: rgba(255,255,255,0.9);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-logo {
    height: auto;
    max-height: 34px;
    width: auto;
    max-width: 160px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

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

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

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Utility Classes */
.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--text-dark);
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* SEO and accessibility improvements */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1001;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Authentication System Styles */

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.auth-modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    margin: 2rem;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

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

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* Auth Forms */
.auth-form {
    padding: 2rem;
}

.auth-form h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

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

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

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: all 0.2s;
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 2px;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    cursor: pointer;
}

/* Auth Buttons */
.btn-auth-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-auth-primary:hover {
    background: #e53e3e;
    transform: translateY(-1px);
}

.btn-google {
    width: 100%;
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-google:hover {
    background: var(--bg-light);
    border-color: var(--text-gray);
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.auth-divider span {
    background: var(--bg-white);
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

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

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

/* Auth Buttons in Navigation */
.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-avatar,
.user-avatar-large {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name-large {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-menu {
    padding: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
    position: relative;
}

.dropdown-item:hover {
    background: rgba(255, 71, 66, 0.1);
    color: var(--primary-color);
}

.dropdown-icon {
    font-size: 1rem;
}

.dropdown-badge {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    font-weight: 600;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
    z-index: 2;
}

.favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

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

/* Notifications */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 320px;
    max-width: 400px;
    animation: notificationSlideIn 0.3s ease-out;
}

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

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-gray);
    margin-left: 1rem;
}

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

/* Dark mode support for auth components */
[data-theme="dark"] .auth-modal-content {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .auth-divider span {
    background: var(--bg-white);
}

[data-theme="dark"] .btn-google {
    background: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .user-dropdown {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(55, 65, 81, 0.3);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .user-menu-trigger {
    background: rgba(55, 65, 81, 0.3);
    border-color: rgba(55, 65, 81, 0.5);
}

[data-theme="dark"] .user-menu-trigger:hover {
    background: rgba(55, 65, 81, 0.5);
}

[data-theme="dark"] .notification {
    background: var(--bg-white);
    border-color: var(--border-color);
}

}

/* iPhone 大屏尺寸优化 (414px - 480px) */
@media (max-width: 480px) and (min-width: 415px) {
    .navbar .container {
        padding: 0.75rem 18px;
    }
    
    .nav-logo-img {
        max-height: 30px;
        max-width: 130px;
    }
    
    .hamburger {
        min-width: 42px;
        min-height: 42px;
    }
    
    .theme-toggle,
    .lang-toggle {
        min-width: 38px;
        min-height: 38px;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* iPhone 标准屏尺寸优化 (375px - 414px) */
@media (max-width: 414px) and (min-width: 376px) {
    .navbar .container {
        padding: 0.75rem 16px;
    }
    
    .nav-logo-img {
        max-height: 28px;
        max-width: 120px;
    }
    
    .nav-logo a {
        font-size: 1.125rem;
    }
    
    /* 汉堡菜单优化 */
    .hamburger {
        min-width: 42px;
        min-height: 42px;
        padding: 8px 6px;
    }
    
    .hamburger span {
        width: 22px;
    }
    
    .nav-menu a {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    
    .hero-content {
        padding: 1.5rem 0.75rem;
    }
}

/* iPhone 小屏尺寸优化 (320px - 375px) */
@media (max-width: 375px) {
    .navbar .container {
        padding: 0.625rem 14px;
    }
    
    .nav-logo-img {
        max-height: 26px;
        max-width: 110px;
    }
    
    .nav-logo a {
        font-size: 1rem;
    }
    
    .hamburger {
        min-width: 40px;
        min-height: 40px;
    }
    
    .hamburger span {
        width: 20px;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
    
    .lang-toggle {
        padding: 5px 8px;
        font-size: 0.75rem;
        min-width: 36px;
        min-height: 36px;
    }
    
    .nav-menu {
        padding: 1.25rem;
    }
    
    .nav-menu a {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .hero {
        margin-top: 55px;
    }
    
    .hero h1 {
        font-size: 1.875rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 0.25rem;
    }
    
    .hero-content {
        padding: 1.25rem 0.5rem;
    }
    
    .btn-primary {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* 超小屏幕设备 (320px 及以下) */
@media (max-width: 320px) {
    .navbar .container {
        padding: 0.5rem 12px;
    }
    
    .nav-logo-img {
        max-height: 24px;
        max-width: 100px;
    }
    
    .nav-logo a {
        font-size: 0.95rem;
    }
    
    .hamburger {
        min-width: 38px;
        min-height: 38px;
    }
    
    .hamburger span {
        width: 18px;
    }
    
    .theme-toggle {
        width: 34px;
        height: 34px;
    }
    
    .lang-toggle {
        padding: 4px 6px;
        font-size: 0.7rem;
        min-width: 34px;
        min-height: 34px;
    }
    
    .nav-buttons {
        gap: 0.25rem;
    }
    
    .nav-menu {
        padding: 1rem;
    }
    
    .nav-menu a {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-content {
        padding: 1rem 0.375rem;
    }
}

/* 认证系统移动端优化 */
@media (max-width: 480px) {
    .auth-modal-content {
        margin: 1rem;
        max-width: none;
        max-width: calc(100vw - 2rem);
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .notification {
        min-width: 280px;
        max-width: calc(100vw - 2rem);
        margin: 0 1rem;
    }
    
    .user-dropdown {
        right: -12px;
        min-width: 200px;
        max-width: calc(100vw - 2rem);
    }
}

/* ===== 移动端导航优化 - 修复版 ===== */

/* iPad 横屏优化 (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .navbar .container {
        padding: 0.875rem 20px;
    }
    
    /* 桌面导航布局，但更紧凑 */
    .nav-menu {
        gap: 1.25rem;
        display: flex;
        list-style: none;
    }
    
    .nav-menu a {
        padding: 6px 12px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .nav-buttons {
        gap: 0.75rem;
    }
    
    /* 隐藏汉堡菜单，在iPad横屏使用桌面布局 */
    .hamburger {
        display: none !important;
    }
    
    /* 语言选择器和主题按钮优化 */
    .lang-toggle {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
}

/* iPad 竖屏和小平板 (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .navbar .container {
        padding: 0.875rem 16px;
        position: relative;
    }
    
    /* 显示汉堡菜单 */
    .hamburger {
        display: flex !important;
    }
    
    /* 在iPad尺寸显示汉堡菜单，隐藏桌面导航 */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 71, 66, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        z-index: 999;
        transform: translateY(-10px);
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-menu.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-menu a {
        padding: 1rem 1.25rem;
        margin: 0.25rem 0;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-dark);
        text-align: left;
        border: 1px solid transparent;
        transition: all 0.2s ease;
    }
    
    .nav-menu a:hover,
    .nav-menu a:focus {
        background: rgba(255, 71, 66, 0.08);
        border-color: rgba(255, 71, 66, 0.2);
        color: var(--primary-color);
    }
    
    /* 显示汉堡菜单 */
    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 4px;
        padding: 8px;
        border-radius: 6px;
        transition: all 0.3s ease;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
    }
    
    .hamburger:hover {
        background: rgba(255, 71, 66, 0.1);
    }
    
    .hamburger span {
        width: 22px;
        height: 2px;
        background: var(--text-dark);
        transition: all 0.3s ease;
        border-radius: 1px;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        background: var(--primary-color);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
        background: var(--primary-color);
    }
    
    .nav-buttons {
        gap: 0.5rem;
    }
    
    /* 深色模式支持 - iPad范围 */
    [data-theme="dark"] .nav-menu {
        background: rgba(17, 24, 39, 0.98) !important;
        border-bottom: 1px solid rgba(255, 71, 66, 0.3) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7) !important;
        border: 1px solid rgba(255, 71, 66, 0.2) !important;
    }
    
    [data-theme="dark"] .nav-menu a {
        color: #f8fafc !important;
        border-color: rgba(248, 250, 252, 0.1) !important;
        background: transparent !important;
    }
    
    [data-theme="dark"] .nav-menu a:hover,
    [data-theme="dark"] .nav-menu a:focus {
        background: rgba(255, 71, 66, 0.15) !important;
        border-color: rgba(255, 71, 66, 0.4) !important;
        color: #ffffff !important;
        text-shadow: 0 0 4px rgba(255, 71, 66, 0.3);
    }
    
    [data-theme="dark"] .nav-menu a.active {
        background: linear-gradient(135deg, #ff4742, #e73c47) !important;
        color: #ffffff !important;
        border-color: #ff4742 !important;
    }
    
    [data-theme="dark"] .hamburger span {
        background: #f8fafc !important;
    }
    
    [data-theme="dark"] .hamburger.active span {
        background: #ff4742 !important;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
    
    .lang-toggle {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .nav-logo-img {
        max-height: 36px;
        max-width: 160px;
    }
}

/* 移动设备主要断点 (767px 及以下) */
@media (max-width: 767px) {
    /* 导航栏基础优化 */
    .navbar {
        padding: 0;
        border-bottom: 1px solid rgba(255, 71, 66, 0.1);
    }
    
    .navbar .container {
        padding: 0.75rem 16px;
        position: relative;
    }
    
    /* 显示汉堡菜单 */
    .hamburger {
        display: flex !important;
    }
    
    /* 隐藏桌面导航菜单，配置移动端菜单 */
    .nav-menu {
        display: none;
        position: fixed; /* 改为fixed确保不被其他元素遮挡 */
        top: 100%;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 80px); /* 限制最大高度 */
        overflow-y: auto; /* 允许滚动 */
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 71, 66, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); /* 增强阴影 */
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        z-index: 1000; /* 提高z-index */
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden; /* 添加visibility控制 */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* 激活状态的移动菜单 */
    .nav-menu.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        top: calc(100% + 0px); /* 紧贴导航栏下方 */
    }
    
    /* 移动端导航链接样式 */
    .nav-menu a {
        padding: 1rem 1.25rem;
        margin: 0.25rem 0;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-dark);
        text-align: left;
        border: 1px solid transparent;
        transition: all 0.3s ease;
        min-height: 44px; /* 触摸友好 */
        display: flex;
        align-items: center;
    }
    
    .nav-menu a:hover,
    .nav-menu a:focus {
        background: rgba(255, 71, 66, 0.08);
        border-color: rgba(255, 71, 66, 0.2);
        color: var(--primary-color);
    }
    
    .nav-menu a.active {
        background: linear-gradient(135deg, var(--primary-color), #e73c47);
        color: white;
        font-weight: 600;
    }
    
    .nav-menu a.active::after {
        display: none;
    }
    
    /* 深色模式移动菜单 - 增强对比度 */
    
    /* 显示汉堡菜单按钮 */
    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 4px;
        padding: 8px;
        border-radius: 6px;
        transition: all 0.3s ease;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }
    
    .hamburger:hover {
        background: rgba(255, 71, 66, 0.1);
    }
    
    .hamburger span {
        width: 24px;
        height: 2px;
        background: var(--text-dark);
        transition: all 0.3s ease;
        border-radius: 1px;
    }
    
    /* 激活状态的汉堡菜单动画 */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        background: var(--primary-color);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
        background: var(--primary-color);
    }
    
    /* 导航按钮区域优化 */
    .nav-buttons {
        gap: 0.375rem;
        align-items: center;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    
    .lang-toggle {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    /* Logo 优化 */
    .nav-logo-img {
        max-height: 32px;
        max-width: 140px;
    }
    
    .nav-logo a {
        font-size: 1.25rem;
    }
    
    /* 用户菜单移动端优化 */
    .user-name {
        display: none;
    }
    
    .user-menu-trigger {
        padding: 6px 8px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .user-dropdown {
        right: -8px;
        min-width: 220px;
    }
}
    
    .hero {
        min-height: 90vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
        margin-top: 3rem;
    }
    
    .stat h3 {
        font-size: 2rem;
    }
    
    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: center;
    }
    
    .city-metrics {
        grid-template-columns: 1fr;
    }
}

/* ===== 汉堡菜单 - 完整修复版本 ===== */

/* 汉堡菜单基础样式 */
.hamburger {
    display: none; /* 默认在桌面端隐藏 */
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
    border: none;
    min-width: 44px; /* 触摸友好的最小尺寸 */
    min-height: 44px;
    align-items: center;
    justify-content: center;
    z-index: 1001; /* 确保在导航菜单之上 */
    position: relative;
}

.hamburger:hover {
    background: rgba(255, 71, 66, 0.1);
    transform: scale(1.05);
}

.hamburger:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
    transform-origin: center;
}

/* 汉堡菜单激活状态动画 */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--primary-color);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: var(--primary-color);
}

/* 深色模式汉堡菜单 */
[data-theme="dark"] .hamburger span {
    background: var(--text-dark); /* 在深色模式下使用白色 */
}

[data-theme="dark"] .hamburger:hover {
    background: rgba(55, 65, 81, 0.3);
}

[data-theme="dark"] .hamburger.active span:nth-child(1),
[data-theme="dark"] .hamburger.active span:nth-child(3) {
    background: var(--primary-color);
}

/* 移动端汉堡菜单覆盖层，防止滚动 */
/* 移动端汉堡菜单覆盖层，防止滚动 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* 增加透明度 */
    backdrop-filter: blur(6px); /* 增强模糊效果 */
    -webkit-backdrop-filter: blur(6px);
    z-index: 999; /* 确保在导航菜单之下，但在其他内容之上 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 使用更流畅的动画 */
    pointer-events: none; /* 初始状态不接收点击事件 */
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* 激活状态接收点击事件 */
}

/* Dark模式 mobile overlay */
[data-theme="dark"] .mobile-menu-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 防止菜单打开时页面滚动 */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}
/* ===== 最终移动端导航修复 - 覆盖所有冲突 ===== */

/* 清除所有汉堡菜单冲突 */
.hamburger {
    display: none !important;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--primary-color);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: var(--primary-color);
}

.hamburger:hover {
    background: rgba(255, 71, 66, 0.1);
}

/* 移动端导航显示规则 */
@media (max-width: 1023px) {
    .hamburger {
        display: flex !important;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        z-index: 1000;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex !important;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
        text-align: left;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 0;
        margin: 0;
    }
    
    .nav-menu a:hover {
        background: rgba(255, 71, 66, 0.1);
        border-bottom-color: var(--primary-color);
    }
}

/* 桌面端导航 */
@media (min-width: 1024px) {
    .hamburger {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
        position: static;
        width: auto;
        background: none;
        backdrop-filter: none;
        border: none;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
    }
    
    .nav-menu li {
        width: auto;
    }
    
    .nav-menu a {
        padding: 8px 16px;
        border: none;
        border-radius: 12px;
        text-align: center;
    }
}

/* Dark模式移动端菜单 */
[data-theme="dark"] .hamburger span {
    background: #f8fafc !important;
}

[data-theme="dark"] .hamburger.active span:nth-child(1),
[data-theme="dark"] .hamburger.active span:nth-child(3) {
    background: #ff4742 !important;
}

[data-theme="dark"] .nav-menu {
    background: rgba(17, 24, 39, 0.98) !important;
    border-color: rgba(255, 71, 66, 0.3) !important;
}

[data-theme="dark"] .nav-menu a {
    color: #f8fafc !important;
    border-color: rgba(255, 71, 66, 0.1) !important;
}

[data-theme="dark"] .nav-menu a:hover {
    background: rgba(255, 71, 66, 0.15) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .nav-menu a.active {
    background: linear-gradient(135deg, #ff4742, #e73c47) !important;
    color: #ffffff !important;
}

/* ===== Pomodoro Timer UI优化 ===== */

/* 覆盖现有的Pomodoro Timer样式 */
.pomodoro-timer {
    max-width: 600px !important;
    margin: 0 auto !important;
    padding: 2rem !important;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.9) 100%) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 71, 66, 0.15) !important;
    box-shadow: 
        0 16px 40px rgba(255, 71, 66, 0.12),
        0 6px 20px rgba(0, 0, 0, 0.08) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Pomodoro Timer内部布局优化 */
.timer-display {
    text-align: center !important;
    margin-bottom: 2rem !important;
}

.timer-circle {
    width: 200px !important;
    height: 200px !important;
    margin: 0 auto 1.5rem !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, 
        rgba(255, 71, 66, 0.1) 0%, 
        rgba(255, 71, 66, 0.05) 100%) !important;
    border: 3px solid rgba(255, 71, 66, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-shadow: 
        0 12px 30px rgba(255, 71, 66, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.8) !important;
}

.timer-time {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    text-shadow: 0 2px 4px rgba(255, 71, 66, 0.2) !important;
}

.timer-controls {
    display: flex !important;
    gap: 1rem !important;
    justify-content: center !important;
    margin: 1.5rem 0 !important;
}

.btn-timer-main {
    padding: 0.875rem 2rem !important;
    background: linear-gradient(135deg, var(--primary-color), #e73c47) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(255, 71, 66, 0.3) !important;
    min-width: 120px !important;
    min-height: 44px !important;
}

.btn-timer-main:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 71, 66, 0.4) !important;
}

.btn-timer-secondary {
    padding: 0.875rem 1.5rem !important;
    background: rgba(255, 71, 66, 0.1) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(255, 71, 66, 0.3) !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-width: 100px !important;
    min-height: 44px !important;
}

.btn-timer-secondary:hover {
    background: rgba(255, 71, 66, 0.15) !important;
    border-color: rgba(255, 71, 66, 0.4) !important;
}

.mode-selector {
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
    margin-bottom: 2rem !important;
}

.mode-btn {
    padding: 0.5rem 1rem !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 71, 66, 0.2) !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-height: 40px !important;
}

.mode-btn.active {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.mode-btn:hover {
    background: rgba(255, 71, 66, 0.1) !important;
    border-color: rgba(255, 71, 66, 0.3) !important;
}

/* Dark模式下的Pomodoro Timer */
[data-theme="dark"] .pomodoro-timer {
    background: linear-gradient(145deg, 
        rgba(17, 24, 39, 0.95) 0%, 
        rgba(31, 41, 55, 0.9) 100%) !important;
    border-color: rgba(255, 71, 66, 0.3) !important;
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.4),
        0 6px 20px rgba(255, 71, 66, 0.1) !important;
}

[data-theme="dark"] .timer-circle {
    background: linear-gradient(135deg, 
        rgba(255, 71, 66, 0.15) 0%, 
        rgba(255, 71, 66, 0.08) 100%) !important;
    border-color: rgba(255, 71, 66, 0.4) !important;
    box-shadow: 
        0 12px 30px rgba(255, 71, 66, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .timer-time {
    color: #f8fafc !important;
    text-shadow: 0 2px 4px rgba(255, 71, 66, 0.3) !important;
}

[data-theme="dark"] .mode-btn {
    background: rgba(55, 65, 81, 0.8) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 71, 66, 0.3) !important;
}

[data-theme="dark"] .mode-btn:hover {
    background: rgba(255, 71, 66, 0.15) !important;
    border-color: rgba(255, 71, 66, 0.4) !important;
}

/* 移动端Pomodoro Timer优化 */
@media (max-width: 767px) {
    .pomodoro-timer {
        padding: 1.5rem !important;
        margin: 0.5rem !important;
        border-radius: 20px !important;
    }
    
    .timer-circle {
        width: 160px !important;
        height: 160px !important;
    }
    
    .timer-time {
        font-size: 2rem !important;
    }
    
    .timer-controls {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .btn-timer-main,
    .btn-timer-secondary {
        width: 100% !important;
        max-width: 200px !important;
    }
    
    .mode-selector {
        flex-wrap: wrap !important;
    }
}
