* {
    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: 900px;
    margin: 0 auto;
}

/* EKRANŲ RODYMAS */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* KORTELĖS */
.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* FORMOS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* MYGTUKAI */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
    width: 100%;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.teacher-login {
    margin-top: 30px;
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

/* TESTO HEADER */
.test-header {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.student-info {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #667eea;
    font-weight: 600;
}

.progress-text {
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.progress-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* KLAUSIMAI */
.question-card {
    margin-bottom: 30px;
}

.question-number {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-option {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.answer-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.answer-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.answer-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.answer-label {
    flex: 1;
    cursor: pointer;
    font-size: 1em;
}

/* NAVIGACIJOS MYGTUKAI */
.navigation-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.navigation-buttons .btn {
    flex: 1;
}

/* REZULTATAI */
.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.score-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

.score-percentage {
    font-size: 3em;
    font-weight: bold;
}

.score-text {
    font-size: 1.2em;
    margin-top: 5px;
}

.score-details {
    text-align: left;
}

.score-details p {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.score-message {
    margin-top: 20px;
    font-size: 1.3em !important;
    color: #667eea;
    font-weight: bold;
}

/* DETALŪS ATSAKYMAI */
.detailed-results {
    margin-top: 40px;
    border-top: 2px solid #e0e0e0;
    padding-top: 30px;
}

.detailed-results h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.detailed-question {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.detailed-question.wrong {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.detailed-question h4 {
    color: #333;
    margin-bottom: 10px;
}

.detailed-question p {
    margin: 5px 0;
}

.your-answer {
    color: #dc3545;
    font-weight: 600;
}

.correct-answer {
    color: #28a745;
    font-weight: 600;
}

/* MOKYTOJO PRISIJUNGIMAS */
.login-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.login-buttons .btn {
    flex: 1;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    text-align: center;
}

/* MOKYTOJO PANELĖ */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dashboard-header > div {
    flex: 1;
}

.dashboard-header h1 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 0;
}

.dashboard-tabs {
    display: flex;
    gap: 10px;
    background: white;
    padding: 10px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f8f9ff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* STATISTIKOS KORTELĖS */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 1em;
}

/* PAIEŠKA */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1em;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

/* LENTELĖ */
.results-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th, td {
    padding: 15px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:hover {
    background: #f8f9ff;
}

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

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

/* STUDENTŲ SĄRAŠAS */
.students-list {
    display: grid;
    gap: 20px;
}

.student-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.student-card h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.student-attempts {
    margin-top: 15px;
}

.attempt-item {
    padding: 10px;
    background: #f8f9ff;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* STATISTIKA */
.statistics-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.statistics-container h3 {
    color: #667eea;
    margin-bottom: 25px;
}

.question-stat {
    margin-bottom: 20px;
}

.question-stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.stat-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9em;
}

.stat-fill.medium {
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
}

.stat-fill.hard {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 40px;
    border-radius: 20px;
    max-width: 800px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .card {
        padding: 25px;
    }

    .header h1 {
        font-size: 2em;
    }

    .score-display {
        flex-direction: column;
        gap: 20px;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dashboard-tabs {
        flex-direction: column;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 10px 5px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .card {
        padding: 20px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .score-circle {
        width: 150px;
        height: 150px;
    }

    .score-percentage {
        font-size: 2em;
    }
}