/* css/style.css */
:root {
    /* Enhanced Color Palette */
    --primary-color: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary-color: #64748b;
    --accent-color: #06d6a0;
    --accent-light: #40e0d0;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --success-color: #10b981;
    --light-text: #ffffff;
    --dark-text: #1e293b;
    --medium-text: #475569;
    --light-bg: #f8fafc;
    --lighter-bg: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.7;
    
    /* Spacing & Layout */
    --container-max-width: 1280px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --transition-speed: 0.3s;
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Enhanced Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --card-shadow: var(--shadow-md);
    --card-hover-shadow: var(--shadow-xl);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #06d6a0 0%, #118ab2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #06d6a0 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

/* Basic Reset & Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-base);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--dark-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    padding-top: 80px; /* Add padding to compensate for fixed header */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(6, 214, 160, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    transform: translateY(-1px);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-sm);
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
}

.section-padding {
    padding: 6rem 0;
}

.bg-light {
    background: var(--gradient-card);
    position: relative;
}

.bg-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23e2e8f0" fill-opacity="0.3"><circle cx="30" cy="30" r="1"/></g></svg>') repeat;
    opacity: 0.5;
    pointer-events: none;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.25rem;
    text-align: center;
    color: var(--medium-text);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    line-height: 1.8;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-bounce);
    border: none;
    font-size: 1rem;
    font-family: var(--font-family);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    transform: skewX(-20deg);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--light-text);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--gradient-accent);
    color: var(--light-text);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    filter: brightness(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: var(--light-text);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-danger:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    filter: brightness(1.1);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
    min-width: 180px;
}

.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    min-width: 100px;
}

.btn i {
    margin-right: 0.5rem;
    font-size: 1.1em;
}


/* Enhanced Header & Navigation */
header {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s ease;
}

/* Scrolled state for header */
body.scrolled header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-wrap: wrap; /* 允许在小屏幕上换行 */
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

body.scrolled header nav {
    padding: 0.5rem 2rem;
}

header ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.5rem; /* Revert gap for navigation links to original */
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem; /* Keep user actions compact */
    flex-shrink: 0; /* Prevent shrinking */
}

/* Logo Styles - Anthropic Style */
header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

.logo-text {
    position: relative;
    display: inline-block;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    letter-spacing: -0.02em;
}

.logo-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #4f46e5, #06d6a0, #ef4444, #f59e0b);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Scroll Animation States */
body.scrolled .logo-text {
    transform: scale(0.9) translateY(-2px);
}

body.scrolled .logo-text::before {
    opacity: 1;
    transform: translateY(0);
}

body.scrolled .logo-text {
    -webkit-text-fill-color: transparent;
    background: linear-gradient(45deg, #4f46e5, #06d6a0, #ef4444, #f59e0b);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

/* Hover Effects */
header .logo:hover .logo-text {
    transform: scale(1.05) translateY(-1px);
}

header .logo:hover .logo-text::before {
    opacity: 1;
    transform: translateY(0) scale(1.1);
}

header ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

header ul li a {
    color: var(--dark-text);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    position: relative;
    transition: all var(--transition-speed) ease;
    border-radius: var(--border-radius-sm);
    text-transform: capitalize;
}

header ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-sm);
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-speed) var(--transition-bounce);
    z-index: -1;
}

header ul li a:hover::before {
    opacity: 0.1;
    transform: scale(1);
}

header ul li a.active::before {
    opacity: 0.05;
    transform: scale(1);
}

header ul li a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

header ul li a.active {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(79, 70, 229, 0.08);
    transform: none; /* Remove the translateY for active state */
}

