/* LCREATOR Quiz System - Common Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Roboto:wght@400;700&family=Inter:wght@400;600;700&display=swap');

:root {
    --bg-dark: #000B18;
    --bg-card: rgba(255, 255, 255, 0.04);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-gold: #f59e0b;
    --text-white: #FFFFFF;
    --text-gray: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
}

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

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.6;
}

/* Background Grid */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.quiz-header .header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-header .logo {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1px;
    color: var(--text-white);
    text-decoration: none;
}

.quiz-header .logo span {
    font-weight: 400;
    opacity: 0.6;
    font-size: 14px;
    margin-left: 8px;
}

.quiz-header nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.quiz-header nav a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s;
}

.quiz-header nav a:hover,
.quiz-header nav a.active {
    color: var(--text-white);
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

/* Section Title */
.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 30px;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Module Grid */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* Module Card for Quiz */
.quiz-module-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quiz-module-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.quiz-module-card .module-num {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    color: var(--accent-blue);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.quiz-module-card .module-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.quiz-module-card .module-badge {
    font-size: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.quiz-module-card .module-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-gray);
}

.quiz-module-card .module-status .score {
    color: var(--accent-green);
    font-weight: 700;
}

.quiz-module-card.completed {
    border-color: var(--accent-green);
}

.quiz-module-card.completed::after {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--accent-green);
    font-size: 18px;
    font-weight: 700;
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar .fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    transition: width 0.5s ease;
}

/* Quiz Question */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.question-counter {
    font-size: 14px;
    color: var(--text-gray);
}

.question-progress {
    flex: 1;
    margin: 0 20px;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.option-btn:hover:not(.disabled) {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.option-btn .option-label {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.option-btn:hover:not(.disabled) .option-label {
    border-color: var(--accent-blue);
}

.option-btn.correct {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
}

.option-btn.correct .option-label {
    border-color: var(--accent-green);
    background: var(--accent-green);
    color: #fff;
}

.option-btn.wrong {
    border-color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

.option-btn.wrong .option-label {
    border-color: var(--accent-red);
    background: var(--accent-red);
    color: #fff;
}

.option-btn.disabled {
    pointer-events: none;
    opacity: 0.7;
}

/* Explanation */
.explanation {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-blue);
    background: rgba(59, 130, 246, 0.08);
    font-size: 14px;
    line-height: 1.7;
    animation: fadeIn 0.3s ease;
}

.explanation.correct-exp {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.08);
}

.explanation.wrong-exp {
    border-color: var(--accent-red);
    background: rgba(239, 68, 68, 0.08);
}

/* Result Section */
.result-card {
    text-align: center;
    padding: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.result-score {
    font-size: 72px;
    font-weight: 700;
    margin: 20px 0;
}

.result-score.perfect {
    color: var(--accent-gold);
}

.result-score.good {
    color: var(--accent-green);
}

.result-score.avg {
    color: var(--accent-blue);
}

.result-score.low {
    color: var(--accent-red);
}

.result-label {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-detail {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--text-white);
}

.btn-next {
    background: var(--accent-green);
    color: #fff;
}

.btn-next:hover {
    background: #059669;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

.fade-in {
    animation: fadeIn 0.4s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .quiz-header {
        flex-direction: column;
        gap: 15px;
    }

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

    .section-title {
        font-size: 22px;
    }

    .question-text {
        font-size: 17px;
    }

    .result-score {
        font-size: 48px;
    }

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

/* Heatmap colors */
.heat-0 {
    background: rgba(239, 68, 68, 0.3);
}

.heat-20 {
    background: rgba(239, 68, 68, 0.2);
}

.heat-40 {
    background: rgba(245, 158, 11, 0.2);
}

.heat-60 {
    background: rgba(59, 130, 246, 0.2);
}

.heat-80 {
    background: rgba(16, 185, 129, 0.2);
}

.heat-100 {
    background: rgba(16, 185, 129, 0.3);
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    padding: 10px 12px;
    text-align: left;
    color: var(--text-gray);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Chart bar */
.chart-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.chart-bar-label {
    width: 60px;
    font-size: 11px;
    color: var(--text-gray);
    text-align: right;
    flex-shrink: 0;
}

.chart-bar-track {
    flex: 1;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
}

.chart-bar-value {
    width: 40px;
    font-size: 12px;
    font-weight: 600;
}