/* ================================================================
   THI THỬ PAGE - Stylesheet
   ================================================================ */

/* === Font for Vietnamese - Be Vietnam Pro (loaded in HTML) === */
body, html {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Force Vietnamese font for all text including card titles */
*, *::before, *::after {
    font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-synthesis: none;
}

/* Override h3 globally for this page to prevent letter-spacing issues */
.thi-thu-page-wrapper h3 {
    letter-spacing: 0;
    line-height: 1.4;
}

/* === Page Background Effects - giống HSA === */
.thi-thu-page-wrapper {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background layers */
.thi-thu-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #070D1F;
}

.thi-thu-bg-gradient {
    position: fixed;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    background: radial-gradient(ellipse at center top, rgba(245, 158, 11, 0.12) 0%, rgba(239, 68, 68, 0.05) 30%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.thi-thu-bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Floating orbs */
.thi-thu-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: thiThuFloat 20s ease-in-out infinite;
}

.thi-thu-orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(245, 158, 11, 0.1);
    top: 5%;
    left: -10%;
}

.thi-thu-orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(239, 68, 68, 0.08);
    bottom: 10%;
    right: -5%;
    animation-delay: -7s;
}

.thi-thu-orb-3 {
    width: 280px;
    height: 280px;
    background: rgba(16, 185, 129, 0.08);
    top: 45%;
    left: 55%;
    animation-delay: -12s;
}

@keyframes thiThuFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -40px) scale(1.05); }
    50% { transform: translate(-30px, 30px) scale(0.95); }
    75% { transform: translate(30px, 40px) scale(1.02); }
}

/* === Base Dark Background === */
body {
    background-color: #070D1F !important;
    font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Page Layout === */
.thi-thu-page {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 100vh;
    position: relative;
    background-color: transparent;
    z-index: 1;
}

/* === Badge đặc trưng cho trang miễn phí === */
.thi-thu-badge {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #F59E0B !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); }
    50% { box-shadow: 0 0 30px rgba(245, 158, 11, 0.35); }
}

.section-title-gradient {
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 50%, #EC4899 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 2.5rem;
    font-weight: 800;
}

.section-desc {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 1.1rem;
}

/* === Container === */
.thi-thu-page .container {
    position: relative;
    z-index: 1;
}

/* === Tabs TSA / HSA === */
.thi-thu-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    max-width: 500px;
    margin: 0 auto 40px auto;
    backdrop-filter: blur(10px);
}

.thi-thu-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.thi-thu-tab::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thi-thu-tab iconify-icon {
    font-size: 20px;
    position: relative;
    z-index: 1;
}

.thi-thu-tab span {
    position: relative;
    z-index: 1;
}

.thi-thu-tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.thi-thu-tab:hover::before {
    opacity: 1;
}

.thi-thu-tab.active {
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4),
                0 0 0 1px rgba(245, 158, 11, 0.2);
}

.thi-thu-tab.active::before {
    opacity: 0;
}

/* === Loading + Empty === */
.thi-thu-loading,
.thi-thu-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 24px;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}

.thi-thu-loading iconify-icon,
.thi-thu-empty iconify-icon {
    font-size: 64px;
    color: rgba(245, 158, 11, 0.4);
}

.thi-thu-empty h3 {
    margin: 0;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.thi-thu-empty p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    max-width: 400px;
}

.thi-thu-loading .spin {
    animation: spin 1s linear infinite;
}

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

/* === Grid card === */
.thi-thu-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.thi-thu-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

/* Animated gradient border */
.thi-thu-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.5), rgba(239, 68, 68, 0.5), rgba(236, 72, 153, 0.5));
    border-radius: 21px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s ease;
}

/* Left accent bar */
.thi-thu-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #F59E0B, #EF4444, #EC4899);
    border-radius: 20px 0 0 20px;
}

/* Card hover effect */
.thi-thu-card:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(245, 158, 11, 0.15);
    transform: translateX(8px);
}

