* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Natural, earthy color palette inspired by kungfuretreat.com */
    --primary: #2C5530;
    --primary-dark: #1A3420;
    --primary-light: #3D6B42;
    --accent: #8B6F47;
    --accent-dark: #6B5435;
    --accent-light: #A6895F;
    --dark: #1A1A1A;
    --dark-light: #2D2D2D;
    --light: #F8F6F3;
    --white: #FFFFFF;
    --text-primary: #2C2C2C;
    --text-secondary: #5A5A5A;
    --text-light: #8A8A8A;
    --border: #E5E0D8;
    --shadow-sm: 0 2px 8px rgba(44, 85, 48, 0.08);
    --shadow-md: 0 4px 16px rgba(44, 85, 48, 0.12);
    --shadow-lg: 0 8px 32px rgba(44, 85, 48, 0.16);
    --shadow-xl: 0 12px 48px rgba(44, 85, 48, 0.2);
    --gradient-primary: linear-gradient(135deg, #2C5530 0%, #3D6B42 100%);
    --gradient-accent: linear-gradient(135deg, #8B6F47 0%, #A6895F 100%);
    --gradient-hero: linear-gradient(135deg, #1A3420 0%, #2C5530 50%, #1A3420 100%);
    --gradient-nature: linear-gradient(135deg, #F8F6F3 0%, #E5E0D8 100%);
    --bottom-nav-height: 70px;
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    height: -webkit-fill-available;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    background: var(--white);
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-inset-bottom));
    min-height: 100vh;
    min-height: -webkit-fill-available;
    position: relative;
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--transition-base);
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 2rem;
    letter-spacing: 4px;
    animation: fadeInUp 0.6s ease;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(44, 85, 48, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 calc(8px + var(--safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 12px;
    transition: all var(--transition-base);
    min-width: 60px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-base);
}

.nav-item:active::before {
    width: 100%;
    height: 100%;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
    transition: transform var(--transition-base);
}

.nav-item:active .nav-icon {
    transform: scale(0.9);
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Top Navigation (Desktop) */
.top-nav {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    padding: 80px 20px 100px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(44, 85, 48, 0.2) 0%, rgba(26, 52, 32, 0.85) 100%);
    z-index: -1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.03) 35px, rgba(212, 175, 55, 0.03) 70px);
    z-index: -1;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 100%;
    width: 100%;
    animation: fadeInUp 0.8s ease;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(139, 111, 71, 0.2);
    border: 1px solid rgba(139, 111, 71, 0.3);
    border-radius: 50px;
    font-size: 12px;
    color: var(--accent-light);
    margin-bottom: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-title {
    margin-bottom: 20px;
}

.chinese-text {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 12px;
    letter-spacing: 4px;
    text-shadow: 0 4px 20px rgba(139, 111, 71, 0.3);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.english-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--white);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    font-weight: 300;
    line-height: 1.6;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s both;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all var(--transition-base);
    border: 2px solid transparent;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    width: 100%;
    max-width: 280px;
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    width: 100%;
    max-width: 280px;
}

.btn-outline:active {
    background: var(--primary);
    color: var(--white);
    transform: scale(0.98);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(44, 85, 48, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Philosophy Section */
.philosophy {
    padding: 60px 0;
    background: var(--light);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.philosophy-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border-top: 3px solid var(--primary);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.philosophy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.05), transparent);
    transition: left 0.5s;
}

.philosophy-card:hover::before {
    left: 100%;
}

.philosophy-card:active {
    transform: scale(0.98);
}

.philosophy-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: inline-block;
    transition: transform var(--transition-base);
}

.philosophy-card:hover .philosophy-icon {
    transform: scale(1.1) rotate(5deg);
}

.philosophy-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.philosophy-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

/* Resources Section */
.resources {
    padding: 60px 0;
    background: var(--white);
}

.search-bar {
    position: relative;
    max-width: 100%;
    margin: 0 auto 24px;
}

