/* ==========================================================================
   KLSBench Styles
   ========================================================================== */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-bg: #1a1a1a;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Korean Literary Sinitic specific font */
.classical-text {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.1em;
    line-height: 1.8;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    opacity: 0.9;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.8s backwards;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-section {
    background: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.highlight-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.highlight-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.highlight-card ul {
    list-style: none;
    padding-left: 0;
}

.highlight-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.highlight-card li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* ==========================================================================
   Tasks Section
   ========================================================================== */

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.task-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.task-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.task-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.task-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.task-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.task-size {
    color: var(--secondary-color);
    font-weight: 600;
}

.task-metric {
    color: var(--text-light);
}

/* ==========================================================================
   Explorer Section
   ========================================================================== */

.explorer-section {
    background: var(--light-bg);
}

.explorer-controls {
    margin-bottom: 2rem;
}

.task-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.task-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.task-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.task-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.sample-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#sample-count {
    font-size: 1rem;
    color: var(--text-light);
}

.sample-display {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    min-height: 400px;
}

.sample-item {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.sample-item:hover {
    box-shadow: var(--shadow);
}

.sample-id {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.sample-content {
    margin-bottom: 1rem;
}

.sample-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.sample-text {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 6px;
    margin-top: 0.5rem;
}

.sample-answer {
    padding: 1rem;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 6px;
    margin-top: 1rem;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ==========================================================================
   Results Section
   ========================================================================== */

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.result-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.result-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.result-task {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.result-score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.result-card p {
    color: var(--text-light);
    line-height: 1.6;
}

.results-insight {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.results-insight h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.results-insight ul {
    list-style: none;
    padding-left: 0;
}

.results-insight li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    padding-left: 2rem;
    position: relative;
}

.results-insight li:before {
    content: "💡";
    position: absolute;
    left: 0.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section p {
    opacity: 0.9;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .task-selector {
        flex-direction: column;
    }

    .task-btn {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