.thi-thu-card:hover::before {
    opacity: 1;
}

/* Badge section - Left side */
.thi-thu-card-badge-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 20px 0 20px 24px;
}

.thi-thu-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(239, 68, 68, 0.15) 100%);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.thi-thu-card-badge iconify-icon {
    font-size: 18px;
}

/* Content section - Center */
.thi-thu-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 0;
    min-width: 0;
    font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.thi-thu-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga' 1, 'kern' 1;
    text-rendering: optimizeLegibility;
    padding-bottom: 2px;
}

.thi-thu-card-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 6px;
    flex-wrap: wrap;
    font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.thi-thu-card-code {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: inline-block;
}

.thi-thu-card-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 6px;
    flex-wrap: wrap;
    font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.thi-thu-card-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.thi-thu-card-meta-item iconify-icon {
    font-size: 16px;
    color: rgba(245, 158, 11, 0.7);
}

.thi-thu-card-meta-item .meta-value {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.thi-thu-card-meta-divider {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.4);
}

/* Free badge in meta */
.thi-thu-card-meta-item.free-badge .meta-value {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
}

/* Action section - Right side */
.thi-thu-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    color: white;
    border: none;
    border-radius: 0 18px 18px 0;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: -4px 0 24px rgba(245, 158, 11, 0.3);
    margin: 6px 6px 6px 0;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.thi-thu-card-action::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #EF4444 0%, #EC4899 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thi-thu-card-action span,
.thi-thu-card-action iconify-icon {
    position: relative;
    z-index: 1;
}

.thi-thu-card-action:hover {
    box-shadow: -8px 0 32px rgba(239, 68, 68, 0.4);
}

.thi-thu-card-action:hover::before {
    opacity: 1;
}

.thi-thu-card-action:hover iconify-icon {
    transform: translateX(4px);
}

.thi-thu-card-action iconify-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

/* Description (hidden by default) */
.thi-thu-card-desc {
    display: none;
}

/* ================================================================
   NAVBAR OVERRIDES FOR THI THU PAGE
   ================================================================ */
.navbar {
    height: 70px !important;
}

.navbar-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
}

.nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .thi-thu-page {
        padding-top: 100px;
    }

    .thi-thu-grid {
        gap: 14px;
    }

    .section-title-gradient {
        font-size: 2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .thi-thu-page {
        padding-top: 90px;
        padding-bottom: 60px;
    }

    .section-title-gradient {
        font-size: 1.75rem;
    }

    .section-desc {
        font-size: 1rem;
    }

    .thi-thu-tabs {
        flex-direction: row;
        max-width: 100%;
        padding: 4px;
        gap: 6px;
    }

    .thi-thu-tab {
        padding: 12px 16px;
        font-size: 14px;
        gap: 8px;
    }

    .thi-thu-tab iconify-icon {
        font-size: 18px;
    }

    .thi-thu-grid {
        gap: 12px;
    }

    .thi-thu-card {
        grid-template-columns: auto 1fr auto;
        gap: 16px;
        border-radius: 16px;
    }

    .thi-thu-card-badge-wrap {
        min-width: 80px;
        padding: 16px 0 16px 18px;
    }

    .thi-thu-card-badge {
        padding: 8px 14px;
        font-size: 12px;
        gap: 6px;
    }

    .thi-thu-card-badge iconify-icon {
        font-size: 16px;
    }

    .thi-thu-card-content {
        padding: 16px 0;
        gap: 8px;
    }

    .thi-thu-card-title {
        font-size: 15px;
    }

    .thi-thu-card-code {
        font-size: 11px;
    }

    .thi-thu-card-meta {
        gap: 16px;
        flex-wrap: wrap;
    }

    .thi-thu-card-meta-item {
        font-size: 13px;
        gap: 6px;
    }

    .thi-thu-card-meta-item iconify-icon {
        font-size: 14px;
    }

    .thi-thu-card-meta-divider {
        display: none;
    }

    .thi-thu-card-action {
        padding: 14px 18px;
        font-size: 13px;
        border-radius: 0 14px 14px 0;
    }

    .thi-thu-card-action iconify-icon {
        font-size: 16px;
    }

    .thi-thu-page::before,
    .thi-thu-page::after {
        display: none;
    }
}

