/* ==================== Reset & Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Dark Theme */
body[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: #374151;
    --border-color: #4b5563;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ==================== Control Bar ==================== */
.control-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.control-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.control-btn i {
    font-size: 1rem;
}

.control-text {
    font-size: 0.85rem;
}

/* ==================== Hero Section ==================== */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 32px;
    opacity: 0.95;
    font-weight: 400;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ==================== Main Content ==================== */
.main-content {
    flex: 1;
    padding: 60px 0;
    background: var(--bg-secondary);
}

.intro-section {
    text-align: center;
    margin-bottom: 48px;
}

.intro-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 900px;
    margin: 0 auto;
}

/* ==================== Typography ==================== */
h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 40px 0 24px;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 20px;
}

h4 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==================== Table Styles ==================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

thead {
    background: var(--gradient-primary);
    color: white;
}

th {
    padding: 20px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: var(--bg-secondary);
    transform: scale(1.01);
}

tbody tr:last-child td {
    border-bottom: none;
}

strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==================== List Styles ==================== */
ul {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

ul li {
    padding: 12px 0 12px 32px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.8;
}

ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* ==================== Method Cards ==================== */
h4 + p {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

/* ==================== Feature Highlights ==================== */
.feature-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    color: var(--text-primary);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==================== Links ==================== */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

a:hover {
    color: var(--primary-dark);
}

/* ==================== Images ==================== */
img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin: 24px 0;
    transition: all 0.3s ease;
}

img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* ==================== Footer ==================== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 32px 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

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

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

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .hero {
        padding: 60px 0 80px;
    }

    .main-content {
        padding: 40px 0;
    }

    h2 {
        font-size: 1.75rem;
    }

    h4 {
        font-size: 1.5rem;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 16px;
    }

    .container {
        padding: 0 16px;
    }

    .hero-badges {
        flex-direction: column;
        align-items: center;
    }

    .badge {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .controls {
        gap: 8px;
    }

    .control-text {
        display: none;
    }

    .control-btn {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    h2 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 12px;
    }
}