/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #EC4899;
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e1b4b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
}

input[type="text"] {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(236, 72, 153, 0.5);
}

.btn:active {
    transform: translateY(0);
}

/* Exam specific styles */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.student-info {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timer {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fca5a5;
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(252, 165, 165, 0.2);
}

.question-card {
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.option-label input[type="radio"] {
    display: none;
}

.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    margin-right: 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-label input[type="radio"]:checked + .custom-radio {
    border-color: var(--primary);
}

.option-label input[type="radio"]:checked + .custom-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.option-label input[type="radio"]:checked ~ .option-text {
    color: white;
    font-weight: 600;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.nav-buttons .btn {
    width: 48%;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#results-screen {
    text-align: center;
}

.score-display {
    font-size: 4rem;
    font-weight: 700;
    margin: 2rem 0;
    background: linear-gradient(to right, #34d399, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Admin Dashboard Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: var(--glass-bg);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table th {
    background: rgba(0,0,0,0.2);
    color: var(--text-muted);
    font-weight: 600;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header .btn {
    width: auto;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }
    
    .glass-panel {
        padding: 1.5rem;
        border-radius: 16px;
    }

    h1, h2 {
        font-size: 1.5rem;
    }

    .header-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-buttons .btn {
        width: 100%;
    }
    
    input[type="text"] {
        padding: 0.8rem;
    }
}
