/* ============================================================
   AutoTest - Stilet Kryesore
   ============================================================ */

:root {
    --autotest-primary: #2563eb;
    --autotest-primary-dark: #1d4ed8;
    --autotest-success: #16a34a;
    --autotest-danger: #dc2626;
    --autotest-bg-light: #f8fafc;
    --autotest-border: #e2e8f0;
    --autotest-text: #1e293b;
    --autotest-radius: 10px;
}

/* ---------- Categories ---------- */
.autotest-categories-grid,
.autotest-tests-grid,
.autotest-sponsors-grid,
.autotest-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.autotest-category-card,
.autotest-test-card,
.autotest-sponsor-card,
.autotest-plan-card {
    background: #fff;
    border: 1px solid var(--autotest-border);
    border-radius: var(--autotest-radius);
    padding: 20px;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
    text-decoration: none;
    color: var(--autotest-text);
    position: relative;
}

.autotest-category-card:hover,
.autotest-test-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}

.autotest-category-card h3,
.autotest-test-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.autotest-test-meta {
    color: #64748b;
    font-size: .85rem;
    margin-bottom: 14px;
}

.autotest-game-card {
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.autotest-badge-game {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #f59e0b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
}

/* ---------- Buttons ---------- */
.autotest-btn {
    display: inline-block;
    background: var(--autotest-primary);
    color: #fff !important;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
    width: 100%;
}
.autotest-btn:hover { background: var(--autotest-primary-dark); }
.autotest-btn-locked { background: #94a3b8; }
.autotest-btn-small {
    display: inline-block;
    background: var(--autotest-primary);
    color: #fff !important;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: .9rem;
    cursor: pointer;
    text-decoration: none;
}

.autotest-whatsapp-btn {
    background: #25D366 !important;
}

/* ---------- Pricing Banner ---------- */
.autotest-pricing-banner {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--autotest-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 15px 0;
}
.autotest-pricing-banner a {
    background: #fff;
    color: var(--autotest-primary) !important;
}

/* ---------- Pricing Page ---------- */
.autotest-discount-box {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.autotest-discount-box input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid var(--autotest-border);
    border-radius: 6px;
}
#autotest-discount-message { font-weight: 600; }

.autotest-plan-card.selected {
    border-color: var(--autotest-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.autotest-plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--autotest-primary);
    margin: 8px 0;
}
.autotest-price-original {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 1.2rem;
    margin-right: 6px;
}

.autotest-payment-methods {
    margin-top: 30px;
    padding: 20px;
    background: var(--autotest-bg-light);
    border-radius: var(--autotest-radius);
}
.autotest-payment-option {
    background: #fff;
    border: 1px solid var(--autotest-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

/* ---------- Sponsors ---------- */
.autotest-sponsor-card img { max-width: 100%; border-radius: 6px; margin-bottom: 10px; }

/* ---------- Leaderboard ---------- */
.autotest-leaderboard-wrapper { margin: 20px 0; }
.autotest-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.autotest-leaderboard-table th,
.autotest-leaderboard-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--autotest-border);
    text-align: left;
}
.autotest-leaderboard-table th { background: var(--autotest-bg-light); }
.autotest-leaderboard-table tr:nth-child(1) td:first-child { color: gold; font-weight: 800; }
.autotest-leaderboard-table tr:nth-child(2) td:first-child { color: silver; font-weight: 800; }
.autotest-leaderboard-table tr:nth-child(3) td:first-child { color: #cd7f32; font-weight: 800; }

/* ---------- Account ---------- */
.autotest-account-wrapper { max-width: 700px; margin: 0 auto; }
.autotest-form { display: flex; flex-direction: column; gap: 10px; max-width: 400px; }
.autotest-form input {
    padding: 12px;
    border: 1px solid var(--autotest-border);
    border-radius: 6px;
}
.autotest-results-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.autotest-results-table th, .autotest-results-table td {
    padding: 8px 12px; border-bottom: 1px solid var(--autotest-border); text-align: left; font-size: .9rem;
}

/* ============================================================
   MODAL / POPUP QUIZ - Mobile Friendly
   ============================================================ */
.autotest-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,23,42,.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.autotest-modal-content {
    background: #fff;
    width: 100%;
    height: 100%;
    max-width: 600px;
    max-height: 100vh;
    border-radius: 0;
    overflow-y: auto;
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
}

@media (min-width: 700px) {
    .autotest-modal-content {
        height: auto;
        max-height: 90vh;
        border-radius: var(--autotest-radius);
        padding: 24px;
    }
}

.autotest-notif-content {
    height: auto !important;
    max-width: 450px;
    border-radius: var(--autotest-radius) !important;
    text-align: center;
    padding: 30px 20px !important;
}

.autotest-quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.autotest-quiz-header h3 { margin: 0; font-size: 1.1rem; flex: 1; }

.autotest-timer {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--autotest-primary);
    background: var(--autotest-bg-light);
    padding: 4px 12px;
    border-radius: 6px;
    min-width: 60px;
    text-align: center;
}
.autotest-timer.autotest-timer-warning { color: var(--autotest-danger); }

.autotest-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    color: #94a3b8;
    padding: 0 6px;
}

.autotest-progress-bar {
    height: 6px;
    background: var(--autotest-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.autotest-progress-fill {
    height: 100%;
    background: var(--autotest-primary);
    width: 0%;
    transition: width .3s ease;
}
.autotest-question-counter {
    text-align: center;
    color: #64748b;
    font-size: .9rem;
    margin: 4px 0 16px;
}

.autotest-question-container { flex: 1; }

.autotest-question-text {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.4;
}

.autotest-question-image {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 14px;
    background: #f1f5f9;
}

.autotest-multi-hint {
    font-size: .8rem;
    color: #f59e0b;
    margin-bottom: 10px;
    font-weight: 600;
}

.autotest-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 2px solid var(--autotest-border);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.autotest-option:active { transform: scale(.98); }

.autotest-option.selected {
    border-color: var(--autotest-primary);
    background: #eff6ff;
}
.autotest-option.correct-answer {
    border-color: var(--autotest-success);
    background: #f0fdf4;
}
.autotest-option.wrong-answer {
    border-color: var(--autotest-danger);
    background: #fef2f2;
}

.autotest-option-letter {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--autotest-bg-light);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: .9rem;
}
.autotest-option.selected .autotest-option-letter {
    background: var(--autotest-primary);
    color: #fff;
}

/* ---------- Result Screen ---------- */
.autotest-quiz-result { text-align: center; padding: 20px 0; }
.autotest-result-score {
    font-size: 3rem;
    font-weight: 800;
    margin: 10px 0;
}
.autotest-result-pass { color: var(--autotest-success); }
.autotest-result-fail { color: var(--autotest-danger); }
.autotest-result-percent { font-size: 1.3rem; color: #64748b; margin-bottom: 20px; }

.autotest-review-item {
    text-align: left;
    border: 1px solid var(--autotest-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}
.autotest-review-item.is-correct { border-left: 4px solid var(--autotest-success); }
.autotest-review-item.is-wrong { border-left: 4px solid var(--autotest-danger); }

/* ---------- Subscription Lock screen ---------- */
.autotest-lock-screen {
    text-align: center;
    padding: 40px 20px;
}
.autotest-lock-screen h3 { font-size: 1.4rem; margin-bottom: 10px; }
