* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: #667eea;
    color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

tr:hover {
    background: #f8f9fa;
}

.score-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    color: white;
}

.score-excellent { background: #4caf50; }
.score-good { background: #2196f3; }
.score-average { background: #ff9800; }
.score-poor { background: #f44336; }

.detail-btn {
    padding: 8px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
}

.detail-btn:hover {
    background: #764ba2;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f44336;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
}

.question-detail {
    padding: 15px;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.correct { border-left-color: #4caf50; }
.incorrect { border-left-color: #f44336; }

.export-btn {
    padding: 12px 25px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    margin-bottom: 20px;
}

.export-btn:hover {
    background: #45a049;
}

/* Style dla grupowania dziennego */
.day-header {
    background: linear-gradient(45deg, #667eea, #764ba2) !important;
}

.day-header td {
    background: linear-gradient(45deg, #667eea, #764ba2) !important;
    color: white !important;
    font-weight: bold !important;
    padding: 15px !important;
    text-align: center !important;
    border-radius: 8px !important;
    margin: 5px 0 !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.day-result {
    background: rgba(102, 126, 234, 0.02) !important;
    transition: background-color 0.3s ease;
}

.day-result:hover {
    background: rgba(102, 126, 234, 0.08) !important;
}

.day-result td:first-child {
    padding-left: 25px !important;
    color: #667eea;
    font-weight: 500;
}

/* Dodatkowe style dla lepszego wyglądu */
.day-header td {
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    table {
        font-size: 0.9em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .day-header td {
        font-size: 0.9em !important;
        padding: 10px !important;
    }

    .day-result td:first-child {
        padding-left: 15px !important;
    }
}