/* 
 * TestZamanı Quiz Plugin - Frontend Premium Design System
 * Modern, React-inspired UI with theme support
 */

:root {
    --tzq-primary: #3b82f6;
    --tzq-primary-dark: #2563eb;
    --tzq-secondary: #64748b;
    --tzq-success: #10b981;
    --tzq-error: #ef4444;
    --tzq-warning: #f59e0b;
    --tzq-bg: #f8fafc;
    --tzq-card-bg: #ffffff;
    --tzq-text: #1e293b;
    --tzq-text-muted: #64748b;
    --tzq-radius: 12px;
    --tzq-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.tzq-quiz-container {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--tzq-text);
    line-height: 1.6;
}

/* Theme color overrides based on taxonomy slug */
.tzq-theme-matematik { --tzq-primary: #0ea5e9; --tzq-primary-dark: #0284c7; }
.tzq-theme-turkce { --tzq-primary: #f43f5e; --tzq-primary-dark: #e11d48; }
.tzq-theme-fen-bilimleri { --tzq-primary: #10b981; --tzq-primary-dark: #059669; }
.tzq-theme-sosyal-bilgiler { --tzq-primary: #f59e0b; --tzq-primary-dark: #d97706; }
.tzq-theme-ingilizce { --tzq-primary: #8b5cf6; --tzq-primary-dark: #7c3aed; }
.tzq-theme-din-kulturu { --tzq-primary: #14b8a6; --tzq-primary-dark: #0d9488; }

.tzq-quiz-wrapper {
    background: var(--tzq-card-bg);
    border-radius: var(--tzq-radius);
    box-shadow: var(--tzq-shadow);
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

.tzq-screen {
    display: none;
    padding: 40px;
    animation: tzqFadeIn 0.4s ease-out;
}

@keyframes tzqFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tzq-screen.active {
    display: block;
}

/* Start Screen */
.tzq-start-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.tzq-theme-badge {
    margin-bottom: 20px;
}

.tzq-badge--theme {
    background: rgba(59, 130, 246, 0.1);
    color: var(--tzq-primary);
    padding: 6px 16px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.tzq-quiz-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--tzq-text);
    letter-spacing: -0.025em;
}

.tzq-quiz-description {
    font-size: 1.125rem;
    color: var(--tzq-text-muted);
    margin-bottom: 30px;
}

.tzq-quiz-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
}

.tzq-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tzq-info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--tzq-text-muted);
    letter-spacing: 0.05em;
}

.tzq-info-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tzq-text);
}

/* Buttons */
.tzq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.tzq-btn-primary {
    background: var(--tzq-primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tzq-btn-primary:hover {
    background: var(--tzq-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.tzq-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Progress Bar */
.tzq-progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 99px;
    margin: 30px 0;
    overflow: hidden;
}

.tzq-progress-fill {
    height: 100%;
    background: var(--tzq-primary);
    border-radius: 99px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Result Screen */
.tzq-result-container {
    text-align: center;
}

.tzq-result-crown {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: tzqBounce 2s infinite;
}

@keyframes tzqBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.tzq-result-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 30px 0;
}

.tzq-rstat-card {
    background: var(--tzq-bg);
    padding: 20px;
    border-radius: var(--tzq-radius);
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.tzq-rstat__icon {
    font-size: 1.5rem;
}

.tzq-rstat__val {
    font-size: 1.25rem;
    font-weight: 800;
}

.tzq-rstat__lbl {
    font-size: 0.75rem;
    color: var(--tzq-text-muted);
    font-weight: 600;
}
/* Leaderboard Registration & Success */
.tzq-leaderboard-reg {
    margin: 20px 0;
    animation: tzqFadeIn 0.5s ease-out;
}

.tzq-leaderboard-reg__inner {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--tzq-radius);
    padding: 24px;
    transition: all 0.3s ease;
}

.tzq-leaderboard-success .tzq-leaderboard-reg__inner {
    border-color: var(--tzq-success);
    background: rgba(16, 185, 129, 0.05);
}

.tzq-leaderboard-reg__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.tzq-leaderboard-reg__icon {
    font-size: 2rem;
}

.tzq-leaderboard-reg__title h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
}

.tzq-leaderboard-reg__title p {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--tzq-text-muted);
    font-weight: 600;
}

.tzq-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
}

@media (max-width: 640px) {
    .tzq-form-grid {
        grid-template-columns: 1fr;
    }
}

.tzq-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.tzq-form-input:focus {
    border-color: var(--tzq-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tzq-leaderboard-reg__note {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--tzq-text-muted);
    font-style: italic;
}