/* Mobile Large */
@media (max-width: 600px) {
    .thi-thu-tabs {
        border-radius: 14px;
        margin-bottom: 28px;
    }

    .thi-thu-tab {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 10px;
    }

    .thi-thu-tab iconify-icon {
        font-size: 16px;
    }

    .thi-thu-card {
        gap: 14px;
    }

    .thi-thu-card-badge-wrap {
        min-width: 70px;
        padding: 14px 0 14px 14px;
    }

    .thi-thu-card-badge {
        padding: 6px 12px;
        font-size: 11px;
    }

    .thi-thu-card-action {
        padding: 12px 16px;
    }
}

/* Mobile Normal */
@media (max-width: 480px) {
    .thi-thu-page {
        padding-top: 80px;
        padding-bottom: 50px;
    }

    .thi-thu-tabs {
        margin-bottom: 24px;
    }

    .thi-thu-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: 1fr auto;
        gap: 12px;
    }

    .thi-thu-card-badge-wrap {
        grid-row: 1;
        min-width: auto;
        padding: 16px 0 0 16px;
    }

    .thi-thu-card-badge {
        padding: 6px 10px;
        font-size: 10px;
    }

    .thi-thu-card-badge iconify-icon {
        font-size: 12px;
    }

    .thi-thu-card-content {
        grid-column: 2;
        grid-row: 1;
        padding: 14px 14px 14px 0;
        gap: 6px;
    }

    .thi-thu-card-title {
        font-size: 14px;
    }

    .thi-thu-card-code {
        font-size: 10px;
    }

    .thi-thu-card-meta {
        gap: 12px;
    }

    .thi-thu-card-meta-item {
        font-size: 12px;
    }

    .thi-thu-card-action {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0 14px 14px 14px;
        border-radius: 12px;
        padding: 14px;
        justify-content: center;
    }

    .thi-thu-loading,
    .thi-thu-empty {
        padding: 60px 20px;
    }

    .thi-thu-loading iconify-icon,
    .thi-thu-empty iconify-icon {
        font-size: 48px;
    }

    .thi-thu-empty h3 {
        font-size: 18px;
    }

    .thi-thu-empty p {
        font-size: 13px;
    }
}

/* Mobile Small */
@media (max-width: 390px) {
    .thi-thu-page {
        padding-top: 70px;
    }

    .thi-thu-tabs {
        gap: 4px;
        padding: 3px;
    }

    .thi-thu-tab {
        padding: 8px 10px;
        font-size: 12px;
        gap: 6px;
    }

    .thi-thu-tab iconify-icon {
        font-size: 14px;
    }

    .thi-thu-card-meta {
        gap: 10px;
    }

    .thi-thu-card-meta-item {
        font-size: 11px;
    }

    .thi-thu-card-action {
        font-size: 12px;
        padding: 12px;
        margin: 0 12px 12px 12px;
    }
}

/* Mobile Very Small */
@media (max-width: 360px) {
    .thi-thu-card {
        gap: 10px;
    }

    .thi-thu-card-title {
        font-size: 13px;
    }

    .thi-thu-card-meta {
        gap: 8px;
    }

    .thi-thu-card-action {
        font-size: 11px;
        padding: 10px;
    }
}

/* Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .thi-thu-page {
        padding-top: 70px;
        padding-bottom: 40px;
    }
}

/* Safe Area Support */
@supports (padding: env(safe-area-inset-bottom)) {
    .thi-thu-page {
        padding-bottom: calc(50px + env(safe-area-inset-bottom));
    }
}
