@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #e8f0fe;
    --primary-glow: rgba(37,99,235,0.15);
    --bg: #f4f6f9;
    --card: #fff;
    --text: #1a2235;
    --text-secondary: #5a6a85;
    --muted: #64748b;
    --border: #dde3ed;
    --shadow-sm: 0 1px 3px rgba(30,50,100,0.07);
    --shadow: 0 4px 12px rgba(30,50,100,0.09);
    --shadow-md: 0 8px 24px rgba(30,50,100,0.12);
    --hover-bg: #eef1f6;
    --correct: #16a34a;
    --wrong: #dc2626;
    --hero-grad: linear-gradient(135deg, #2563eb 0%, #60a5fa 50%, #93b4fd 100%);
    --radius-sm: 6px;
    --radius-md: 9px;
    --radius-lg: 14px;
    --transition: 0.2s ease;
}

body.dark {
    --primary: #5b9cf6;
    --primary-hover: #7db3f8;
    --primary-light: rgba(91,156,246,0.14);
    --primary-glow: rgba(91,156,246,0.15);
    --bg: #1c1f26;
    --card: #252930;
    --text: #e8ecf4;
    --text-secondary: #9aa3b8;
    --muted: #64748b;
    --border: #3a3f4c;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.25);
    --shadow: 0 4px 14px rgba(0,0,0,0.32);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.38);
    --hover-bg: #2f333d;
    --hero-grad: linear-gradient(135deg, #1e3a5f 0%, #312e81 50%, #4c1d95 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Noto Sans Bengali', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }

input, select, textarea {
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
select option { background: var(--card); color: var(--text); }
::placeholder { color: var(--muted); opacity: 0.7; }

.text-muted { color: var(--muted); }
.hidden { display: none !important; }

/* Header */
.site-header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
body.dark .site-header { background: rgba(37,41,48,0.90); }
.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 12px;
}
.header-inner h1 { font-size: 20px; font-weight: 700; }
.header-nav { display: flex; gap: 4px; }
.header-nav a {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.header-nav a:hover, .header-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}
.dark-btn {
    background: var(--hover-bg);
    border: 1.5px solid var(--border);
    padding: 6px 13px;
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all var(--transition);
}
.dark-btn:hover { background: var(--border); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--hover-bg); }
.btn-danger { background: var(--wrong); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 24px; font-size: 16px; }

/* Page body */
.page-body {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 16px 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 24px;
    background: var(--hero-grad);
    border-radius: var(--radius-lg);
    color: white;
}
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 800; letter-spacing: -0.5px; }
.hero p { font-size: 1rem; opacity: 0.92; margin: 10px auto 24px; max-width: 480px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-btns .btn { padding: 11px 24px; font-size: 15px; font-weight: 600; }
.hero-btns .btn-primary { background: white; color: var(--primary); }
.hero-btns .btn-primary:hover { background: #f0f4ff; }
.hero-btns .btn-ghost { background: rgba(255,255,255,0.15); color: white; border-color: rgba(255,255,255,0.3); }
.hero-btns .btn-ghost:hover { background: rgba(255,255,255,0.25); }

/* Quiz list */
.quiz-list-section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; }
.section-head h2 { font-size: 20px; font-weight: 700; }
.quiz-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    flex-wrap: wrap;
    gap: 10px;
}
.quiz-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.quiz-item .info h4 { font-size: 14px; font-weight: 600; }
.quiz-item .info small { color: var(--text-secondary); font-size: 12px; }
.quiz-item .actions { display: flex; gap: 8px; }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }
.empty p { margin: 6px 0; }
.empty .btn { margin-top: 12px; }

/* Form */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-select {
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Card */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-body { padding: 20px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 20px 16px;
    text-align: center;
    margin-top: auto;
}
.footer-copy { font-size: 11px; color: var(--muted); }

/* Layout */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Bordered section */
.section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.section + .section { margin-top: 16px; }
.section h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.section h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text-secondary); }

@media (max-width: 768px) {
    .header-nav { display: none; }
    .site-header { padding: 0 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero { padding: 40px 20px; }
    .mobile-nav { display: flex !important; }
}

.mobile-nav {
    display: none;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}
body.dark .mobile-nav { background: rgba(37,41,48,0.90); }
.mobile-nav a {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
}
@media (max-width: 768px) {
    .header-nav { display: none; }
    .site-header { padding: 0 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero { padding: 40px 20px; }
    .mobile-nav { display: flex !important; }
}
.mobile-nav a {
    white-space: nowrap;
    flex-shrink: 0;
}
