/* ================================
   🌙 Dark Mode Theme Variables
   ================================ */

:root {
    /* Light Theme (Default) */
    --bg-primary: #e8f5e9;
    --bg-secondary: #ffffff;
    --bg-accent: #f8f9fa;
    --bg-gradient-start: #e8f5e9;
    --bg-gradient-end: #c8e6c9;
    
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #ffffff;
    --text-accent: #2e7d32;
    
    --color-primary: #4caf50;
    --color-primary-hover: #45a049;
    --color-secondary: #8bc34a;
    --color-accent: #ff9800;
    --color-danger: #f44336;
    
    --border-light: #e0f2f1;
    --border-default: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-dark: rgba(0, 0, 0, 0.2);
    
    /* Navigation specific */
    --nav-bg: linear-gradient(to right, #4caf50, #8bc34a);
    --nav-text: #ffffff;
    --nav-hover: rgba(255, 255, 255, 0.3);
    
    /* Hero section */
    --hero-bg: linear-gradient(135deg, #ff9800, #ffeb3b);
    --hero-text: #ffffff;
    
    /* Transition timing */
    --theme-transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-accent: #21262d;
    --bg-gradient-start: #0d1117;
    --bg-gradient-end: #161b22;
    
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-light: #f0f6fc;
    --text-accent: #66bb6a;
    
    --color-primary: #66bb6a;
    --color-primary-hover: #81c784;
    --color-secondary: #81c784;
    --color-accent: #ffb74d;
    --color-danger: #ef5350;
    
    --border-light: #30363d;
    --border-default: #30363d;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-dark: rgba(0, 0, 0, 0.6);
    
    /* Navigation specific */
    --nav-bg: linear-gradient(to right, #1a5d1f, #2e7d32);
    --nav-text: #f0f6fc;
    --nav-hover: rgba(255, 255, 255, 0.15);
    
    /* Hero section */
    --hero-bg: linear-gradient(135deg, #f57c00, #ff9800);
    --hero-text: #ffffff;
}

/* Theme transition for smooth switching */
* {
    transition: var(--theme-transition);
}

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

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--theme-transition);
    box-shadow: 0 4px 20px var(--shadow-medium);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px var(--shadow-dark);
    border-color: var(--color-primary);
}

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

/* Sun/Moon Icons */
.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    transition: var(--theme-transition);
}

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

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

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

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

/* Mobile positioning for theme toggle */
@media (max-width: 768px) {
    .theme-toggle {
        top: 15px;
        right: 70px; /* Position next to mobile menu */
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: linear-gradient(to bottom, var(--bg-gradient-start), var(--bg-gradient-end));
    background-attachment: fixed;
}

/* Prevent scrolling when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Header Styles */
header {
    background: var(--nav-bg);
    box-shadow: 0 4px 10px var(--shadow-medium);
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--color-primary);
    border-radius: 0 0 10px 10px;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.site-logo {
    width: 60px;
    height: 60px;
    margin-right: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: rotate(10deg) scale(1.1);
}

header h1, .site-title {
    color: var(--nav-text);
    font-size: 1.8rem;
    margin-bottom: 0;
    text-shadow: 1px 1px 3px var(--shadow-dark);
    letter-spacing: 1px;
    font-weight: bold;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 5px;
}

nav ul li {
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 600;
    transition: var(--theme-transition);
    padding: 6px 12px;
    border-radius: 15px;
    display: inline-block;
    background-color: var(--nav-hover);
    border: 1px solid transparent;
}

nav ul li a:hover {
    color: var(--nav-text);
    background-color: var(--nav-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px var(--shadow-medium);
    border-color: var(--nav-hover);
}

/* Main Content Area */
main {
    padding: 1rem 0;
}

.hero {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 1.5rem 0;
    margin-bottom: 1.2rem;
    border-radius: 15px;
    box-shadow: 0 6px 15px var(--shadow-medium);
    border: 3px solid var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="10" cy="10" r="3" fill="rgba(255,255,255,0.2)"/></svg>');
    background-size: 50px 50px;
    opacity: 0.5;
}

.hero-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    padding-right: 1rem;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 0.7rem;
    text-shadow: 2px 2px 4px var(--shadow-dark);
    font-weight: bold;
    color: var(--hero-text);
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.1rem;
    max-width: 800px;
    text-shadow: 1px 1px 3px var(--shadow-dark);
    background-color: rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 10px;
    border-left: 3px solid var(--hero-text);
}

/* 轮播图样式 */
.slideshow-container {
    flex: 1;
    min-width: 280px;
    max-width: 450px;
    position: relative;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 5px solid #fff;
    transform: rotate(1deg);
    transition: transform 0.3s ease;
}

.slideshow-container:hover {
    transform: rotate(0deg) scale(1.02);
}

.slide {
    display: none;
    width: 100%;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 0.5s ease;
}

.slide:hover img {
    transform: scale(1.05);
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -30px;
    padding: 20px;
    color: var(--text-light);
    font-weight: bold;
    font-size: 24px;
    transition: var(--theme-transition);
    border-radius: 50%;
    user-select: none;
    background-color: var(--color-primary);
    opacity: 0.7;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px var(--shadow-dark);
    opacity: 0.7;
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

.prev:hover, .next:hover {
    background-color: var(--color-primary);
    transform: scale(1.1);
    opacity: 1;
}

.dots-container {
    text-align: center;
    margin-top: 1.5rem;
    width: 100%;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 8px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    display: inline-block;
    transition: var(--theme-transition);
    border: 2px solid var(--color-primary);
    box-shadow: 0 2px 5px var(--shadow-medium);
}

.active, .dot:hover {
    background-color: var(--color-primary);
    transform: scale(1.2);
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
}

.page-header {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 1.2rem 0;
    margin-bottom: 1.2rem;
    border-radius: 15px;
    box-shadow: 0 6px 15px var(--shadow-medium);
    border: 3px solid var(--bg-secondary);
}

/* Update Banner Styles */
.update-banner {
    background-color: #e8f5f0;
    background-image: linear-gradient(135deg, #e8f5f0, #d1f2eb);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 10px;
    border-left: 4px solid #1abc9c;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.update-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" viewBox="0 0 150 150"><path d="M0,0 L150,150 L150,0 Z" fill="rgba(26, 188, 156, 0.1)"/></svg>');
    background-size: cover;
    z-index: 0;
}

.update-banner h3 {
    color: #16a085;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.update-banner ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.update-banner ul li {
    margin-bottom: 0.8rem;
    padding-left: 25px;
    position: relative;
}

.update-banner ul li::before {
    content: '🆕';
    position: absolute;
    left: 0;
    top: 0;
}

.update-banner ul li:last-child {
    margin-bottom: 0;
}

.update-banner a {
    color: #16a085;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.update-banner a:hover {
    color: #1abc9c;
    text-decoration: underline;
}

/* Wiki Section Styles */
.wiki-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
}

.wiki-section h4 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 1rem;
}

.wiki-section h5 {
    color: #ff9800;
    margin: 1.2rem 0 0.8rem;
}

.breadcrumbs-container {
    background-color: #f5f5f5;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.breadcrumbs {
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    color: #555;
}

.breadcrumbs a {
    color: #4caf50;
    text-decoration: none;
    transition: all 0.3s;
}

.breadcrumbs a:hover {
    text-decoration: underline;
    color: #2e7d32;
}

.breadcrumbs span.current {
    font-weight: bold;
    color: #333;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #999;
}

.page-header h2 {
    font-size: 2.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.content {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 6px 20px var(--shadow-light);
    border: 3px solid var(--border-light);
}

section {
    margin-bottom: 2rem;
}

h2 {
    color: var(--text-accent);
    margin-bottom: 1.2rem;
    font-size: 2rem;
    position: relative;
    padding-left: 15px;
    border-left: 5px solid var(--color-primary);
}

h3 {
    color: var(--color-accent);
    margin: 1.8rem 0 1.2rem;
    font-size: 1.6rem;
    position: relative;
    display: inline-block;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 3px;
    transform: scaleX(0.3);
    transform-origin: left;
    transition: var(--theme-transition);
}

h3:hover::after {
    transform: scaleX(1);
}

p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 2.5rem;
}

ul {
    list-style-type: none;
}

ul li {
    position: relative;
    margin-bottom: 0.8rem;
    padding-left: 10px;
}

ul li::before {
    content: '🌱';
    position: absolute;
    left: -25px;
    top: 0;
    font-size: 1.2em;
}

/* Only apply numbered lists to content sections, not navigation */
main section ol {
    counter-reset: item;
    list-style-type: none;
}

main section ol li {
    position: relative;
    margin-bottom: 1rem;
    padding-left: 10px;
    counter-increment: item;
}

main section ol li::before {
    content: counter(item);
    position: absolute;
    left: -30px;
    top: -2px;
    background-color: #4caf50;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Unified Breadcrumb Navigation Styles */
.breadcrumb-nav {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 4px;
}

.breadcrumb-list a {
    color: #2e7d32;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumb-list a:hover {
    background-color: rgba(46, 125, 50, 0.1);
    color: #1b5e20;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 6px;
    color: #666;
    font-weight: bold;
    user-select: none;
}

.current-page {
    color: #666;
    font-weight: 500;
    padding: 4px 8px;
}

/* Remove old breadcrumb navigation styles for ol elements */
nav[aria-label="Breadcrumb"] ol {
    counter-reset: none;
    list-style-type: none;
}

nav[aria-label="Breadcrumb"] ol li {
    position: static;
    margin-bottom: 0;
    padding-left: 0;
    counter-increment: none;
}

nav[aria-label="Breadcrumb"] ol li::before {
    content: none;
}

/* Legacy breadcrumb styles for existing pages */
.breadcrumbs {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumbs .container {
    display: flex;
    align-items: center;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 4px;
}

.breadcrumbs a {
    color: #2e7d32;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumbs a:hover {
    background-color: rgba(46, 125, 50, 0.1);
    color: #1b5e20;
    text-decoration: underline;
}

.breadcrumbs span {
    color: #666;
    font-weight: 500;
    padding: 4px 8px;
}

/* Mobile responsive breadcrumbs - Enhanced version moved to navigation section above */

/* Table Styles with Mobile Optimization */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e8;
}

table th {
    background-color: #f5f7f9;
    font-weight: 600;
    color: #374956;
}

table tr:hover {
    background-color: #f9f9f9;
}

/* Enhanced Mobile Table Handling */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin: 1rem 0;
    }
    
    table {
        min-width: 600px; /* Ensure table doesn't shrink too much */
        margin: 0;
    }
    
    table th, table td {
        padding: 12px 8px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* Card-style table alternative for very small screens */
    @media (max-width: 480px) {
        .table-card {
            display: block;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            margin: 1rem 0;
            overflow: hidden;
        }
        
        .table-card-header {
            background: #4caf50;
            color: white;
            padding: 12px 16px;
            font-weight: 600;
        }
        
        .table-card-row {
            border-bottom: 1px solid #eee;
            padding: 12px 16px;
        }
        
        .table-card-row:last-child {
            border-bottom: none;
        }
        
        .table-card-label {
            font-weight: 600;
            color: #666;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }
        
        .table-card-value {
            font-size: 14px;
            margin-bottom: 8px;
        }
        
        .table-card-value:last-child {
            margin-bottom: 0;
        }
    }
}

/* Footer Styles */
footer {
    background: var(--nav-bg);
    color: var(--nav-text);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
    border-top: 3px solid var(--color-primary);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 15px var(--shadow-light);
}

footer p {
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

/* FAQ Section */
.faq-section {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--shadow-light);
    border: 3px solid var(--border-light);
    margin-bottom: 2rem;
}

.faq-section h2 {
    color: var(--color-accent);
    text-align: center;
    margin-bottom: 0.5rem;
}

.faq-section > .container > p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-category-title {
    background-color: var(--color-accent);
    color: var(--text-light);
    padding: 10px 15px;
    margin: 25px 0 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px var(--shadow-light);
}

.faq-item {
    margin-bottom: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--theme-transition);
}

.faq-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 5px 15px var(--shadow-light);
}

.faq-question {
    background-color: var(--bg-accent);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-accent);
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--color-accent);
    font-weight: bold;
}

