/**
 * Avatar Math Assessment - Frontend Styles
 */

/* Container */
.ama-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Screens */
.ama-screen {
    display: none;
}

.ama-screen.ama-active {
    display: block;
}

/* Cards */
.ama-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Header */
.ama-header {
    text-align: center;
    margin-bottom: 30px;
}

.ama-header h1 {
    font-size: 28px;
    margin: 0 0 10px;
    color: #1a1a2e;
}

.ama-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Forms */
.ama-form h2 {
    font-size: 20px;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.ama-form-row {
    display: flex;
    gap: 20px;
}

.ama-form-row .ama-form-group {
    flex: 1;
}

.ama-form-group {
    margin-bottom: 20px;
}

.ama-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.ama-form-group input,
.ama-form-group select,
.ama-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.ama-form-group input:focus,
.ama-form-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.ama-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.ama-checkbox input {
    width: auto;
}

/* Buttons */
.ama-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ama-btn-primary {
    background: #3b82f6;
    color: #fff;
}

.ama-btn-primary:hover {
    background: #2563eb;
}

.ama-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.ama-btn-secondary:hover {
    background: #e0e0e0;
}

.ama-btn-large {
    padding: 12px 28px;
    font-size: 18px;
    width: 100%;
    flex-direction: column;
}

.ama-btn-large small {
    font-weight: normal;
    opacity: 0.8;
}

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

.ama-btn-success {
    background: #10b981;
    color: #fff;
}

.ama-btn-success:hover {
    background: #059669;
}

/* Progress Bar */
.ama-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.ama-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

.ama-progress-text {
    text-align: right;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Question Content */
#ama-question-content {
    min-height: 300px;
    padding: 20px 0;
}

.ama-question-text {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #1a1a2e;
}

/* Multiple Choice Options */
.ama-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ama-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.ama-option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.ama-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.ama-option input {
    margin-right: 12px;
}

.ama-option label {
    cursor: pointer;
    flex: 1;
    font-size: 16px;
}

/* Numerical Input */
.ama-numerical-input {
    text-align: center;
    padding: 20px;
}

.ama-numerical-input label {
    display: block;
    margin-bottom: 15px;
    font-size: 16px;
    color: #666;
}

.ama-numerical-input input {
    width: 200px;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
}

.ama-numerical-input input:focus {
    border-color: #3b82f6;
    outline: none;
}

.ama-numerical-hint {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Question Navigation */
.ama-question-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

#ama-timer {
    color: #666;
}

/* Results */
.ama-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.ama-results-header h1 {
    font-size: 32px;
    margin: 0 0 10px;
}

.ama-result-box {
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.ama-result-box h2 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #666;
}

.ama-level {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ama-level-name {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
}

.ama-score {
    font-size: 16px;
    color: #333;
}

/* Level Colors */
.ama-level-a {
    color: #10b981;
}

.ama-level-b {
    color: #3b82f6;
}

.ama-level-c {
    color: #f59e0b;
}

/* Classes Section */
.ama-classes-section {
    margin-bottom: 30px;
}

.ama-classes-section h2,
.ama-classes-section h3 {
    margin-bottom: 15px;
}

.ama-class-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.ama-class-card h4 {
    margin: 0 0 10px;
    font-size: 18px;
}

.ama-class-card p {
    margin: 5px 0;
    color: #666;
}

.ama-class-card .ama-btn {
    margin-top: 15px;
    width: 100%;
}

.ama-equivalency-note {
    background: #fef3c7;
    color: #92400e;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    margin-top: 10px;
    display: inline-block;
}

/* No Classes / Lead Capture */
.ama-no-classes {
    background: #fef3c7;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.ama-no-classes h2 {
    color: #92400e;
    margin: 0 0 10px;
}

.ama-lead-capture {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.ama-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0 20px;
}

.ama-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Contact Info */
.ama-contact-info {
    text-align: center;
    color: #666;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.ama-contact-info p {
    margin: 5px 0;
}

/* Loading */
.ama-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ama-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 600px) {
    .ama-container {
        padding: 10px;
    }

    .ama-card {
        padding: 20px;
    }

    .ama-form-row {
        flex-direction: column;
        gap: 0;
    }

    .ama-header h1 {
        font-size: 24px;
    }

    .ama-question-nav {
        flex-direction: column;
        gap: 15px;
    }

    #ama-timer {
        order: -1;
    }
}