/* Dropdown Navigation */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--light-text);
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    border-radius: var(--border-radius-sm);
    padding: 10px 0;
    top: 100%; /* Position below the parent link */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dropdown-content a {
    color: var(--dark-text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0; /* Remove border-radius for individual links in dropdown */
}

.dropdown-content a:hover {
    background-color: var(--lighter-bg);
    color: var(--primary-color);
    transform: translateX(0); /* Remove translateY on hover for dropdown items */
    text-decoration: none;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown .fa-caret-down {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown:hover .fa-caret-down {
    transform: rotate(180deg);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.level-selector {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%234f46e5%22%20d%3D%22M287%20197.4L159.3%2069.7c-4.7-4.7-12.3-4.7-17%200L5.4%20197.4c-4.7%204.7-4.7%2012.3%200%2017l19.8%2019.8c4.7%204.7%2012.3%204.7%2017%200l118.8-118.7L249.2%20234.2c4.7%204.7%2012.3%204.7%2017%200l19.8-19.8c4.7-4.7%204.7-12.3%200-17z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.75rem;
    padding-right: 2.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed) ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.level-selector:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.level-selector:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Enhanced Hero Section */
.hero {
    background: var(--gradient-hero);
    color: var(--dark-text);
    padding: 8rem 0;
    overflow: hidden;
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="25" cy="25" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="75" cy="75" r="0.5" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 700px;
    animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #1e293b 0%, #4f46e5 50%, #06d6a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-content h1 .highlight {
    position: relative;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-content h1 .highlight::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    animation: underlineExpand 1.5s ease-out 0.5s forwards;
}

@keyframes underlineExpand {
    to { transform: scaleX(1); }
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    color: rgba(30, 41, 59, 0.8);
    line-height: 1.8;
    font-weight: 400;
}

.hero-illustration {
    flex: 1;
    max-width: 550px;
    position: relative;
    animation: slideInRight 1s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-illustration img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-speed) ease;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
}

.hero-illustration:hover img {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero-illustration::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: var(--gradient-accent);
    border-radius: var(--border-radius-lg);
    opacity: 0.1;
    z-index: -1;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.1; transform: scale(1); }
    to { opacity: 0.2; transform: scale(1.02); }
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    /* 初始状态，由JS控制可见性 */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.hero-stats.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(30, 41, 59, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Enhanced Features Overview */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.feature-card {
    background: var(--gradient-card);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: all var(--transition-speed) var(--transition-bounce);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transition: all var(--transition-speed) ease;
    transform: scaleX(0);
    transform-origin: left;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: all var(--transition-speed) ease;
    pointer-events: none;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: rgba(79, 70, 229, 0.2);
}

.feature-card-icon {
    margin-bottom: 2rem;
    position: relative;
}

.feature-card-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--gradient-accent);
    border-radius: 50%;
    opacity: 0.1;
    transition: all var(--transition-speed) ease;
}

.feature-card:hover .feature-card-icon::before {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.2;
}

.feature-card-icon img {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-speed) ease;
    position: relative;
    z-index: 2;
}

.feature-card:hover .feature-card-icon img {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card p {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--medium-text);
    line-height: 1.7;
    min-height: 6rem;
}

.feature-card .btn {
    margin-top: auto;
    transform: translateY(10px);
    opacity: 0.8;
    transition: all var(--transition-speed) ease;
}

.feature-card:hover .btn {
    transform: translateY(0);
    opacity: 1;
}

/* Enhanced Levels Overview */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.level-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(79, 70, 229, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.level-card:hover::before {
    opacity: 1;
}

.level-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: rgba(79, 70, 229, 0.3);
}

.level-icon {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.level-card h3 {
    color: var(--dark-text);
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.level-card p {
    color: var(--medium-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.level-card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
    position: relative;
    z-index: 2;
}

.level-card li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--medium-text);
    font-size: 0.95rem;
}

.level-card li i {
    color: var(--accent-color);
    font-size: 0.875rem;
}

.level-card .btn {
    position: relative;
    z-index: 2;
    margin-top: 1rem;
}

/* Enhanced Testimonial Section */
.testimonial-section {
    position: relative;
    overflow: hidden;
    display: flex; /* 使内容居中 */
    flex-direction: column; /* 垂直排列 */
    align-items: center; /* 水平居中 */
}

.testimonial-slider {
    display: flex;
    gap: 2.5rem;
    overflow-x: auto;
    padding: 2rem 1rem; /* 添加左右padding确保内容不被截断 */
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%; /* 占据可用宽度 */
    max-width: var(--container-max-width); /* 限制最大宽度 */
    justify-content: flex-start; /* 改为左对齐，确保第一个项目完全可见 */
}

.testimonial-slider::-webkit-scrollbar {
    display: none;
}

.testimonial-item {
    min-width: 400px;
    max-width: 500px;
    min-height: 350px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    scroll-snap-align: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.testimonial-rating {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.testimonial-rating i {
    color: #fbbf24;
    font-size: 1.25rem;
}

.testimonial-item p {
    font-style: italic;
    margin-bottom: 2rem;
    color: var(--medium-text);
    line-height: 1.7;
    font-size: 1.1rem;
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.testimonial-item p::before {
    content: '"';
    font-size: 4rem;
    color: var(--accent-color);
    position: absolute;
    top: -1rem;
    left: -1rem;
    opacity: 0.3;
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.1);
}

.author-info {
    text-align: left;
}

.author-info strong {
    display: block;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.25rem;
}

.author-info span {
    display: block;
    font-weight: 500;
    color: var(--medium-text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.testimonial-item h4 {
    color: var(--dark-text);
    font-weight: 700;
    font-size: 1rem;
}

.author-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--medium-text);
}

.author-location i {
    color: var(--accent-color);
}

.testimonial-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-prev,
.testimonial-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.testimonial-dots {
    display: flex;
    gap: 0.75rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent-color);
    transform: scale(1.2);
}


/* General Page Content (for shadowing, narration etc.) */
.page-content {
    flex-grow: 1;
    padding-top: 2.5rem;
}
.module-header {
    text-align: center;
    margin-bottom: 3rem;
}

.content-area {
    background-color: var(--light-text);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.card {
    background-color: var(--light-text);
    padding: 1.8rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

/* Layouts for specific pages (Shadowing, Narration, Presentation) */
.shadowing-layout, .narration-layout, .presentation-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.item-list {
    list-style: none;
    padding: 0;
}
.item-list-link {
    display: block;
    padding: 0.8rem 1rem;
    margin-bottom: 0.6rem;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
    font-weight: 500;
    color: var(--dark-text);
}
.item-list-link:hover, .item-list-link.active-item {
    background-color: #e9f5ff;
    border-left: 0.3rem solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 123, 255, 0.1);
}
.illustration-sidebar {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}
.illustration-sidebar img {
    border-radius: var(--border-radius);
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.1);
}

/* Narration Page Specific Styles */
.narration-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

.topic-selection-sidebar {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 100px;
}

.topic-selection-sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.item-list li {
    margin-bottom: 8px;
}

.item-list-link {
    display: block;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 2px solid transparent;
}

.item-list-link:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(5px);
}

.item-list-link.active-item {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.narration-practice-zone {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.narration-input-area textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.narration-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.ai-suggestions-panel {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-left: 4px solid var(--primary-color);
}

.ai-suggestions-panel h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#ai-suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#ai-suggestions-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
    color: var(--text-color);
}

#ai-suggestions-list li:last-child {
    border-bottom: none;
}

#ai-suggestions-list li strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

/* Specific styles for vocabulary list to display 5 words per line */
.vocab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Adjust gap as needed */
    padding: 0; /* Remove default padding */
    list-style: none; /* Remove list bullets */
}

.vocab-list li {
    flex: 0 0 calc(20% - 8px); /* Calculate width for 5 items per row, accounting for gap */
    text-align: center;
    background-color: var(--lighter-bg); /* Add a subtle background */
    border-radius: var(--border-radius-sm); /* Rounded corners */
    box-shadow: var(--shadow-sm); /* Small shadow */
    padding: 8px 5px; /* Adjust padding for better appearance */
    transition: all 0.2s ease;
    margin-bottom: 0; /* Remove default margin-bottom from #ai-suggestions-list li */
    list-style-type: none; /* Remove the bullet point */
}

.vocab-list li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Suggestion Sections */
.suggestion-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-section:nth-child(2) {
    border-left-color: #2196F3;
}

.suggestion-section:nth-child(3) {
    border-left-color: #FF9800;
}

.suggestion-section h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-section ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.suggestion-section li {
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: none;
    line-height: 1.5;
}

.suggestion-section li span {
    color: #333;
    font-size: 0.95rem;
}

.controls-panel {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.controls-panel .btn {
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ai-feedback-section {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-left: 4px solid var(--accent-color);
}

.scores-grid {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.score-item {
    text-align: center;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.score-item strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.illustration-sidebar img {
    width: 100%;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: var(--shadow-light);
}

/* Recording states */
.btn.recording {
    background: var(--danger-color) !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Footer Styles */
footer {
    background: var(--dark-text);
    color: var(--light-text);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto; /* Pushes footer to the bottom */
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

footer p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

footer a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

footer a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Responsive design for narration page */
@media (max-width: 768px) {
    .narration-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .topic-selection-sidebar {
        position: static;
        order: -1;
    }
    
    .controls-panel {
        flex-direction: column;
    }
    
    .controls-panel .btn {
        width: 100%;
        min-width: auto;
    }
    
    .scores-grid {
        grid-template-columns: 1fr;
    }
}

/* Nav Toggle (Mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 35px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 20px;
    position: relative;
    z-index: 1100;
}
.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--dark-text);
    margin-bottom: 6px;
    border-radius: 3px;
    transition: transform var(--transition-speed), opacity var(--transition-speed);
}
.nav-toggle.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile-first adjustments for general layout */
@media (max-width: 768px) {
    /* Base font size adjustment for mobile */
    body {
        font-size: 14px; /* Reduced from 16px */
        line-height: 1.6;
        padding-top: 70px; /* Adjust for smaller header on mobile */
    }
    
    .container {
        padding: 0 1rem; /* Reduced padding for mobile */
    }
    
    .nav-toggle { display: flex; }
    
    header nav {
        flex-direction: row; /* Keep logo and toggle on one row */
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem; /* Adjust padding for smaller screens */
    }
    
    /* Hide desktop navigation and user actions on mobile */
    header nav > ul {
        display: none;
    }
    
    header nav .user-actions {
        display: none;
    }

    header nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--light-text);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-speed) ease-in-out;
        box-shadow: var(--card-shadow);
        border-top: 1px solid var(--border-color);
        z-index: 999; /* Ensure it's above other content */
    }
    header nav ul.open {
        max-height: 600px; /* Sufficient height for all links */
        /* When the nav is open, ensure user-actions are also visible and part of the flow */
        display: flex; /* Ensure it's a flex container when open */
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start; /* Align items to the start */
    }
 
    header nav ul li {
        width: 100%; /* Full width for list items */
        margin-bottom: 10px; /* Add some spacing */
    }
 
    header nav ul li a {
        padding: 10px 15px; /* Adjust link padding */
        width: 100%;
    }
 
    .dropdown-content {
        position: static; /* Allow dropdown content to flow naturally */
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
        background-color: transparent;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }
 
    .dropdown:hover .dropdown-content,
    .dropdown.open .dropdown-content { /* Add .open class for JS control */
        display: block;
        opacity: 1;
        visibility: visible;
        max-height: 200px; /* Adjust as needed */
    }
 
    .dropdown-content a {
        padding-left: 30px; /* Indent dropdown items */
        background-color: var(--lighter-bg);
        border-radius: var(--border-radius-sm);
        margin-bottom: 5px;
    }
 
    .user-actions {
        display: none; /* Hide user actions in mobile nav by default */
        flex-direction: row;
        width: 100%;
        gap: 0.5rem;
        margin-top: 15px;
        flex-wrap: wrap;
    }

    .user-actions.open { /* Show user actions when the nav is open */
        display: flex;
    }
 
    .user-actions .level-selector {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .user-actions .btn {
        flex: 1;
        min-width: 80px;
        max-width: 120px;
    }

    /* Hero Section */
    .hero {
        padding: 4rem 0;
        min-height: auto;
    }

    .hero-container {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2rem; /* Reduced from 2.5rem */
        margin-bottom: 1.2rem;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 0.9rem; /* Reduced from 1rem */
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }

    .hero-buttons {
        flex-direction: row; /* 将列改为行 */
        justify-content: center; /* 居中对齐 */
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        min-width: auto;
    }

    .hero-illustration {
        max-width: 80%; /* Adjust illustration size */
        margin: 0 auto;
    }

    .hero-stats {
        flex-direction: row; /* 将列改为行 */
        justify-content: space-around; /* 均匀分布项目 */
        gap: 1rem; /* 调整间距 */
        margin-top: 2rem;
        flex-wrap: wrap; /* 允许项目换行 */
    }

    .stat-number {
        font-size: 1.6rem; /* Reduced from 2rem */
    }
    
    .stat-label {
        font-size: 0.8rem; /* Smaller stat labels */
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* 两列布局 */
        gap: 1rem; /* 调整间距，使其更紧凑 */
    }

    .feature-card {
        padding: 1rem; /* 缩小卡片内边距 */
    }

    .feature-card-icon {
        margin-bottom: 0.8rem; /* 缩小图标下边距 */
    }

    .feature-card-icon::before {
        width: 60px; /* 缩小背景圆圈 */
        height: 60px;
    }

    .feature-card-icon i {
        font-size: 1.2rem !important; /* 进一步缩小图标 */
    }

    .feature-card h3 {
        font-size: 1rem; /* 缩小标题 */
        margin-bottom: 0.5rem;
    }
    
    .feature-card p {
        display: none; /* 隐藏小字 */
        min-height: auto; /* Remove fixed height on mobile */
    }
    
    .feature-card .btn {
        font-size: 0.7rem; /* 缩小按钮文字 */
        padding: 0.5rem 1rem; /* 缩小按钮内边距 */
    }

    /* Levels Grid */
    .levels-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 2rem;
    }

    /* Testimonial Section */
    .testimonial-slider {
        padding: 1rem 0.5rem; /* Adjust padding for smaller screens */
        gap: 1.5rem;
    }

    .testimonial-item {
        min-width: 90%; /* Make testimonial items take more width */
        max-width: 90%;
        padding: 1.5rem;
        min-height: auto;
    }

    .testimonial-item p {
        font-size: 1rem;
    }

    .testimonial-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    /* General Section Titles */
    .section-title {
        font-size: 1.8rem; /* Reduced from 2.2rem */
        margin-bottom: 1rem;
        line-height: 1.3;
    }

    .section-subtitle {
        font-size: 0.9rem; /* Reduced from 1rem */
        margin-bottom: 1.5rem;
        line-height: 1.4;
    }
    
    /* Feature cards text adjustment */
    /* This block is now handled by the .feature-card-icon i rule above */
    /* .feature-card-icon i {
        font-size: 2rem !important;
    } */

    /* This block is now handled by the .feature-card h3 rule above */
    /* .feature-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    } */
    
    /* This block is now handled by the .feature-card p rule above */
    /* .feature-card p {
        display: none;
        min-height: auto;
    } */
    
    /* Button text adjustment */
    /* This block is now handled by the .feature-card .btn rule above */
    /* .btn {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    } */
    
    /* Navigation text adjustment */
    header nav ul li a {
        font-size: 0.9rem; /* Smaller nav text */
    }
    
    /* Card content adjustments */
    .card h3, .level-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .card p, .level-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Form elements adjustment */
    input, textarea, select {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    /* Testimonial text adjustment */
    .testimonial-item p {
        font-size: 0.85rem !important; /* Override existing rule */
        line-height: 1.4;
    }
    
    .testimonial-item .author {
        font-size: 0.8rem;
    }


    /* Specific page layouts (shadowing, narration, presentation) */
    .shadowing-layout, .presentation-layout {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .video-selection-sidebar, .ppt-upload-sidebar {
        order: -1; /* Move sidebar to top on mobile */
    }

    .video-player-container, .ppt-display-area {
        margin-bottom: 1.5rem;
    }

    .controls-panel {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .controls-panel .btn {
        width: 100%;
        min-width: auto;
    }

    .video-controls-row, .recording-controls-row, .navigation-controls-row {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .video-controls-row .btn, .recording-controls-row .btn, .navigation-controls-row .btn {
        width: 100%;
    }

    .recording-cache-section, .merged-recording-section, .ai-feedback-section {
        padding: 1.5rem;
    }

    .ai-chat-container .chat-input-area {
        flex-direction: column;
        gap: 10px;
    }

    .ai-chat-container .chat-input-area input {
        width: 100%;
    }

    .ai-chat-container .chat-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .ai-chat-container .chat-buttons .btn {
        width: 100%;
    }

    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
    }
}

/* Additional mobile optimizations for smaller screens */
@media (max-width: 480px) {
    /* Even smaller font sizes for very small screens */
    body {
        font-size: 13px;
        padding-top: 65px; /* Further adjust for very small screens */
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 0.8rem;
        margin-bottom: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .section-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.2rem;
    }
    
    .feature-card, .level-card {
        padding: 1.5rem;
    }
    
    .feature-card h3, .level-card h3 {
        font-size: 1rem;
    }
    
    .feature-card p, .level-card p {
        font-size: 0.8rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Improve spacing for small screens */
    .hero {
        padding: 3rem 0;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .testimonial-item {
        padding: 1.2rem;
        min-width: 95%;
        max-width: 95%;
    }
    
    .testimonial-item p {
        font-size: 0.8rem !important;
    }
    
    .testimonial-item .author {
        font-size: 0.75rem;
    }
    
    /* Adjust form elements for small screens */
    input, textarea, select {
        font-size: 0.85rem;
        padding: 0.6rem;
    }
    
    /* Navigation adjustments */
    header nav {
        padding: 0.5rem 0.75rem;
    }
    
    header nav ul li a {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .dropdown-content a {
        font-size: 0.8rem;
        padding-left: 25px;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-content p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: auto;
        min-width: 120px;
    }
    
    .section {
        padding: 2.5rem 0;
    }
}

/* Icon Font Placeholder (replace with actual icon font or SVGs) */
/* For a real project, consider using Font Awesome or Material Icons */
[class^="icon-"], [class*=" icon-"] {
  /* Using a simple font-family for basic symbols, but ideally use a proper icon font */
  font-family: 'Font Awesome 5 Free', 'Arial', sans-serif; /* 尝试使用 Font Awesome */
  font-weight: 900; /* For solid icons */
  font-style: normal;
  display: inline-block;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Example icon placeholders - you'd define these with your icon font or SVGs */
.icon-play:before { content: "\f04b"; } /* Font Awesome play icon */
.icon-mic:before { content: "\f130"; } /* Font Awesome microphone icon */
.icon-stop:before { content: "\f04d"; } /* Font Awesome stop icon */
.icon-play-user:before { content: "\f025"; } /* Font Awesome volume up icon */
.icon-next:before { content: "\f061"; } /* Font Awesome arrow right */
.icon-prev:before { content: "\f060"; } /* Font Awesome arrow left */
.icon-ai-feedback:before { content: "\f0eb"; } /* Font Awesome lightbulb */
.icon-lightbulb:before { content: "\f0eb"; } /* Font Awesome lightbulb */
.icon-send:before { content: "\f1d8"; } /* Font Awesome paper-plane */

/* Icon Font Placeholder (replace with actual icon font or SVGs) */
/* For a real project, consider using Font Awesome or Material Icons */
[class^="icon-"], [class*=" icon-"] {
  /* Using a simple font-family for basic symbols, but ideally use a proper icon font */
  font-family: 'Font Awesome 5 Free', 'Arial', sans-serif; /* 尝试使用 Font Awesome */
  font-weight: 900; /* For solid icons */
  font-style: normal;
  display: inline-block;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Example icon placeholders - you'd define these with your icon font or SVGs */
.icon-play:before { content: "\f04b"; } /* Font Awesome play icon */
.icon-mic:before { content: "\f130"; } /* Font Awesome microphone icon */
.icon-stop:before { content: "\f04d"; } /* Font Awesome stop icon */
.icon-play-user:before { content: "\f025"; } /* Font Awesome volume up icon */
.icon-next:before { content: "\f061"; } /* Font Awesome arrow right */
.icon-prev:before { content: "\f060"; } /* Font Awesome arrow left */
.icon-ai-feedback:before { content: "\f0eb"; } /* Font Awesome lightbulb */
.icon-lightbulb:before { content: "\f0eb"; } /* Font Awesome lightbulb */
.icon-send:before { content: "\f1d8"; } /* Font Awesome paper-plane */

/* Voice Input Button Recording State */
.btn.recording {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Guide Box Styles */
.guide-box {
    background-color: #e0f7fa; /* Light cyan background */
    border: 1px solid #00bcd4; /* Cyan border */
    border-left: 5px solid #0097a7; /* Darker cyan left border */
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #006064; /* Dark teal text color */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.guide-box p {
    margin: 0;
    line-height: 1.6;
}

.guide-box strong {
    color: #004d40; /* Even darker teal for strong text */
}

/* User Menu Styles */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.user-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-menu-toggle i.fa-user-circle {
    font-size: 1.5rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--dark-text);
    text-decoration: none;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--medium-text);
}

.dropdown-item:hover i {
    color: var(--primary-color);
}

/* Auth Actions */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-auth-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Additional responsive styles for user menu */
@media (max-width: 768px) {
    .user-dropdown {
        right: -1rem;
        min-width: 180px;
    }
    
    .hero-auth-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .auth-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-menu-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}