.faq-answer {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1rem;
    max-height: 500px;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

/* Video Tutorials Section */
.video-tutorials {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--shadow-light);
    border: 3px solid var(--border-light);
    margin-bottom: 2rem;
}

.video-tutorials h2 {
    color: var(--color-accent);
    text-align: center;
    margin-bottom: 0.5rem;
}

.video-tutorials > .container > p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.video-item {
    background-color: var(--bg-accent);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--theme-transition);
    box-shadow: 0 5px 15px var(--shadow-light);
    border: 3px solid var(--border-light);
    padding-bottom: 15px;
}

.video-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-medium);
    border-color: var(--color-accent);
}

.video-item h3 {
    padding: 15px;
    margin: 0;
    color: var(--text-accent);
    font-size: 1.3rem;
    text-align: center;
    border-bottom: 2px solid var(--border-light);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
    border-radius: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.play-button {
    position: absolute;
    width: 70px;
    height: 70px;
    background-color: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid white;
    margin-left: 5px;
}

.video-container:hover .play-button {
    transform: scale(1.1);
    background-color: rgba(255, 0, 0, 1);
}

.video-container:hover img {
    transform: scale(1.05);
}

.video-item p {
    padding: 15px;
    margin: 0;
    color: var(--text-secondary);
}

/* Related Content Section */
.related-content {
    background-color: var(--bg-accent) !important;
    padding: 40px 0 !important;
    border-radius: 15px !important;
    margin: 40px 0 !important;
}

.related-content h2 {
    text-align: center !important;
    color: var(--text-primary) !important;
    margin-bottom: 30px !important;
    border-left: none !important;
    padding-left: 0 !important;
}

.related-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.related-content-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-light);
    text-align: center;
    transition: var(--theme-transition);
}

