/**
 * QUIZ SYSTEM - Main Stylesheet
 * Centralny plik stylów dla całego systemu
 * Kolory zgodne z SIMP-ZORPOT: #2d5a3d (zielony główny)
 * Wersja z ulepszoną responsywnością
 */

/* ========================================
   ZMIENNE CSS
======================================== */
:root {
    --primary-color: #3a7d4f;
    --primary-dark: #2d5a3d;
    --primary-light: #4d9963;
    --secondary-color: #f0f7f3;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #888;
    --border-color: #ddd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

/* ========================================
   RESET I PODSTAWY
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #f5f7fa;
}

/* ========================================
   TŁO GRADIENT (strony użytkownika)
======================================== */
.gradient-background {
    background: linear-gradient(135deg, #4d9963 0%, #3a7d4f 100%);
    min-height: 100vh;
}

/* ========================================
   KONTENERY
======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* ========================================
   HEADER (admin i user)
======================================== */
.header {
    background: linear-gradient(135deg, #4d9963 0%, #3a7d4f 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    margin: 0;
}

/* ========================================
   PRZYCISKI
======================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 90, 61, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* ========================================
   FORMULARZE
======================================== */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* ========================================
   KOMUNIKATY
======================================== */
.message,
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.message.success,
.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: var(--success-color);
}

.message.error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: var(--danger-color);
}

.message.warning,
.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: var(--warning-color);
}

.message.info,
.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: var(--info-color);
}

/* ========================================
   INFO BOX
======================================== */
.info-box {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
}

.info-box h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.info-box ul {
    margin-left: 20px;
    color: var(--text-light);
}

/* ========================================
   TABELE
======================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    overflow-x: auto;
    display: block;
}

th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

tr:hover {
    background: #f8f9fa;
}

/* ========================================
   STATYSTYKI / KARTY
======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
	text-align: center;
}

/* ========================================
   GRUPY PYTAŃ (user/index.php)
======================================== */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.group-card {
    background: linear-gradient(135deg, #4d9963 0%, #3a7d4f 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: block;
}

.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(77, 153, 99, 0.4);
}

.group-card.disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.group-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

.group-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.group-info {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.6;
}

.group-info strong {
    font-size: 18px;
    font-weight: 700;
}

