* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    min-height: 100vh;
    color: #1f2937;
}

.screen {
    min-height: 100vh;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

.container {
    max-width: 56rem;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 0;
}

.result-container {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 1rem 0;
}

.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
}

@media (min-width: 768px) {
    .card {
        padding: 3rem;
    }
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #374151;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.info-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #eff6ff;
    border-radius: 0.5rem;
}

.info-box p {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.info-box ul {
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 1.5rem;
}

.info-box li {
    margin-top: 0.25rem;
}

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

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

@media (min-width: 768px) {
    .header h1 {
        font-size: 1.875rem;
    }
}

.timer {
    display: flex;
    align-items: center;
    color: #374151;
}

.timer .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.timer span {
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    margin-left: 0.5rem;
}

.progress-section {
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.lexile {
    color: #2563eb;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
    transition: width 0.3s;
    border-radius: 9999px;
}

.question-section {
    margin-bottom: 2rem;
}

.question-section h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .question-section h2 {
        font-size: 1.5rem;
    }
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option {
    width: 100%;
    text-align: left;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
}

.option:hover {
    border-color: #d1d5db;
}

.option.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.question-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.grid-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.grid-btn.answered {
    background: #2563eb;
    color: white;
}

.grid-btn.current {
    background: #d1d5db;
    color: #374151;
}

.countdown {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 5rem;
    height: 5rem;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    font-weight: 700;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: pulse 1s infinite;
}

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

.result-icon {
    width: 5rem;
    height: 5rem;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.result-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: #059669;
}

#resultScreen h2 {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.result-message {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
}

.result-box {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.result-item {
    text-align: left;
}

.result-item.full-width {
    grid-column: 1 / -1;
}

.result-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.lexile-result {
    font-size: 1.875rem;
    color: #2563eb;
}

.student-info {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
}