.related-content-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--shadow-medium);
}

.related-content-item h3 {
    color: var(--color-primary);
    margin-bottom: 15px;
    border-left: none !important;
    padding-left: 0 !important;
}

.related-content-item h3::after {
    display: none;
}

.related-content-item p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.related-content-item .btn {
    background: var(--color-primary);
    color: var(--text-light);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    display: inline-block;
    transition: var(--theme-transition);
}

.related-content-item .btn:hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

.related-content-item .btn.btn-orange {
    background: var(--color-accent);
}

.related-content-item .btn.btn-orange:hover {
    background: #e68900;
}

.related-content-item .btn.btn-purple {
    background: #7b68ee;
}

.related-content-item .btn.btn-purple:hover {
    background: #6a5acd;
}

.related-item {
    background-color: #f9f9f9;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid #e0f2f1;
}

.related-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: #4caf50;
}

.related-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-item img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 3px solid #e0f2f1;
    transition: all 0.3s ease;
}

.related-item:hover img {
    transform: scale(1.05);
}

.related-item h4 {
    color: #2e7d32;
    margin: 15px 15px 5px;
    font-size: 1.2rem;
}

.related-item p {
    margin: 0 15px 15px;
    font-size: 0.9rem;
    color: #666;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
    z-index: 200;
    position: relative;
    transition: background 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hamburger-line {
    display: block;
    width: 30px;
    height: 3px;
    margin: 6px 0;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

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

/* Responsive Design with Enhanced Touch Support */
@media (max-width: 768px) {
    .container {
        width: 98%;
        padding: 0 8px; /* Increased padding for better touch margins */
    }

    .logo-container {
        justify-content: space-between;
        width: 100%;
        padding: 8px 0;
    }

    .mobile-menu-toggle {
        display: block;
        position: relative;
        z-index: 200;
    }

    nav {
        width: 100%;
    }

    nav ul {
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%; /* Slightly wider for better usability */
        max-width: 280px;
        height: 100vh;
        background-color: #4caf50;
        background-image: linear-gradient(to bottom, #4caf50, #8bc34a);
        padding: 70px 20px 20px; /* Increased padding */
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smoother transition */
        z-index: 100;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        border-radius: 0;
        transform: translateX(20px);
        opacity: 0;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    nav ul.show {
        right: 0;
        transform: translateX(0);
        opacity: 1;
    }

    /* Overlay when mobile menu is open */
    nav ul.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    nav ul li {
        margin-right: 0;
        margin-bottom: 8px; /* Increased spacing */
        width: 100%;
    }

    nav ul li a {
        display: flex;
        align-items: center;
        padding: 14px 16px; /* Larger touch targets */
        text-align: left;
        font-size: 16px; /* Consistent size */
        width: 100%;
        position: relative;
        border-radius: 8px;
        transition: all 0.2s ease;
        min-height: 48px; /* Minimum touch target */
        touch-action: manipulation;
    }

    /* Active page indicator for mobile */
    nav ul li a.active,
    nav ul li a:active {
        background-color: rgba(255, 255, 255, 0.2);
        font-weight: bold;
    }

    /* Enhanced icons for menu items */
    nav ul li a::before {
        content: '🌱';
        margin-right: 10px;
        font-size: 16px; /* Larger icons */
        opacity: 0.9;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    /* Touch-friendly hover states */
    @media (hover: hover) {
        nav ul li a:hover::before {
            opacity: 1;
            transform: scale(1.1);
        }
        
        nav ul li a:hover {
            background-color: rgba(255, 255, 255, 0.2);
            transform: translateX(4px);
        }
    }
    
    /* Touch feedback for mobile */
    nav ul li a:active {
        background-color: rgba(255, 255, 255, 0.3);
        transform: scale(0.98);
    }

    .hero {
        padding: 1.5rem 0; /* More breathing room */
        margin-bottom: 1rem;
    }

    .hero h2 {
        font-size: 1.8rem;
        line-height: 1.3; /* Better readability */
    }

    .hero p {
        font-size: 1rem; /* Slightly larger for better readability */
        line-height: 1.5;
    }

    .hero-container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 0;
        text-align: center;
    }

    .slideshow-container {
        width: 100%;
        max-width: 100%;
        transform: rotate(0deg);
        margin: 0;
    }

    .slideshow-container:hover {
        transform: rotate(0deg) scale(1.02);
    }

    .dots-container {
        margin-top: 1rem;
    }

    .game-info {
        padding: 1.5rem;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        margin: 20px 0;
    }

    .image-item {
        transform: rotate(0deg) !important;
    }

    .image-item:hover {
        transform: rotate(0deg) scale(1.02);
    }

    .image-label {
        position: static;
        transform: none;
        border-radius: 0 0 15px 15px;
        margin-top: -5px;
    }

    .related-content {
        padding: 20px 0 !important;
        margin: 20px 0 !important;
    }

    .related-content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }

    .related-content-item {
        padding: 20px 16px;
        margin-bottom: 16px;
    }
    
    .related-content-item h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .related-content-item p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 16px;
    }
    
    .related-content-item .btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 16px;
    }

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

    .video-tutorials {
        padding: 1.5rem;
    }

    .video-item h3 {
        font-size: 1.1rem;
        padding: 16px;
    }
    
    .video-item p {
        padding: 0 16px 16px;
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Enhanced video container for mobile */
    .video-container {
        margin: 0 8px 8px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
    }

    .faq-section {
        padding: 16px;
    }
    
    .faq-item {
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .faq-question {
        padding: 16px;
        border-radius: 12px;
    }
    
    .faq-question h3 {
        font-size: 16px;
        line-height: 1.4;
        margin: 0;
    }
    
    .faq-toggle {
        font-size: 20px;
        min-width: 24px;
        text-align: center;
    }
    
    .faq-answer {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .faq-item.active .faq-answer {
        padding: 16px;
        max-height: 600px; /* Increased for mobile */
    }

    .update-banner {
        padding: 1rem;
        margin: 1rem 0;
    }

    .update-banner::before {
        display: none;
    }

    h2 {
        font-size: 1.6rem;
        padding-left: 10px;
        line-height: 1.3;
        margin-bottom: 1rem; /* Better spacing */
    }

    h3 {
        font-size: 1.4rem;
        line-height: 1.3;
        margin: 1.5rem 0 1rem; /* Better spacing */
    }
    
    /* Enhanced paragraph spacing for mobile */
    p {
        margin-bottom: 1.2rem;
        line-height: 1.6; /* Better readability */
    }
    
    /* Better list spacing - moved to content display section above */
}

/* Special Element Styles */
.game-info {
    background-color: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 5px solid #e0f2f1;
    position: relative;
    overflow: hidden;
}

/* 装饰元素 */
.decoration-leaf {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.leaf-1 {
    width: 150px;
    height: 150px;
    top: -30px;
    right: 10%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,0 C70,20 90,40 50,100 C10,40 30,20 50,0" fill="%234caf50"/></svg>');
    transform: rotate(45deg);
    animation: float 8s ease-in-out infinite;
}

.leaf-2 {
    width: 100px;
    height: 100px;
    bottom: 20px;
    left: 5%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,0 C70,20 90,40 50,100 C10,40 30,20 50,0" fill="%238bc34a"/></svg>');
    transform: rotate(-30deg);
    animation: float 10s ease-in-out infinite reverse;
}

.leaf-3 {
    width: 80px;
    height: 80px;
    top: 40%;
    right: 5%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,0 C70,20 90,40 50,100 C10,40 30,20 50,0" fill="%23ff9800"/></svg>');
    transform: rotate(15deg);
    animation: float 12s ease-in-out infinite;
}

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

.game-badge {
    display: inline-block;
    background-color: #ff9800;
    color: white;
    font-size: 0.6em;
    padding: 5px 10px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 10px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

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

.game-info::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background-color: #4caf50;
    opacity: 0.1;
    border-radius: 50%;
    z-index: 0;
}

.game-info::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background-color: #ff9800;
    opacity: 0.1;
    border-radius: 50%;
    z-index: 0;
}

strong {
    color: #4caf50;
    font-weight: 700;
    background-color: rgba(76, 175, 80, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
}

.points {
    background-color: #f1f8e9;
    padding: 1.8rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border-left: 5px solid #8bc34a;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Plant Tier Colors */
h2:contains("S Tier") {
    color: #ff9900;
}

h2:contains("A Tier") {
    color: #9c27b0;
}

h2:contains("B Tier") {
    color: #2196f3;
}

h2:contains("C Tier") {
    color: #4caf50;
}

h2:contains("D Tier") {
    color: #ff5722;
}

h2:contains("F Tier") {
    color: #f44336;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.image-item {
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.image-item:nth-child(odd) {
    transform: rotate(-2deg);
}

.image-item:nth-child(even) {
    transform: rotate(2deg);
}

.image-item:hover {
    transform: rotate(0) scale(1.05);
    z-index: 10;
}

.image-item img {
    max-width: 100%;
    border-radius: 15px;
    margin-bottom: 10px;
    transition: all 0.4s;
    border: 5px solid #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.image-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.image-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

/* 图片标签样式 */
.image-label {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border: 3px solid #4caf50;
    border-radius: 0 0 15px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(5px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.image-item:hover .image-label {
    transform: translateY(0);
    background-color: rgba(255, 255, 255, 0.95);
}

.main-label {
    font-weight: bold;
    color: #4caf50;
    font-size: 1.3em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

.sub-label {
    font-size: 1em;
    color: #ff9800;
    margin-top: 3px;
    font-weight: 500;
}

/* ================================
   📱 Mobile Touch Optimization
   ================================ */

/* Touch Target Optimization - Minimum 44px as per Apple guidelines */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    position: relative;
}

/* Enhanced touch targets for all clickable elements */
a, button, [role="button"], [onclick] {
    position: relative;
    transition: all 0.2s ease;
}

/* Expand touch area for small elements without changing visual appearance */
a::before, button::before, [role="button"]::before {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    bottom: -8px;
    left: -8px;
    z-index: -1;
}

/* Touch feedback for all interactive elements */
@media (hover: none) and (pointer: coarse) {
    a:active, button:active, [role="button"]:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    /* Remove hover effects on touch devices */
    a:hover, button:hover, [role="button"]:hover {
        transform: none;
    }
}

/* Enhanced slideshow controls for touch */
.prev, .next {
    min-height: 60px;
    min-width: 60px;
    touch-action: manipulation;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Larger dots for better touch interaction */
.dot {
    min-height: 20px;
    min-width: 20px;
    margin: 0 12px;
    touch-action: manipulation;
}

/* Enhanced mobile menu button */
.mobile-menu-toggle {
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
}

/* Touch-friendly navigation links */
nav ul li a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Enhanced FAQ accordion for touch */
.faq-question {
    min-height: 48px;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(76, 175, 80, 0.1);
}

/* Input field optimization for mobile */
input[type="email"], input[type="text"], input[type="search"] {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 8px;
    padding: 12px 16px;
    touch-action: manipulation;
}

/* Button optimization */
button, .btn, input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
    font-size: 16px;
    padding: 12px 20px;
    border-radius: 8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

/* Gesture Support */
@media (max-width: 768px) {
    /* Enable horizontal scrolling for tables */
    table {
        touch-action: pan-x;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Image zoom gesture support */
    .slideshow-container img, .image-item img {
        touch-action: pinch-zoom;
        -webkit-touch-callout: default;
    }
    
    /* Swipe gesture for slideshow */
    .slideshow-container {
        touch-action: pan-y pinch-zoom;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Smooth scrolling for content areas */
    .content, main {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Pull-to-refresh styling (if implemented) */
    body {
        overscroll-behavior-y: contain;
    }
}

/* Enhanced mobile navigation with swipe support */
@media (max-width: 768px) {
    nav ul {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Add swipe hint for mobile menu */
    nav ul.show::after {
        content: 'Swipe to close';
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 12px;
        opacity: 0;
        animation: fadeInOut 3s ease-in-out;
        pointer-events: none;
        z-index: 1001;
    }
}

/* ================================
   📖 Enhanced Content Display
   ================================ */

/* Mobile Typography Optimization */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Larger base font for better readability */
        line-height: 1.6;
    }
    
    /* Improved heading hierarchy */
    h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 16px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    /* Better content spacing */
    .content {
        padding: 20px 16px;
        margin: 16px 0;
        line-height: 1.6;
    }
    
    /* Enhanced list readability */
    ul, ol {
        padding-left: 20px;
        margin-bottom: 20px;
    }
    
    ul li {
        margin-bottom: 12px;
        padding-left: 8px;
        line-height: 1.6;
    }
    
    /* Improved code and pre elements */
    code, pre {
        font-size: 14px;
        padding: 4px 8px;
        background: #f5f5f5;
        border-radius: 4px;
        word-wrap: break-word;
    }
    
    pre {
        padding: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
    
    /* Better blockquote styling */
    blockquote {
        margin: 20px 0;
        padding: 16px 20px;
        border-left: 4px solid #4caf50;
        background: #f9f9f9;
        border-radius: 0 8px 8px 0;
        font-style: italic;
    }
}

/* ================================
   🖼️ Image and Media Optimization
   ================================ */

/* Mobile image handling */
@media (max-width: 768px) {
    /* Responsive images with aspect ratio preservation */
    img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Image grid improvements */
    .image-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 20px 0;
    }
    
    .image-item {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    /* Lightbox-style image viewing */
    .image-item img {
        cursor: pointer;
        transition: transform 0.3s ease;
    }
    
    .image-item img:active {
        transform: scale(0.98);
    }
    
    /* Enhanced image labels */
    .image-label {
        position: static;
        transform: none;
        margin-top: 8px;
        border-radius: 8px;
        text-align: center;
    }
    
    /* Hero slideshow optimization */
    .slideshow-container {
        margin-bottom: 16px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .slide img {
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Navigation arrows for touch */
    .prev, .next {
        opacity: 0.8;
        backdrop-filter: blur(5px);
        background-color: rgba(76, 175, 80, 0.8);
    }
    
    .prev:active, .next:active {
        opacity: 1;
        transform: scale(0.95);
    }
    
    /* Dots optimization */
    .dots-container {
        margin-top: 12px;
    }
    
    .dot {
        margin: 0 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
}

/* ================================
   📊 Advanced Table Handling
   ================================ */

@media (max-width: 768px) {
    /* Scrollable table wrapper */
    .table-wrapper {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin: 16px 0;
    }
    
    .table-wrapper::before {
        content: 'Swipe to see more →';
        position: absolute;
        top: 8px;
        right: 8px;
        background: rgba(76, 175, 80, 0.8);
        color: white;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 10px;
        z-index: 10;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .table-wrapper:hover::before {
        opacity: 1;
    }
    
    /* Table styling for mobile */
    .table-wrapper table {
        min-width: 500px;
        margin: 0;
        border-radius: 0;
    }
    
    .table-wrapper th,
    .table-wrapper td {
        padding: 12px 8px;
        font-size: 14px;
        white-space: nowrap;
        border-right: 1px solid #eee;
    }
    
    .table-wrapper th:last-child,
    .table-wrapper td:last-child {
        border-right: none;
    }
    
    .table-wrapper th {
        position: sticky;
        top: 0;
        background: #4caf50;
        color: white;
        z-index: 5;
    }
    
    /* Alternative: Stack table rows on very small screens */
    @media (max-width: 480px) {
        .stack-table {
            display: block;
            width: 100%;
        }
        
        .stack-table thead {
            display: none;
        }
        
        .stack-table tbody,
        .stack-table tr,
        .stack-table td {
            display: block;
            width: 100%;
        }
        
        .stack-table tr {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            margin-bottom: 12px;
            padding: 16px;
        }
        
        .stack-table td {
            border: none;
            padding: 8px 0;
            position: relative;
            padding-left: 120px;
        }
        
        .stack-table td::before {
            content: attr(data-label);
            position: absolute;
            left: 0;
            top: 8px;
            width: 110px;
            font-weight: 600;
            color: #666;
            font-size: 12px;
            text-transform: uppercase;
        }
    }
}

/* ================================
   🔄 Interactive Feedback System
   ================================ */

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(76, 175, 80, 0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Success/Error Toast Messages */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 300px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateX(350px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.toast.error {
    background: linear-gradient(135deg, #f44336, #e57373);
}

.toast.warning {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
}

.toast.info {
    background: linear-gradient(135deg, #2196f3, #64b5f6);
}

@media (max-width: 480px) {
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* Form Validation States */
.form-field {
    position: relative;
    margin-bottom: 20px;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    touch-action: manipulation;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-field.error input,
.form-field.error textarea,
.form-field.error select {
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.form-field.success input,
.form-field.success textarea,
.form-field.success select {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-message {
    margin-top: 8px;
    font-size: 14px;
    padding: 0 4px;
}

.form-message.error {
    color: #f44336;
}

.form-message.success {
    color: #4caf50;
}

/* ================================
   🔧 Special Feature Adaptations
   ================================ */

/* Enhanced Calculator/Tools Interface */
@media (max-width: 768px) {
    .calculator-container,
    .tool-container {
        padding: 20px 16px;
        margin: 16px 0;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* Number inputs for calculators */
    input[type="number"],
    input[type="range"] {
        min-height: 48px;
        font-size: 18px;
        padding: 12px 16px;
        border: 2px solid #ddd;
        border-radius: 8px;
        -webkit-appearance: none;
        -moz-appearance: textfield;
        touch-action: manipulation;
    }
    
    /* Enhanced search interface */
    .search-input-container {
        position: relative;
    }
    
    .search-clear {
        position: absolute;
        right: 50px;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 14px;
        cursor: pointer;
        opacity: 0;
        transition: opacity 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    .search-input-container:hover .search-clear,
    .search-clear:focus {
        opacity: 1;
    }
    
    /* Newsletter form optimization */
    #newsletter-form {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    #email-input {
        min-width: 100%;
        font-size: 16px;
        padding: 14px 16px;
        border: 2px solid #ddd;
        border-radius: 8px;
        touch-action: manipulation;
    }
    
    #newsletter-form button[type="submit"] {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
    }
    
    /* Results display */
    .result-display {
        background: #f8f9fa;
        border: 2px solid #e9ecef;
        border-radius: 12px;
        padding: 20px 16px;
        margin: 20px 0;
        font-size: 18px;
        font-weight: 600;
        text-align: center;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .result-display.success {
        background: #e8f5e9;
        border-color: #4caf50;
        color: #2e7d32;
    }
    
    .result-display.warning {
        background: #fff3e0;
        border-color: #ff9800;
        color: #f57c00;
    }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* ================================
   🧭 Enhanced Mobile Navigation
   ================================ */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    transform: translateY(0);
    opacity: 1;
}

.back-to-top:active {
    transform: scale(0.9);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.6);
}

.back-to-top::before {
    content: '↑';
    font-size: 24px;
    font-weight: bold;
}

/* Quick Navigation Menu for Mobile */
@media (max-width: 768px) {
    .quick-nav {
        position: fixed;
        bottom: 90px;
        right: 20px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        z-index: 999;
        transform: translateY(20px);
        opacity: 0;
        transition: all 0.3s ease;
    }
    
    .quick-nav.visible {
        transform: translateY(0);
        opacity: 1;
    }
    
    .quick-nav-item {
        width: 48px;
        height: 48px;
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid #4caf50;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #4caf50;
        font-size: 18px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
        transition: all 0.2s ease;
    }
    
    .quick-nav-item:active {
        transform: scale(0.9);
        background: #4caf50;
        color: white;
    }
}

/* Enhanced Breadcrumb Navigation for Mobile */
@media (max-width: 768px) {
    .breadcrumb-nav, .breadcrumbs {
        padding: 12px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .breadcrumb-nav::-webkit-scrollbar, .breadcrumbs::-webkit-scrollbar {
        display: none;
    }
    
    .breadcrumb-list, .breadcrumbs .container {
        display: flex;
        white-space: nowrap;
        min-width: max-content;
        gap: 4px;
        padding-bottom: 2px;
    }
    
    .breadcrumb-list a, .breadcrumbs a {
        min-width: max-content;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        font-size: 14px;
        touch-action: manipulation;
    }
    
    .current-page, .breadcrumbs span {
        background: rgba(76, 175, 80, 0.2);
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 14px;
    }
}

/* Page Navigation for Mobile (Previous/Next) */
.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px;
    gap: 16px;
}

.page-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-height: 48px;
    flex: 1;
    max-width: 200px;
}

.page-nav-btn:hover {
    background: #4caf50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.page-nav-btn.prev {
    justify-content: flex-start;
}

.page-nav-btn.next {
    justify-content: flex-end;
}

@media (max-width: 480px) {
    .page-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .page-nav-btn {
        width: 100%;
        max-width: none;
        justify-content: center;
    }
}

/* Section Jump Navigation */
.section-nav {
    position: sticky;
    top: 100px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.section-nav-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.section-nav-item {
    display: inline-block;
}

.section-nav-link {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.section-nav-link:hover, .section-nav-link.active {
    background: #4caf50;
    color: white;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .section-nav {
        position: relative;
        top: auto;
        margin: 16px 0;
    }
    
    .section-nav-list {
        justify-content: center;
    }
    
    .section-nav-link {
        min-height: 36px;
        display: flex;
        align-items: center;
    }
}

/* ================================
   🌊 Touch Ripple Effects
   ================================ */

.touch-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.4s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Ensure buttons have relative positioning for ripple effect */
button, .btn, a[role="button"] {
    position: relative;
    overflow: hidden;
}

/* ================================
   📱 Auto-hiding Header on Mobile
   ================================ */

@media (max-width: 768px) {
    header {
        transition: transform 0.3s ease;
        will-change: transform;
    }
    
    /* Adjust main content top margin when header is hidden */
    body[data-scroll-direction="down"] main {
        padding-top: 20px;
        transition: padding-top 0.3s ease;
    }
}

/* ================================
   🚀 Performance Optimizations
   ================================ */

/* Enable hardware acceleration for smooth animations */
.back-to-top,
.quick-nav,
.mobile-menu-toggle,
nav ul,
.slideshow-container,
.touch-ripple {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform, opacity;
}

/* Optimize images for mobile */
@media (max-width: 768px) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* Lazy loading optimization */
    img[loading="lazy"] {
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    img[loading="lazy"].loaded {
        opacity: 1;
    }
}

/* ================================
   🔍 Search System Styles
   ================================ */

/* Search trigger button in navigation */
.search-trigger {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid transparent;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.search-trigger:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Prevent body scroll when search is active */
body.search-active {
    overflow: hidden;
}

/* Search overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Search modal */
.search-modal {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(50px) scale(0.95);
    transition: all 0.3s ease;
    position: relative;
}

.search-overlay.active .search-modal {
    transform: translateY(0) scale(1);
}

/* Search header */
.search-header {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    padding: 20px;
    color: white;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 5px;
    margin-bottom: 15px;
}

.search-icon {
    font-size: 20px;
    padding: 12px 15px;
    opacity: 0.8;
}

#search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 18px;
    padding: 12px 15px 12px 0;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-right: 5px;
}

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

.search-shortcuts {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    opacity: 0.8;
}

.search-shortcuts kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
}

/* Search results */
.search-results {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #4caf50 #f0f0f0;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.search-results::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 3px;
}

/* Welcome screen */
.search-welcome {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.search-welcome-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.search-welcome h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.search-welcome p {
    margin-bottom: 25px;
    font-size: 16px;
}

.search-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.category-tag {
    background: #f5f5f5;
    color: #666;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 2px solid transparent;
}

.category-tag:hover {
    background: #4caf50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Search result items */
.search-result-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.search-result-item:hover,
.search-result-item.selected {
    background: #f8f9fa;
    border-left: 4px solid #4caf50;
    padding-left: 16px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.result-icon {
    font-size: 18px;
    opacity: 0.8;
}

.result-title {
    flex: 1;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.result-title mark {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

.result-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    text-transform: capitalize;
}

.result-description {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.result-description mark {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

.result-url {
    font-size: 12px;
    color: #4caf50;
    font-family: monospace;
}

/* No results */
.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.search-no-results h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.search-no-results p {
    margin-bottom: 20px;
    font-size: 16px;
}

.search-suggestions {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    margin-top: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.search-suggestions p {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.search-suggestions ul {
    list-style-position: inside;
    color: #666;
}

.search-suggestions li {
    margin-bottom: 5px;
}

/* Search footer */
.search-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.search-stats {
    color: #666;
    font-size: 14px;
}

.search-navigation {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
}

.search-navigation kbd {
    background: #e9ecef;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-family: monospace;
    border: 1px solid #dee2e6;
}

/* Mobile responsive with touch optimization */
@media (max-width: 768px) {
    .search-modal {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
        border-radius: 12px;
    }
    
    .search-header {
        padding: 15px;
    }
    
    #search-input {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
        padding: 14px 16px;
        touch-action: manipulation;
    }
    
    .search-close {
        min-height: 48px;
        min-width: 48px;
        font-size: 24px;
        touch-action: manipulation;
    }
    
    .search-categories {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .category-tag {
        width: 100%;
        max-width: 280px;
        text-align: center;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    .search-result-item {
        padding: 20px;
        min-height: 60px;
        touch-action: manipulation;
    }
    
    .search-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 20px;
    }
    
    .search-navigation {
        justify-content: center;
    }
    
    /* Enhanced touch scrolling */
    .search-results {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

@media (max-width: 480px) {
    .search-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .search-results {
        max-height: calc(100vh - 200px);
        -webkit-overflow-scrolling: touch;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .result-title {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .search-result-item {
        padding: 24px 16px;
        min-height: 80px;
    }
    
    .search-shortcuts {
        display: none; /* Hide keyboard shortcuts on mobile */
    }
    
    /* Enhanced touch targets for small screens */
    .category-tag {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 20px;
    }
    
    #search-input {
        font-size: 18px;
        padding: 16px;
    }
}
