:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --text-main: #334155;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Header Redesign */
.page-header-wrapper {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.6) 100%);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-header-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    z-index: 1;
    animation: float-aura 10s ease-in-out infinite alternate;
}

@keyframes float-aura {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-50px, 30px);
    }
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-title-main {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 400;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
    border-color: var(--accent);
}

.btn-glass i {
    margin-right: 0.75rem;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Container Width Adjustments */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Advanced Form Elements */
.form-group-custom {
    position: relative;
    margin-bottom: 1rem;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0.5;
    transition: var(--transition);
    pointer-events: none;
    font-size: 1rem;
}

.form-control-icon {
    padding-left: 3rem !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: var(--bg-light) !important;
    transition: var(--transition) !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
}

.form-control-icon:focus {
    background: var(--white) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05) !important;
}

.form-control-icon:focus+.input-icon {
    opacity: 1;
    color: var(--accent);
}

.form-category-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.form-category-title i {
    margin-right: 0.75rem;
    color: var(--accent);
    font-size: 1.2rem;
}

/* Modern Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary);
    font-weight: 700;
}

/* Premium Header */
.premium-header {
    background: var(--primary);
    color: var(--white);
    padding: 1rem 0;
    transition: var(--transition);
}

.premium-nav {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-link-custom {
    color: var(--primary) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    transition: var(--transition);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link-custom:after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link-custom:hover:after {
    width: 60%;
}

.nav-link-custom:hover {
    color: var(--accent) !important;
}

/* Hero Section */
.hero-slider {
    margin-top: -1px;
}

.carousel-caption-custom {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: var(--radius);
    bottom: 20%;
}

/* Premium Cards */
.premium-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 100%;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.section-title {
    display: inline-block;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* Prize Grid */
.prize-card {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--white);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    box-shadow: var(--shadow-md);
}

.prize-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.prize-card:after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    pointer-events: none;
}

.prize-card:hover:after {
    left: 100%;
    top: 100%;
}

.prize-first {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%, #1e293b 200%);
    border-bottom: 4px solid var(--accent);
}

.prize-second {
    background: linear-gradient(135deg, #475569 0%, #1e293b 100%, #475569 200%);
    border-bottom: 4px solid #cbd5e1;
}

.prize-third {
    background: linear-gradient(135deg, #b45309 0%, #78350f 100%, #b45309 200%);
    border-bottom: 4px solid #fbbf24;
}

.prize-fourth {
    background: linear-gradient(135deg, #10b981 0%, #065f46 100%, #10b981 200%);
    border-bottom: 4px solid #a7f3d0;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.prize-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Winners Table */
.custom-table-container {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-custom {
    margin-bottom: 0;
}

.table-custom thead th {
    background: var(--primary);
    color: var(--white);
    border: none;
    font-weight: 600;
    padding: 1rem;
}

/* Winner Images */
.winner-img-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    background: var(--primary);
}

.winner-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
    display: block;
}

.winner-img-container:hover .winner-img {
    transform: scale(1.1);
    opacity: 0.7;
}

.winner-img-container::after {
    content: '\f00e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    color: var(--white);
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.winner-img-container:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Lightbox Modal */
.modal-backdrop.show {
    opacity: 0.9 !important;
    background-color: #000 !important;
}

.modal-content-custom {
    background: transparent;
    border: none;
}

.modal-body-custom {
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.7);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    font-size: 1.2rem;
    outline: none !important;
}

.nav-btn:hover {
    background: var(--accent);
    color: var(--primary);
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Feature List */
.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    color: var(--accent);
    margin-right: 1rem;
    font-size: 1.25rem;
}

/* Footer */
.premium-footer {
    background: var(--primary);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Responsive Mobile Improvements */
@media (max-width: 768px) {
    .premium-nav {
        padding: 0.5rem 0;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .carousel-item img {
        height: auto !important;
        object-fit: contain;
    }
}

/* 5 Column Grid for Bootstrap */
@media (min-width: 992px) {
    .col-lg-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* Sidebar Redesign */
.premium-sidebar {
    background: var(--primary) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2) !important;
}

.sidebar-header {
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    height: 80px;
    margin-bottom: 1rem;
}

.sidebar-title {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.sidebar-links {
    padding: 1rem 0;
}

.sidebar-link {
    display: flex !important;
    align-items: center;
    padding: 0.5rem 1.5rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.sidebar-link i {
    margin-right: 1rem;
    font-size: 1.1rem;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white) !important;
    border-left-color: var(--accent);
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent) !important;
    border-left-color: var(--accent);
}

/* Fix for overlapping content */
.main-content-wrapper {
    min-height: calc(100vh - 400px);
    padding-bottom: 4rem;
}

/* Info Cards for About The Test */
.info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.info-card-icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    transition: var(--transition);
}

.info-card:hover .info-card-icon-wrapper {
    background: var(--primary);
    color: var(--white);
}

.info-card-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 1.1rem;
}

.info-card-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Login Section Background */
#pnlogin {
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
}

.login-section-bg {
    background: linear-gradient(135deg, #0f172a 0%, #407cca 100%);
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-section-bg::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
    z-index: 0;
    animation: float-aura 15s ease-in-out infinite alternate;
}

.login-section-bg::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(71, 141, 219, 0.1) 0%, transparent 70%);
    z-index: 0;
    animation: float-aura 12s ease-in-out infinite alternate-reverse;
}