:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #f8fafc;
    --success-color: #22c55e;
    --warning-color: #eab308;
    --danger-color: #ef4444;
    --text-color: #1e293b;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--secondary-color);
    margin: 0;
    padding-bottom: 90px;
    overflow-x: hidden;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    inset: 0;
    background: rgba(37, 99, 235, 0.97);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    color: white;
    text-align: center;
    transition: opacity 0.5s ease-out;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.splash-content {
    max-width: 600px;
    width: 100%;
    padding: 1rem;
    margin: 0 auto;
}

.student-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.student-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.exam-info {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.exam-info h4 {
    color: #fbbf24;
    font-weight: 600;
    margin-bottom: 1rem;
}

.exam-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.exam-info li {
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.exam-info li i {
    color: #fbbf24;
    width: 24px;
    text-align: center;
}

.start-exam-btn {
    background: #22c55e;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.start-exam-btn:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

/* Main Content */
.page-content {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.page-content.visible {
    visibility: visible;
    opacity: 1;
}

.top-bar {
    background: white;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.main-content {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.category-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.category-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subcategory-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.subcategory-item:last-child {
    border-bottom: none;
}

.rating-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.rating-option {
    display: none;
}

.rating-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 32px;
    padding: 0 0.75rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.rating-option:checked + .rating-label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.comments-section {
    margin-top: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    display: none;
}

.comments-section.visible {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    resize: vertical;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Comment Modal */
.comment-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.comment-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.comment-modal.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Footer Controls */
.footer-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 0.75rem;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    z-index: 90;
}

.score-display {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: #f8fafc;
    white-space: nowrap;
}

.action-button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    color: white;
    background: var(--primary-color);
    min-width: 160px;
    justify-content: center;
}

.action-button .timer {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-left: 0.5rem;
}

.action-button:hover {
    background: var(--primary-hover);
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.splash-screen.hiding {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .splash-content {
        padding: 1rem;
    }

    .student-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .teacher-form {
        padding: 1rem !important;
    }

    .teacher-form > div:first-of-type,
    .teacher-form > div:nth-of-type(2) > div {
        grid-template-columns: 1fr !important;
    }
    
    .teacher-form > div:last-of-type > div {
        grid-template-columns: 1fr !important;
    }

    .footer-controls {
        padding: 0.5rem;
    }

    .score-display {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }

    .action-button {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
        min-width: auto;
    }

    .action-button i {
        display: none;
    }
}

@media (max-width: 360px) {
    .footer-controls {
        padding: 0.375rem;
        gap: 0.375rem;
    }
}

.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
}

.alert-danger {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

