/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #f0f0f0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Card */
.card {
    background: rgba(30, 30, 46, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid #39395a;
    backdrop-filter: blur(10px);
}

/* Typography */
h1 {
    color: #d44bff;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.2em;
    text-shadow: 0 0 10px rgba(212, 75, 255, 0.3);
}

.subtitle {
    color: #a78bfa;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #c084fc;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #6d28d9;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: #d44bff;
    box-shadow: 0 0 15px rgba(212, 75, 255, 0.3);
}

small {
    color: #94a3b8;
    font-size: 0.9em;
    display: block;
    margin-top: 5px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #d44bff 0%, #9333ea 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    margin: 10px 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 75, 255, 0.4);
}

.btn-primary:disabled {
    background: #4a5568;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: #d44bff;
    border: 2px solid #d44bff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(212, 75, 255, 0.1);
}

/* Quiz Components */
.quiz-header {
    margin-bottom: 30px;
    text-align: center;
}

.quiz-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.badge {
    background: rgba(212, 75, 255, 0.2);
    color: #d44bff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.user-info {
    color: #94a3b8;
}

.status-box {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin: 25px 0;
}

/* Loader */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #d44bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Winner Box */
.winner-box {
    background: linear-gradient(135deg, rgba(212, 75, 255, 0.1), rgba(147, 51, 234, 0.1));
    border: 2px solid #d44bff;
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    text-align: center;
}

.winner-details {
    font-size: 1.8em;
    font-weight: bold;
    color: #f0abfc;
    margin: 15px 0;
}

/* Progress Bar */
.progress-container {
    margin-top: 40px;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d44bff, #9333ea);
    width: 20%;
    transition: width 0.5s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    color: #94a3b8;
    font-size: 0.9em;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block;
}

.attempt-counter {
    text-align: right;
    margin-top: 8px;
    color: #fbbf24;
    font-weight: 600;
}

.result-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

.correct {
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid #22c55e;
    color: #86efac;
}

.wrong {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    color: #fca5a5;
}

.info-box {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}

.info-box h3 {
    color: #60a5fa;
    margin-bottom: 15px;
}

.info-box ul {
    list-style-position: inside;
    color: #cbd5e1;
}

.info-box li {
    margin-bottom: 8px;
    padding-left: 10px;
}

.admin-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-link a {
    color: #d44bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.admin-link a:hover {
    color: #f0abfc;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .quiz-info {
        flex-direction: column;
        gap: 10px;
    }
}