/**
 * Trivia Lab - Frontend Stylesheet
 */

/* 1. Main Container */
.tl-frontend-wrapper {
    max-width: 600px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.6;
}

.tl-header h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #1d2327;
    text-align: center;
}

/* 2. Progress Bar */
.tl-progress-bar {
    background: #e2e8f0;
    height: 12px;
    border-radius: 6px;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid #cbd5e1;
}

.tl-progress-inner {
    background: #22c55e; /* Success Green */
    height: 100%;
    width: 0%; /* Updated via JS */
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3. Question & Answers */
#tl-question-stage h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.tl-answer-choice {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 12px 0;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.tl-answer-choice:hover:not(:disabled) {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
}

.tl-answer-choice:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* 4. Result States */
.tl-answer-choice.tl-correct {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.tl-answer-choice.tl-incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* 5. Feedback Box */
.tl-feedback {
    margin-top: 20px;
    padding: 15px;
    background: #eff6ff;
    border-left: 5px solid #3b82f6;
    border-radius: 4px;
    animation: fadeIn 0.4s ease-out;
}

/* 6. General Buttons */
.tl-frontend-wrapper .button {
    display: inline-block;
    padding: 12px 24px;
    background: #3b82f6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.tl-frontend-wrapper .button:hover {
    background: #2563eb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}