/* css/pages/danh-sach-thi.css - Premium Glassmorphism for Exam List */

:root {
    --bg-deep: #0f172a;
    --accent-primary: #3b82f6;
    --text-light: #f8fafc;
    --font-heading: 'inter', sans-serif;
    --radius-md: 24px;
    --radius-sm: 16px;
}

body {
    background-color: #f8fafc;
    color: #334155;
    font-family: 'Inter', sans-serif;
}

/* --- Hero Section --- */
.dt-hero {
    position: relative;
    padding: 80px 40px;
    background: linear-gradient(-45deg, #0f172a, #1e293b, #0f172a, #090a57);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    color: white;
    text-align: center;
    border-radius: var(--radius-md);
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatingShape 20s infinite linear;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -50px;
    animation-duration: 25s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    right: 5%;
    animation-duration: 30s;
    animation-direction: reverse;
}

@keyframes floatingShape {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(30px, 30px) rotate(180deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

.dt-hero-content {
    position: relative;
    z-index: 10;
}

.page-title-new {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    color: white !important;
}

.page-subtitle-new {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px auto;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9) !important;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: white;
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* --- Glass Filters --- */
/* --- Quick Tabs --- */
.quick-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
}

.tab-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    background: transparent;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #f1f5f9;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.tab-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.test-list-controls {
    background: white;
    padding: 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.test-list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.filter-group select,
.search-box {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    outline: none;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    height: 45px;
}

.search-box i {
    color: #94a3b8;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    height: 100%;
    color: #334155;
}

.filter-group select:focus,
.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

/* --- GRID VIEW LAYOUT (CARDS) --- */
.test-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding-bottom: 50px;
    max-width: 100%;
}

.exam-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    /* Flex Column Layout */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    height: 100%;
}

.exam-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

/* Left: Icon */
.exam-card-left {
    flex-shrink: 0;
}

.subject-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eff6ff;
    /* Light blue bg */
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.exam-card:hover .subject-icon {
    background: var(--accent-primary);
    color: white;
}

/* Middle: Info */
.exam-card-middle {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.exam-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.exam-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-upcoming {
    background: #fff7ed;
    color: #f59e0b;
}

.status-active,
.status-in-progress {
    background: #eff6ff;
    color: #3b82f6;
}

.status-ended {
    background: #fef2f2;
    color: #ef4444;
}

.exam-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #64748b;
    font-size: 0.9rem;
}

.exam-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.exam-meta i {
    color: #94a3b8;
}

/* Right: Action Button */
.exam-card-right {
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.btn-start-test {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    padding: 10px 20px;
    background: white;
    color: #475569;
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn-start-test:hover:not(.disabled) {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-start-test.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f1f5f9;
}


/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .exam-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .exam-card-left {
        display: none;
        /* Optional: hide big icon on mobile to save space, or keep it */
    }

    .exam-card-middle {
        width: 100%;
    }

    .exam-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .exam-card-right {
        width: 100%;
        margin-top: 10px;
    }

    .status-badge {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
}