/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f8f9fa;
    font-size: 16px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2.5rem 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Mobile Navigation */
.mobile-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-toggle {
    display: block;
    width: 100%;
    padding: 1.2rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.nav-toggle:hover {
    background-color: #f8f9fa;
}

.nav-menu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.nav-menu.active {
    max-height: 600px;
}

.nav-menu li {
    border-bottom: 1px solid #eee;
}

.nav-menu a {
    display: block;
    padding: 1rem 1.2rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: #f0f4ff;
    color: #667eea;
    padding-left: 1.5rem;
}

.nav-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #667eea;
}

/* Main content */
main {
    max-width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

.content-section {
    background: white;
    margin: 1.5rem 0;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
}

.content-section h2 {
    color: #2c3e50;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #667eea;
    line-height: 1.4;
}

.content-section h3 {
    color: #34495e;
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.content-section h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.8rem 0;
    font-weight: 600;
}

.content-section h5 {
    color: #667eea;
    font-size: 1rem;
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
}

.content-section h6 {
    color: #34495e;
    font-size: 0.95rem;
    margin: 0.8rem 0 0.4rem 0;
    font-weight: 600;
}

.content-section p {
    margin-bottom: 1.2rem;
    text-align: justify;
    line-height: 1.8;
}

.content-section ul, .content-section ol {
    margin: 1.2rem 0;
    padding-left: 1.8rem;
}

.content-section li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

/* Special text styles */
.highlight {
    background: linear-gradient(120deg, #a8edea 0%, #fed6e3 100%);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
    margin: 1.5rem 0;
    border-left: 4px solid #667eea;
}

/* Special boxes */
.concept-box, .answer-box, .question-box, .problem-box, 
.conclusion-box, .warning-box, .future-vision, .closing-thought {
    padding: 1.5rem;
    margin: 1.8rem 0;
    border-radius: 12px;
    position: relative;
}

.concept-box {
    background: linear-gradient(135deg, #f5f7ff 0%, #e8f0ff 100%);
    border-left: 5px solid #667eea;
}

.answer-box {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
    border-left: 5px solid #28a745;
    text-align: center;
}

.question-box {
    background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%);
    border-left: 5px solid #ffc107;
}

.problem-box {
    background: linear-gradient(135deg, #ffe8e8 0%, #fff0f0 100%);
    border-left: 5px solid #dc3545;
}

.conclusion-box {
    background: linear-gradient(135deg, #e8f8ff 0%, #f0faff 100%);
    border-left: 5px solid #17a2b8;
}

.warning-box {
    background: linear-gradient(135deg, #fff3cd 0%, #fffbf0 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
}

.future-vision {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    text-align: center;
    font-weight: 500;
}

.closing-thought {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    font-weight: 500;
}

/* Learning items */
.learning-list {
    margin: 1.5rem 0;
}

.learning-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.learning-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.learning-item h4 {
    color: #667eea;
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Method sections */
.method-section {
    background: #f8f9ff;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #e0e6ff;
}

.method-section h3 {
    color: #667eea;
    margin-top: 0;
    font-size: 1.4rem;
}

.training-list {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.training-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.training-list li:last-child {
    border-bottom: none;
}

/* Benefits and challenges */
.benefits-section, .challenges-section, .pros-cons-section {
    margin: 2rem 0;
}

.benefits-section h4, .challenges-section h4, .pros-cons-section h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.benefit-item, .challenge-item, .pro-item, .con-item {
    background: white;
    border-radius: 10px;
    padding: 1.2rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid #28a745;
}

.challenge-item, .con-item {
    border-left-color: #dc3545;
}

.pro-item {
    border-left-color: #28a745;
}

.benefit-item h5, .challenge-item h5, .pro-item h6, .con-item h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Choice section */
.choice-section {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid #28a745;
}

.choice-section h3 {
    color: #28a745;
    margin-top: 0;
}

/* Knob sections */
.knob-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #dee2e6;
}

.knob-section h3 {
    color: #495057;
    margin-top: 0;
}

.step-comparison, .reading-comparison {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.step-type, .reading-type {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.step-type h4, .reading-type h4 {
    color: #667eea;
    margin-top: 0;
    font-size: 1rem;
}

.smart-approach {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid #28a745;
}

/* Agent sections */
.agent-capabilities {
    margin: 2rem 0;
}

.agent-steps {
    margin: 1.5rem 0;
}

.agent-step {
    background: linear-gradient(135deg, #f5f7ff 0%, #e8f0ff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 5px solid #667eea;
    position: relative;
}

.agent-step::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 1.5rem;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid white;
}

.agent-step h4 {
    color: #667eea;
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.team-concept {
    background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 5px solid #ffc107;
}

/* Problem sections */
.problem-list {
    margin: 2rem 0;
}

.problem-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-left: 5px solid #dc3545;
    transition: all 0.3s ease;
}

.problem-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.15);
}

.problem-item h3 {
    color: #dc3545;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Example process */
.example-process {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px dashed #667eea;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

/* Responsive design for larger screens */
@media (min-width: 768px) {
    header h1 {
        font-size: 2.8rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    main {
        max-width: 800px;
        padding: 0 2rem;
    }
    
    .content-section {
        padding: 2.5rem;
    }
    
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        max-height: none;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        padding: 0;
    }
    
    .nav-menu li {
        border-bottom: none;
        border-right: 1px solid #eee;
    }
    
    .nav-menu li:last-child {
        border-right: none;
    }
    
    .nav-menu a {
        padding: 1rem 1.5rem;
        white-space: nowrap;
    }
    
    .nav-menu a:hover, .nav-menu a.active {
        padding-left: 1.5rem;
    }
    
    .step-comparison, .reading-comparison {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    main {
        max-width: 900px;
    }
    
    .content-section {
        padding: 3rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeIn 0.8s ease-out;
}

/* Print styles */
@media print {
    .mobile-nav {
        display: none;
    }
    
    .content-section {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
        margin: 1rem 0;
    }
    
    .future-vision, .closing-thought {
        background: white !important;
        color: black !important;
        border: 2px solid #333;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .content-section {
        border: 2px solid #000;
    }
    
    .nav-menu a:hover, .nav-menu a.active {
        background-color: #000;
        color: #fff;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .content-section {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .mobile-nav {
        background: #2d2d2d;
    }
    
    .nav-toggle {
        color: #e0e0e0;
    }
    
    .nav-menu {
        background: #2d2d2d;
    }
    
    .nav-menu a {
        color: #e0e0e0;
    }
    
    .nav-menu a:hover, .nav-menu a.active {
        background-color: #404040;
    }
}