/* SCHULBOX Frontend - Stylesheet (professionell, responsive) */
:root {
  --bg: #0f1117; --surface: #1a1d27; --surface2: #242837; --surface-hover: #222634;
  --border: #2e3347; --text: #e4e4e7; --text-dim: #9ca3af;
  --accent: #6366f1; --accent-hover: #818cf8;
  --green: #22c55e; --red: #ef4444; --amber: #f59e0b;
  --radius: 12px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent-hover); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

/* Navigation */
nav { background: rgba(26, 29, 39, 0.95); border-bottom: 1px solid var(--border); padding: 0.75rem 2rem; display: flex; align-items: center; gap: 1.5rem; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--accent-hover); }
.logo span { color: var(--text-dim); font-size: 0.9em; font-weight: 400; }
.user-badge { margin-left: auto; background: var(--surface2); border: 1px solid var(--border); padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.85rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.5rem; }
.user-badge span { color: var(--accent-hover); font-weight: 600; }

/* Layout */
.container { max-width: 1000px; margin: 0 auto; padding: 2rem; width: 100%; flex: 1; }

/* Buttons & Inputs */
.btn { background: var(--accent); color: white; border: none; padding: 0.7rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--surface-hover); }
input, select, textarea { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; color: var(--text); font-size: 0.9rem; width: 100%; outline: none; transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
textarea { resize: vertical; min-height: 90px; }

/* Hero */
.hero { text-align: center; padding: 3.5rem 2rem; background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%); border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 2rem; box-shadow: var(--shadow); }
.hero h1 { font-size: 2.4rem; margin-bottom: 0.75rem; background: linear-gradient(135deg, var(--accent-hover), var(--green)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text-dim); font-size: 1.1rem; }

/* Sections */
.content-section { display: none; animation: fadeIn 0.3s ease; }
.content-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.section-header h2 { font-size: 1.6rem; font-weight: 700; display: flex; align-items: center; gap: 0.75rem; }

/* Cards & Grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: all 0.2s; display: flex; flex-direction: column; justify-content: space-between; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.card p { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 1.25rem; }

/* Nav tabs */
.nav-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; background: var(--surface); padding: 0.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.nav-btn { background: transparent; border: none; color: var(--text-dim); padding: 0.6rem 1.1rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.nav-btn:hover { color: var(--text); background: var(--surface2); }
.nav-btn.active { background: var(--accent); color: white; box-shadow: var(--shadow); }

/* Rules table */
.rules-table-wrapper { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.rules-table { width: 100%; border-collapse: collapse; }
.rules-table th, .rules-table td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.rules-table th { background: var(--surface2); color: var(--text-dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.rules-table tr:last-child td { border-bottom: none; }
.rules-table tr:hover { background: rgba(99, 102, 241, 0.04); }

/* Badges */
.badge { padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; }
.tag-green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.tag-red { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.tag-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); }

/* FAQ accordion */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; transition: border-color 0.2s; }
.faq-item:hover { border-color: var(--accent); }
.faq-question { padding: 1.15rem 1.25rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 0.95rem; }
.faq-question .arrow { transition: transform 0.3s; color: var(--text-dim); }
.faq-question.open .arrow { transform: rotate(180deg); color: var(--accent); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 1.25rem; color: var(--text-dim); font-size: 0.9rem; }
.faq-answer.open { max-height: 400px; padding: 0 1.25rem 1.25rem; }

/* Substitution cards */
.sub-plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; transition: all 0.2s; }
.sub-plan:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.sub-header { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; }
.sub-date { font-weight: 700; color: var(--accent-hover); font-size: 1.05rem; }
.sub-class { background: var(--surface2); border: 1px solid var(--border); padding: 0.2rem 0.6rem; border-radius: 6px; font-size: 0.85rem; color: var(--text-dim); }
.sub-detail { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }
.sub-detail strong { color: var(--text); }

/* Blog links */
.blog-link { display: flex; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; transition: all 0.2s; text-decoration: none; color: var(--text); }
.blog-link:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.bl-icon { font-size: 1.75rem; }
.bl-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.25rem; }
.bl-desc { color: var(--text-dim); font-size: 0.9rem; }

/* Form boxes */
.form-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; margin-top: 2rem; box-shadow: var(--shadow); }
.form-box h3 { margin-bottom: 1.25rem; font-size: 1.2rem; display: flex; align-items: center; gap: 0.5rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }

/* Toast */
.toast { position: fixed; bottom: 2rem; right: 2rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 1rem 1.5rem; border-radius: var(--radius); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); z-index: 1000; transform: translateY(150%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); font-weight: 600; display: flex; align-items: center; gap: 0.75rem; }
.toast.show { transform: translateY(0); }
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }

/* Pulse animation */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.live-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; display: inline-block; animation: pulse 2s infinite; }

footer { text-align: center; padding: 2.5rem; color: var(--text-dim); font-size: 0.82rem; border-top: 1px solid var(--border); margin-top: auto; }

@media(max-width: 768px) {
  nav { padding: 0.75rem 1rem; }
  .container { padding: 1rem; }
  .hero h1 { font-size: 1.8rem; }
  .form-grid { grid-template-columns: 1fr; }
}
