/* ========== Global Styles ========== */
* {
    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;
    color: #333;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ========== Cards ========== */
.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.main-card {
    max-width: 500px;
    width: 100%;
}

.login-card {
    max-width: 400px;
    width: 100%;
}

/* ========== Landing Page ========== */
.logo {
    font-size: 80px;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.feature {
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #555;
}

/* ========== Buttons ========== */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.2rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== Forms ========== */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-bottom: 10px;
    min-height: 20px;
}

.demo-credentials {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 0.9rem;
}

/* ========== Admin Panel ========== */
.admin-container {
    min-height: 100vh;
    background: #f5f7fb;
}

.admin-header {
    background: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    font-size: 1.5rem;
}

.admin-content {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-card {
    margin-bottom: 30px;
    text-align: left;
}

.admin-card h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* ========== Questions List ========== */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.question-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.question-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.question-item h4 {
    flex: 1;
    font-size: 1rem;
    color: #333;
}

.question-item-meta {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    color: #666;
}

.question-item-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.question-item-options span {
    background: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.question-item-options span.correct {
    background: #d4edda;
    color: #155724;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
}

.delete-btn:hover {
    background: #c82333;
}

.no-questions {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* ========== Quiz Page ========== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.quiz-header {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.quiz-info {
    display: flex;
    gap: 30px;
    font-weight: 600;
}

.timer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.timer.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.progress-container {
    background: white;
    height: 8px;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

/* ========== Quiz Content ========== */
.quiz-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.hidden {
    display: none !important;
}

/* Start Screen */
.start-screen {
    text-align: center;
}

.start-screen h2 {
    margin-bottom: 30px;
    color: #333;
}

.rules {
    text-align: left;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.rules h3 {
    margin-bottom: 15px;
    color: #333;
}

.rules ul {
    list-style: none;
}

.rules li {
    padding: 8px 0;
    color: #555;
}

/* Question Screen */
.question-card h2 {
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: #333;
    line-height: 1.5;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.option {
    padding: 18px 25px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: left;
    background: white;
}

.option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.option.correct {
    border-color: #28a745;
    background: #28a745;
    color: white;
}

.option.wrong {
    border-color: #dc3545;
    background: #dc3545;
    color: white;
}

.option.disabled {
    pointer-events: none;
}

.quiz-actions {
    text-align: center;
}

/* Result Screen */
.result-card {
    text-align: center;
}

.result-card h2 {
    margin-bottom: 30px;
    font-size: 2rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.result-message {
    font-size: 1.2rem;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 30px;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .options-grid,
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .quiz-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}