@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --secondary: #1e293b;
    --accent: #f59e0b;
    --bg: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text: #0f172a;
    --text-light: #64748b;
    --success: #22c55e;
    --error: #ef4444;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Classes */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
}

/* Layout */
header {
    background: white;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

main {
    flex: 1;
    padding: 2rem 5%;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* Intro Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.hero p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Quiz Container */
#quiz-container {
    display: none;
    /* Shown via JS */
    margin-top: 2rem;
    padding: 2.5rem;
}

.progress-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.4s ease;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.options-container {
    display: grid;
    gap: 1rem;
}

.option {
    padding: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.option:hover {
    border-color: var(--primary);
    background: rgba(13, 148, 136, 0.05);
}

.option.correct {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.option.wrong {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.option.disabled {
    pointer-events: none;
}

/* Feedback Section */
.feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    display: none;
}

.feedback.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-category {
    background: white;
    color: var(--text-light);
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
}

.btn-category:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-category.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2);
}

.btn-category span {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: #f1f5f9;
    border-radius: 999px;
    color: var(--text-light);
    font-weight: 600;
}

.btn-category.active span {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Section */
#result-container {
    display: none;
    text-align: center;
    padding: 3rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 10px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

/* Auth Section */
.auth-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2.5rem;
    display: none;
}

.auth-form h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

/* Dashboard & Admin Panel */
#admin-panel,
#user-dashboard {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f8fafc;
    color: var(--text-light);
    font-weight: 600;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-passing {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.status-failing {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
}

.nav-links a:hover {
    color: var(--primary);
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    #quiz-container {
        padding: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Simplified for demo */
}

/* Difficulty Badges */
.difficulty-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.difficulty-badge.kolay { background: #dcfce7; color: #166534; }
.difficulty-badge.orta { background: #fef9c3; color: #854d0e; }
.difficulty-badge.zor { background: #fee2e2; color: #991b1b; }

/* Sidebar */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 2rem;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
}

.sidebar h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary);
    font-size: 1.1rem;
}

.topic-list {
    list-style: none;
}

.topic-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    border: 1px solid transparent;
}

.topic-item:hover {
    border-color: var(--primary);
    background: rgba(13, 148, 136, 0.05);
}

.topic-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.topic-item p {
    font-size: 0.8rem;
    color: var(--text-light);
}

.topic-content {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
    animation: fadeIn 0.3s ease;
}

.topic-item.active .topic-content {
    display: block;
}

@media (max-width: 1024px) {
    .sidebar {
        display: none; /* Hide on smaller screens for now */
    }
}