/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.5;
    color: #1f2937;
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Card */
.card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.admin-card {
    max-width: 400px;
    margin: 0 auto;
}

/* Typography */
h1 {
    margin: 0 0 1rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
}

h2 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}

p {
    margin: 0 0 1rem 0;
}

.info {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Progress Bar */
.progress {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

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

/* Notice Box */
.notice {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.notice h2 {
    color: #0369a1;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.notice ul {
    margin: 0;
    padding-left: 1.25rem;
}

.notice li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: #0c4a6e;
}

/* Question Box */
.question-box {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.6;
}

/* Input Group */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1.125rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Choice Buttons */
.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Timer */
.timer-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.timer {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    background: #f3f4f6;
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    min-width: 100px;
}

.timer-warning {
    color: #dc2626;
    background: #fef2f2;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.timer-label {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Praise Message */
.praise-message {
    text-align: center;
    padding: 2rem 1rem;
}

.checkmark {
    font-size: 4rem;
    color: #22c55e;
    margin-bottom: 1rem;
}

.praise-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.6;
}

/* Thank You */
.thank-you {
    text-align: center;
    padding: 1rem;
}

.thank-you h1 {
    color: #22c55e;
}

.finished-icon {
    font-size: 4rem;
    color: #22c55e;
    margin-top: 1.5rem;
}

/* Error Message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Admin Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .timer {
        font-size: 2rem;
    }

    .question-text {
        font-size: 1rem;
    }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        justify-content: flex-start;
        padding-top: 1rem;
    }
}

/* Desktop admin dashboard */
@media (min-width: 800px) {
    .dashboard .container {
        max-width: 900px;
    }

    .dashboard .card {
        padding: 2rem;
    }
}