.search-bar input {
    width: 100%;
    padding: 14px 48px 14px 20px;
    font-size: 16px;
    border: 2px solid var(--border);
    border-radius: 50px;
    outline: none;
    transition: all var(--transition-base);
    background: var(--white);
    font-family: 'Inter', sans-serif;
    -webkit-appearance: none;
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.1);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    pointer-events: none;
    color: var(--text-secondary);
}

.search-clear {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.search-clear:hover {
    background: var(--light);
    color: var(--primary);
}

.search-clear:active {
    transform: translateY(-50%) scale(0.9);
}

.resources-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.resources-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
    position: relative;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-base);
}

.tab-btn:active::before {
    width: 100px;
    height: 100px;
}

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

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
}

.resources-stats {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    font-weight: 500;
}

.resources-stats span {
    color: var(--primary);
    font-weight: 700;
}

.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.resource-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.resource-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(139, 0, 0, 0.05);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.resource-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
}

.resource-card:active::before {
    transform: scaleY(1);
}

.resource-card:active::after {
    width: 200px;
    height: 200px;
}

.resource-card.hidden {
    display: none;
}

.resource-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    transition: transform var(--transition-base);
}

.resource-card:active .resource-icon {
    transform: scale(1.1);
}

.resource-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.resource-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.resource-type {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.resource-type.document {
    background: var(--accent);
    color: var(--white);
}

.resource-type.wellness {
    background: #5A8B5E;
}

.resource-type.forms {
    background: var(--primary-dark);
}

.resource-type.videos {
    background: #6B8E9F;
}

/* Journey Section */
.journey {
    padding: 60px 0;
    background: var(--gradient-nature);
    color: var(--text-primary);
}

.journey .section-title,
.journey .section-subtitle {
    color: var(--text-primary);
}

.journey-timeline {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

.journey-timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(44, 85, 48, 0.3);
}

.journey-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 32px;
    position: relative;
    padding-left: 80px;
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInRight 0.6s ease forwards;
}

.journey-step:nth-child(1) { animation-delay: 0.1s; }
.journey-step:nth-child(2) { animation-delay: 0.2s; }
.journey-step:nth-child(3) { animation-delay: 0.3s; }
.journey-step:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    flex-shrink: 0;
    z-index: 1;
    position: absolute;
    left: 0;
    transition: transform var(--transition-base);
}

.journey-step:hover .step-number {
    transform: scale(1.1);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 14px;
}

.step-resources {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.resource-tag {
    padding: 4px 10px;
    background: rgba(44, 85, 48, 0.1);
    border: 1px solid rgba(44, 85, 48, 0.2);
    border-radius: 8px;
    font-size: 11px;
    color: var(--primary);
    transition: all var(--transition-base);
}

.resource-tag:hover {
    background: rgba(44, 85, 48, 0.2);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 14px;
}

.footer-btn {
    margin-bottom: 20px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-base);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: -1;
}

.modal-content {
    background-color: var(--white);
    padding: 24px;
    border-radius: 16px;
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    animation: slideUp var(--transition-base);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all var(--transition-base);
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--light);
    -webkit-tap-highlight-color: transparent;
}

.close:hover {
    color: var(--primary);
    background: rgba(139, 0, 0, 0.1);
}

.close:active {
    transform: scale(0.9);
}

#modalBody {
    margin-top: 8px;
}

#modalBody h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.5rem;
    padding-right: 40px;
    line-height: 1.3;
}

#modalBody p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 14px;
}

#modalBody strong {
    color: var(--text-primary);
}

#modalBody .modal-link {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--transition-base);
    width: 100%;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

#modalBody .modal-link:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3);
}

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

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

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

/* Dashboard Section */
.dashboard {
    padding: 60px 0;
    background: var(--light);
    min-height: calc(100vh - var(--bottom-nav-height));
}

.dashboard-header {
    text-align: center;
    margin-bottom: 32px;
}