/* ========================================
   QUIZ - PROGRESS BAR
======================================== */
.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin: 15px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4d9963 0%, #3a7d4f 100%);
    transition: width 1s linear;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bar.warning {
    background: linear-gradient(90deg, #ff6b6b 0%, #ee5a6f 100%);
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ========================================
   QUIZ - PYTANIA I ODPOWIEDZI
======================================== */
.question-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.question-subgroup {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    border: 1px solid #d0e8d8;
}

.question-text {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.5;
}

.answers-container {
    display: grid;
    gap: 15px;
}

.answer-btn {
    background: white;
    border: 3px solid #e0e0e0;
    padding: 20px;
    border-radius: 10px;
    font-size: 18px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    display: flex;
    align-items: center;
}

.answer-btn:hover {
    border-color: var(--primary-color);
    background: var(--secondary-color);
    transform: translateX(5px);
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.answer-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
}

/* ========================================
   WYNIKI
======================================== */
.grade-display {
    text-align: center;
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 15px;
    background: linear-gradient(135deg, #4d9963 0%, #3a7d4f 100%);
    color: white;
}

.grade-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.grade-value {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

.grade-percentage {
    font-size: 24px;
    opacity: 0.9;
}

/* ========================================
   RESULTS PAGE - Specyficzne style
======================================== */
.results-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 700px;
    width: 100%;
    padding: 40px;
}

.header-banner {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #4d9963 0%, #3a7d4f 100%);
    border-radius: 15px;
    color: white;
}

.header-banner h1 {
    font-size: 42px;
    margin-bottom: 15px;
    line-height: 1.2;
}

.header-info {
    font-size: 18px;
    opacity: 0.95;
}

.email-section {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.email-section h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 18px;
}

.email-section p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 14px;
}

.email-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.email-form input {
    flex: 1;
}

.rodo-consent {
    display: flex;
    align-items: start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
}

.rodo-consent input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.rodo-consent span {
    color: #555;
    line-height: 1.5;
}

/* ========================================
   LOADING SPINNER
======================================== */
.loading {
    text-align: center;
    padding: 60px;
    font-size: 20px;
    color: var(--text-color);
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(77, 153, 99, 0.3);
    border-top-color: #4d9963;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   BADGE / ETYKIETY
======================================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Dodatkowe klasy dla ocen */
.badge-C, .badge-6 { background: #d4edda; color: #155724; }
.badge-B, .badge-5 { background: #cfe2ff; color: #084298; }
.badge-D, .badge-4 { background: #fff3cd; color: #664d03; }
.badge-3 { background: #ffe5d0; color: #853801; }
.badge-2, .badge-1 { background: #f8d7da; color: #58151c; }

/* ========================================
   NAWIGACJA ADMIN
======================================== */
.nav-menu {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========================================
   UTILITY CLASSES
======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.hidden { display: none !important; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

/* ========================================
   ZARZĄDZANIE GRUPAMI (groups_management)
======================================== */
.group-tree {
    margin: 20px 0;
}

.main-group {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.group-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.group-actions {
    display: flex;
    gap: 5px;
}

.subgroup-list {
    margin-left: 30px;
    margin-top: 15px;
}

.subgroup-item {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subgroup-item:hover {
    border-color: var(--primary-color);
}

.btn-icon {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
}

.group-stats {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.add-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* ========================================
   STRONA GŁÓWNA - Index
======================================== */
.main-title {
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.main-subtitle {
    color: #888;
    font-size: 16px;
    line-height: 1.5;
}

/* ========================================
   ACCORDION (user/index.php)
======================================== */
.accordion-container {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.accordion-header {
    background: linear-gradient(135deg, #4d9963 0%, #3a7d4f 100%);
    color: white;
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    user-select: none;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #5aad76 0%, #45925d 100%);
}

.accordion-header.active {
    border-radius: 10px 10px 0 0;
}

.accordion-title {
    font-size: 20px;
    font-weight: 600;
}

.accordion-icon {
    font-size: 24px;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 10px;
}

.accordion-header.active .accordion-icon {
    transform: rotate(90deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: white;
}

.accordion-content.active {
    max-height: 2000px;
    border: 2px solid #4d9963;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.accordion-body {
    padding: 25px;
}

.option-item {
    padding: 15px;
    margin-bottom: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
}

.option-item:hover {
    border-color: #4d9963;
    background: #f0f7f3;
    transform: translateX(5px);
}

.option-item.selected {
    border-color: #4d9963;
    background: #e8f4ed;
    border-width: 3px;
}

.option-item input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.option-label {
    flex: 1;
    cursor: pointer;
}

.option-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.option-stats {
    font-size: 14px;
    color: #666;
}

.start-button {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
}

.all-option {
    background: #f8f9fa;
    border-color: #4d9963;
}

/* ========================================
   RESPONSYWNOŚĆ
======================================== */
@media (max-width: 768px) {
    /* Podstawowe dostosowania */
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    /* Header */
    .header {
        padding: 15px 10px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Siatki */
    .stats-grid,
    .groups-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    /* Nawigacja admin */
    .nav-menu {
        flex-direction: column;
        padding: 15px;
        gap: 8px;
    }
    
    .nav-btn {
        width: 100%;
        padding: 12px;
        text-align: center;
    }
    
    /* Accordion - KLUCZOWE dla mobile */
    .accordion-container {
        margin: 0;
    }
    
    /* Główny tytuł na index.php */
    .main-title {
        font-size: 24px !important;
        margin-bottom: 8px !important;
        line-height: 1.2 !important;
    }
    
    .main-subtitle {
        font-size: 14px !important;
    }
    
    .accordion-header {
        padding: 15px;
    }
    
    .accordion-title {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .accordion-icon {
        font-size: 20px;
    }
    
    .accordion-body {
        padding: 15px;
    }
    
    .accordion-content.active {
        max-height: 3000px !important; /* Bardzo wysoki limit dla długich list */
    }
    
    /* Opcje w accordion */
    .option-item {
        padding: 12px;
        margin-bottom: 10px;
        gap: 10px;
        flex-direction: row;
        align-items: flex-start;
    }
    
    .option-item:hover {
        transform: none; /* Wyłącz przesunięcie na mobile */
    }
    
    .option-item input[type="radio"] {
        margin-top: 3px;
    }
    
    .option-name {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .option-stats {
        font-size: 12px;
        margin-top: 5px;
        line-height: 1.4;
    }
    
    .start-button {
        padding: 14px;
        font-size: 16px;
        margin-top: 15px;
    }
    
    /* Quiz - pytania i odpowiedzi */
    .question-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .question-text {
        font-size: 18px;
        margin-bottom: 20px;
        line-height: 1.4;
    }
    
    .answers-container {
        gap: 12px;
    }
    
    .answer-btn {
        padding: 15px;
        font-size: 16px;
        border-width: 2px;
    }
    
    .answer-btn:hover {
        transform: none; /* Wyłącz animację na mobile */
    }
    
    .answer-label {
        min-width: 30px;
        height: 30px;
        font-size: 14px;
        margin-right: 10px;
    }
    
    /* Progress bar */
    .progress-bar-container {
        height: 25px;
        margin: 10px 0;
    }
    
    .timer-text {
        font-size: 14px;
    }
    
    /* Wyniki */
    .grade-display {
        padding: 25px;
    }
    
    .grade-value {
        font-size: 36px;
    }
    
    .grade-percentage {
        font-size: 20px;
    }
    
    /* Results page - mobile */
    .results-container {
        padding: 20px;
        border-radius: 15px;
    }
    
    .header-banner {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .header-banner h1 {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .header-info {
        font-size: 15px;
    }
    
    .grade-display {
        padding: 25px 15px;
        margin-bottom: 20px;
    }
    
    .grade-label {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .grade-value {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .grade-percentage {
        font-size: 22px;
    }
    
    .email-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .email-section h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .email-section p {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .email-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .email-form input,
    .email-form button {
        width: 100%;
    }
    
    .rodo-consent {
        font-size: 12px;
    }
    
.actions {
    flex-direction: column !important;
    gap: 10px !important;
    justify-content: center !important;
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 20px 0 !important;
}

.actions .btn {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
    text-align: center !important;
    box-sizing: border-box !important;
}
    .actions .btn-secondary {
    width: 100% !important;
    display: block !important;
    text-align: center !important;
}
    /* Info box */
    .info-box {
        padding: 15px;
        font-size: 14px;
    }
    
    .info-box h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .info-box ul {
        margin-left: 15px;
        font-size: 13px;
    }
    
    .info-box li {
        margin-bottom: 8px;
        line-height: 1.5;
    }
    
    /* Tabele */
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
    
    /* Przyciski */
    .btn {
        padding: 10px 18px;
        font-size: 15px;
    }
    
    /* Formularze */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px; /* Zapobiega zoom na iOS */
        padding: 12px;
    }
    
    label {
        font-size: 14px;
    }
    
    /* Zarządzanie grupami */
    .subgroup-list {
        margin-left: 15px;
    }
    
    .group-title {
        font-size: 16px;
    }
    
    .group-actions {
        flex-wrap: wrap;
    }
    
    /* Loading */
    .loading {
        padding: 40px 20px;
        font-size: 16px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
}

@media (max-width: 480px) {
    /* Jeszcze mniejsze ekrany */
    .card {
        padding: 12px;
        border-radius: 10px;
    }
    
    /* Główny tytuł - małe telefony */
    .main-title {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }
    
    .main-subtitle {
        font-size: 13px !important;
    }
    
    /* Accordion */
    .accordion-header {
        padding: 12px;
    }
    
    .accordion-title {
        font-size: 15px;
    }
    
    .accordion-icon {
        font-size: 18px;
    }
    
    .accordion-body {
        padding: 12px;
    }
    
    /* Opcje */
    .option-item {
        padding: 10px;
    }
    
    .option-name {
        font-size: 13px;
    }
    
    .option-stats {
        font-size: 11px;
    }
    
    .start-button {
        font-size: 15px;
        padding: 12px;
    }
    
    /* Quiz */
    .question-card {
        padding: 15px;
    }
    
    .question-text {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .answer-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .answer-label {
        min-width: 28px;
        height: 28px;
        font-size: 13px;
        margin-right: 8px;
    }
    
    /* Progress bar */
    .progress-bar-container {
        height: 22px;
    }
    
    .timer-text {
        font-size: 12px;
    }
    
    /* Wyniki - małe telefony */
    .results-container {
        padding: 15px;
    }
    
    .header-banner {
        padding: 15px 10px;
    }
    
    .header-banner h1 {
        font-size: 24px;
    }
    
    .header-info {
        font-size: 14px;
    }
    
    .grade-display {
        padding: 20px 10px;
    }
    
    .grade-value {
        font-size: 28px;
    }
    
    .grade-percentage {
        font-size: 20px;
    }
    
    .stats-grid {
        gap: 8px;
    }
    
    .stat-item {
        padding: 12px 8px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .email-section {
        padding: 12px;
    }
    
    .email-section h3 {
        font-size: 15px;
    }
    
    .email-section p {
        font-size: 12px;
    }
    
    .rodo-consent {
        font-size: 11px;
    }
    
    /* Info box */
    .info-box {
        padding: 12px;
    }
    
    .info-box h3 {
        font-size: 15px;
    }
    
    .info-box ul {
        font-size: 12px;
        margin-left: 12px;
    }
    
    /* Przyciski */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* Stat cards */
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    /* Header */
    .header h1 {
        font-size: 16px;
    }
    
    /* Group cards */
    .group-card {
        padding: 20px;
    }
    
    .group-name {
        font-size: 18px;
    }
    
    .group-info {
        font-size: 13px;
    }
}

/* ========================================
   LANDSCAPE MODE (telefony w poziomie)
======================================== */
@media (max-width: 896px) and (orientation: landscape) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-text {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .answers-container {
        gap: 10px;
    }
    
    .answer-btn {
        padding: 12px;
        font-size: 15px;
    }
    
    .progress-bar-container {
        height: 22px;
    }
    
    .accordion-content.active {
        max-height: 2000px !important;
    }
    
    /* Results landscape */
    .results-container {
        padding: 20px;
    }
    
    .header-banner h1 {
        font-size: 28px;
    }
    
    .grade-display {
        padding: 20px 15px;
    }
    
    .grade-value {
        font-size: 32px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 15px 10px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}

/* ========================================
   TOUCH IMPROVEMENTS
======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Większe obszary klikalne dla urządzeń dotykowych */
    .answer-btn {
        min-height: 48px;
    }
    
    .option-item {
        min-height: 48px;
    }
    
    .accordion-header {
        min-height: 48px;
    }
    
    .btn {
        min-height: 44px;
    }
    
    /* Usuń hover effects na urządzeniach dotykowych */
    .answer-btn:hover,
    .option-item:hover,
    .group-card:hover {
        transform: none;
    }
}