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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    padding: 40px;
    overflow: hidden;
}

.screen {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #718096;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}

.input-group input,
.input-group select {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

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

.input-group input.error {
    border-color: #fc8181;
}

.error-message {
    font-size: 12px;
    color: #e53e3e;
    min-height: 18px;
}

.btn-primary {
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.guide-section {
    text-align: center;
}

.guide-section h2 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 20px;
}

.guide-list {
    text-align: left;
    list-style: none;
    margin-bottom: 30px;
}

.guide-list li {
    padding: 10px 0;
    padding-left: 24px;
    position: relative;
    color: #4a5568;
    line-height: 1.6;
}

.guide-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.test-header {
    margin-bottom: 24px;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

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

.test-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #718096;
}

.timer-label {
    margin-right: 6px;
    font-weight: 500;
}

.timer {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.timer.warning {
    color: #ed8936;
}

.timer.danger {
    color: #e53e3e;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

.test-content {
    margin-bottom: 24px;
}

.passage {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 20px;
    line-height: 1.8;
    color: #2d3748;
    font-size: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.question {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
    line-height: 1.6;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    padding: 14px 20px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.option-btn.selected {
    border-color: #667eea;
    background: #ebf4ff;
    color: #2d3748;
    font-weight: 600;
}

.test-footer {
    text-align: center;
}

.complete-section {
    text-align: center;
    padding: 40px 0;
}

.complete-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.complete-section h2 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 12px;
}

.complete-section p {
    color: #718096;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 24px;
    }

    .logo {
        font-size: 22px;
    }

    .guide-section h2,
    .complete-section h2 {
        font-size: 20px;
    }
}