.dashboard-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.dashboard-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-base);
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

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

.section-title-small {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.quick-access {
    margin-bottom: 32px;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-access-item {
    background: var(--white);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.quick-access-item:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.quick-access-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.quick-access-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-access-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 14px;
}

.recent-activity {
    margin-bottom: 32px;
}

.activity-list {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item.empty {
    border: none;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 14px;
}

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

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.reminders-section {
    margin-bottom: 32px;
}

.reminders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.btn-icon:active {
    transform: scale(0.9);
}

.reminders-list {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.reminder-item:last-child {
    border-bottom: none;
}

.reminder-item.empty {
    border: none;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 14px;
}

.reminder-content {
    flex: 1;
}

.reminder-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.reminder-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.reminder-note {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.reminder-delete {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.reminder-delete:active {
    background: var(--light);
    color: var(--primary);
    transform: scale(0.9);
}

/* Favorites Section */
.favorites {
    padding: 60px 0;
    background: var(--white);
}

.favorites-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.favorite-item.empty {
    grid-column: 1 / -1;
}

/* Lessons Section */
.lessons {
    padding: 60px 0;
    background: var(--light);
}

.lessons-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.lessons-tabs::-webkit-scrollbar {
    display: none;
}

.lessons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.lesson-item {
    background: var(--white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.lesson-item.empty {
    flex-direction: column;
    text-align: center;
    padding: 3rem 20px;
}

.lesson-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.lesson-content {
    flex: 1;
}

.lesson-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lesson-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.lesson-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.progress-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
}

.lesson-action-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.lesson-action-btn:active {
    transform: scale(0.95);
}

/* Resource Card Enhancements */
.resource-card {
    position: relative;
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--border);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    box-shadow: var(--shadow-sm);
}

.favorite-btn:active {
    transform: scale(0.9);
}

.favorite-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.lesson-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--border);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.resource-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    padding: 8px 12px;
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.action-btn:active {
    transform: scale(0.95);
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 2rem;
}

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

.empty-state h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Modal Enhancements */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions .btn {
    width: 100%;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-base);
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .btn {
    flex: 1;
}

/* Desktop Styles */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }

    .bottom-nav {
        display: none;
    }

    .top-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 1000;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
        transition: all var(--transition-base);
    }

    .top-nav.scrolled {
        background: rgba(26, 26, 26, 0.98);
        box-shadow: var(--shadow-md);
    }

    .nav-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-logo {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .logo-text {
        font-family: 'Playfair Display', serif;
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--primary);
        letter-spacing: 2px;
    }

    .logo-subtitle {
        font-size: 0.9rem;
        color: var(--white);
        font-weight: 500;
        letter-spacing: 1px;
    }

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

    .nav-link {
        color: var(--white);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.95rem;
        transition: all var(--transition-base);
        position: relative;
        padding: 0.5rem 0;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--accent-light);
        transition: width var(--transition-base);
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--accent-light);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

    .hero {
        padding: 120px 20px 80px;
    }

    .chinese-text {
        font-size: 4.5rem;
        letter-spacing: 8px;
    }

    .english-text {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .btn-primary,
    .btn-outline {
        width: auto;
        max-width: none;
    }

    .philosophy-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-access-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .favorites-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .lessons-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .modal-actions {
        flex-direction: row;
    }

    .modal-actions .btn {
        width: auto;
        flex: 1;
    }

    .journey-timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .journey-step {
        flex-direction: row;
        padding-left: 0;
        align-items: center;
    }

    .journey-step:nth-child(even) {
        flex-direction: row-reverse;
    }

    .step-number {
        position: relative;
        left: auto;
    }

    .step-content {
        padding: 0 3rem;
        max-width: 400px;
    }

    .modal-content {
        max-width: 600px;
        width: auto;
    }

    .container {
        max-width: 1200px;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .section-title {
        font-size: 2.5rem;
    }

    .philosophy-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-md);
    }

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
