/* Premium Modern Aesthetics */
:root {
    --primary-color: #6366F1;
    /* Vibrant Indigo */
    --primary-hover: #4F46E5;
    --success-color: #10B981;
    --success-hover: #059669;
    --bg-color: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.85);
    /* Glass effect */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --disabled-bg: #E2E8F0;
    --disabled-text: #94A3B8;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Premium Navbar */
.premium-nav {
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.15);
    padding-top: 1rem;
    padding-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.live-badge {
    background-color: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
}

/* Pulse Animation for Live Badge */
.pulse-animation i {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        text-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #EEF2FF 0%, #F8FAFC 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    filter: blur(40px);
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 250px;
    height: 250px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 50%;
    filter: blur(50px);
}

/* Test Card */
.test-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.test-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px -5px rgba(15, 23, 42, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.card-img-wrapper {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.test-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Timer Styling */
.timer-container {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

.timer-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}

.timer-header {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

.timer-display {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    min-width: 60px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.5);
    position: relative;
}

.time-val {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, #818CF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.2));
}

.time-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 0.35rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn-start-test {
    padding: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-start-test.disabled {
    background-color: var(--disabled-bg);
    color: var(--disabled-text);
    cursor: not-allowed;
    opacity: 1;
    /* Override bootstrap */
}

.btn-start-test.active {
    background: linear-gradient(135deg, var(--success-color) 0%, #34D399 100%);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-start-test.active::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s, transform 0.3s;
}

.btn-start-test.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-start-test.active:hover::after {
    opacity: 1;
    transform: scale(1);
    transition: transform 0.8s ease-out, opacity 0.3s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .time-box {
        min-width: 50px;
        padding: 0.5rem;
    }

    .time-val {
        font-size: 1.25rem;
    }
}