/* --- Zmienne globalne i Reset --- */
:root {
    --primary-color: #0056b3;    /* Klasyczny błękit edukacyjny */
    --secondary-bg: #f0f2f5;     /* Jasnoszare tło strony */
    --accent-color: #ffc107;     /* Złoty kolor dla testów i wyróżnień */
    --text-main: #333333;
    --sidebar-bg: #2d3e50;       /* Ciemna granatowa nawigacja */
    --sidebar-text: #ecf0f1;
    --white: #ffffff;
    --success: #28a745;
    --danger: #dc3545;
    --border-radius: 10px;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--secondary-bg);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* --- Układ Logowania i Rejestracji --- */
.auth-wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #002d5d 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-card h2 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.auth-card input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

/* --- Panel Boczny (Sidebar) --- */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 25px;
    background: rgba(0,0,0,0.2);
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-menu {
    flex-grow: 1;
    padding-top: 20px;
}

.nav-item {
    display: block;
    padding: 12px 25px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 5px solid transparent;
    font-size: 0.95rem;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    border-left: 5px solid var(--accent-color);
    padding-left: 30px;
}

/* --- Obszar Główny --- */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.content-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

h1, h2 {
    color: var(--primary-color);
}

/* --- Statystyki i Paski Postępu (Dashboard) --- */
.stat-box {
    text-align: center;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.progress-container {
    background: #eee;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    background: var(--primary-color);
    height: 100%;
    transition: width 0.8s ease-in-out;
}

details {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    margin: 15px 0;
}

summary {
    font-weight: bold;
    cursor: pointer;
    color: var(--primary-color);
    outline: none;
}

/* --- Tabele --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--white);
}

th {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.95rem;
}

tr:hover {
    background-color: #fcfcfc;
}

/* --- Przyciski --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.btn-primary { background-color: var(--primary-color); color: var(--white); }
.btn-danger { background-color: var(--danger); color: var(--white); }
.btn-success { background-color: var(--success); color: var(--white); }

.btn:hover {
    opacity: 0.85;
}

/* --- Multimedia (Wideo/Audio) --- */
video, audio {
    width: 100%;
    max-width: 800px;
    border-radius: var(--border-radius);
    margin-top: 15px;
    box-shadow: var(--shadow);
}

/* --- Sekcja Reklam --- */
.ads-container {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.adsense-box {
    background: #fff;
    color: #999;
    height: 120px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border: 1px dashed #ccc;
}