.ad-slot {
    margin-bottom: 20px;
}

.page-hero {
    text-align: center;
    padding: 8px 12px 28px;
}
.page-hero-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(99, 102, 241, 0.2));
    color: #818CF8;
}
.page-hero-icon i {
    width: 30px;
    height: 30px;
}
.page-hero-icon-glow {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(8, 145, 178, 0.22));
    color: #06B6D4;
    animation: page-hero-icon-pulse 2.4s ease-in-out infinite;
}
@keyframes page-hero-icon-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.4)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.75)); }
}
.page-hero h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.page-hero p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 420px;
    margin: 0 auto 18px;
}
.page-hero-stats {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 20px;
}
.page-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.page-hero-stat strong {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #818CF8, #6366F1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}
.page-hero-stat span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}
.page-hero-guest-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 14px;
}
.page-hero-guest-note a {
    color: var(--primary-color);
    font-weight: 700;
}

.page-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.page-empty i {
    display: inline-block;
    margin-bottom: 12px;
    opacity: 0.6;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.popular-tag-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s;
}
.popular-tag-link:hover,
.popular-tag-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: #fff;
}
.popular-tag-link .count {
    opacity: 0.7;
    font-weight: 500;
}

.test-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s;
}
.test-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.14);
}
.test-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.18), rgba(99, 102, 241, 0.18));
    color: #818CF8;
    margin-bottom: 2px;
}
.test-card-icon i {
    width: 18px;
    height: 18px;
}
.test-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}
.test-card-cta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 4px;
}
.test-card:hover .test-card-cta {
    gap: 9px;
}
.test-card-cta i {
    transition: transform 0.2s;
}
.test-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.test-card-tag {
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.14);
    color: #818CF8;
    font-size: 0.72rem;
    font-weight: 700;
}
.test-card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}
.test-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}
.test-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.test-card-daily {
    border-color: rgba(6, 182, 212, 0.35);
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.08), 0 8px 20px rgba(6, 182, 212, 0.1);
}
.test-card-daily:hover {
    border-color: #06B6D4;
    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.18);
}
.test-card-daily .test-card-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(8, 145, 178, 0.22));
    color: #06B6D4;
}
.test-card-daily .test-card-desc {
    color: var(--text-primary);
    font-weight: 600;
}
.test-card-daily .test-card-cta {
    color: #06B6D4;
}
.test-card-daily-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #06B6D4;
    background: rgba(6, 182, 212, 0.14);
}

.test-card-tagmode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.tq-question-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}
.tq-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}
.tq-report-btn:hover {
    color: #ef4444;
}
.tq-question-index {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.tq-question-content {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.5;
}
.tq-option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.tq-option-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-base);
}
.tq-option-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}
.tq-option-letter {
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.tq-option-label.tq-correct {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.08);
}
.tq-option-label.tq-incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.tq-result-card {
    text-align: center;
    padding: 32px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 20px;
}
.tq-result-score {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--primary-color);
}
.tq-result-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}
.tq-result-bar-track {
    height: 12px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.2);
    overflow: hidden;
    margin: 16px auto 0;
    max-width: 320px;
}
.tq-result-bar-fill {
    height: 100%;
    background: #10B981;
    transition: width 0.4s ease;
}
.dq-answer-btn {
    width: 100%;
}

.dq-result-hero {
    text-align: center;
    padding: 36px 20px;
    border-radius: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}
.dq-result-hero-correct {
    background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.14), var(--card-bg) 70%);
    border-color: rgba(16, 185, 129, 0.3);
}
.dq-result-hero-wrong {
    background: radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.12), var(--card-bg) 70%);
    border-color: rgba(239, 68, 68, 0.28);
}
.dq-result-hero-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
}
.dq-result-hero-icon i {
    width: 40px;
    height: 40px;
}
.dq-result-hero-correct .dq-result-hero-icon {
    background: rgba(16, 185, 129, 0.16);
    color: #10B981;
}
.dq-result-hero-wrong .dq-result-hero-icon {
    background: rgba(239, 68, 68, 0.16);
    color: #ef4444;
}
.dq-result-hero-label {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}
.dq-result-hero-xp {
    margin-top: 6px;
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 800;
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.14);
}

.dq-page-stat-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.tq-guest-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--primary-color);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 16px;
}
.tq-guest-note i {
    flex-shrink: 0;
    margin-top: 2px;
}
.tq-guest-note span {
    flex: 1;
    min-width: 0;
}

.attempt-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
}
.attempt-row-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: rgba(129, 140, 248, 0.12);
    color: #818CF8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.attempt-row-main {
    flex: 1 1 200px;
    min-width: 0;
}
.attempt-row-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attempt-row-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.attempt-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.attempt-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}
.attempt-row-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .test-grid { grid-template-columns: 1fr; }
    .page-hero-stats { gap: 18px; }
    .page-hero-stat strong { font-size: 1.25rem; }

    .attempt-row-main {
        flex-basis: 100%;
    }
    .attempt-row-actions {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }
}
