:root {
    --primary-color: #f09000;
    /* Vibrant Racing Red */
    --primary-hover: #d91b1b;
    --secondary-color: #0f0f12;
    /* Deep Matte Black */
    --card-bg: #1a1a1e;
    /* Dark Grey for Cards */
    --accent-color: #ffffff;
    --text-color: #e0e0e0;
    --bg-color: #08080a;
    /* Almost Black Background */
    --font-main: 'Outfit', sans-serif;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --blur-effect: blur(10px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Modern Transparent/Glass */
.main-header {
    background-color: rgba(15, 15, 18, 0.85);
    /* Semi-transparent */
    -webkit-backdrop-filter: var(--blur-effect);
    backdrop-filter: var(--blur-effect);
    color: var(--accent-color);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: var(--glass-border);
    transition: all 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo h1 {
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 1.8rem;
    font-style: italic;
    background: linear-gradient(45deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Gradient text */
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #a0a0a0;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    color: var(--accent-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
}

.glass-card {
    background: var(--glass-bg);
    border: var(--glass-border);
    backdrop-filter: var(--blur-effect);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.main-nav a:hover::after {
    width: 100%;
}

.btn-login {
    border: 1px solid var(--primary-color);
    padding: 8px 20px;
    border-radius: 30px;
    /* Pill shape */
    color: var(--primary-color) !important;
    font-weight: 600;
}

.btn-login:hover {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 46, 46, 0.4);
    color: white !important;
}

.btn-login::after {
    display: none;
    /* No underline for button */
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 80vh;
    /* Taller hero */
    background-color: #000;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax feel */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(8, 8, 10, 1) 100%);
    /* Smooth fade to black */
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 20px;
    animation: fadeInUp 1s ease-out 0.5s both;
    /* Animate text entry */
}

.slide-content h2 {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    font-style: italic;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.btn-cta {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(255, 46, 46, 0.4);
}

.btn-cta:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 46, 46, 0.6);
}

.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    /* Slightly clearer than pill for admin */
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(255, 46, 46, 0.4);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Sponsors */
.sponsors-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
    /* Dark bg */
    text-align: center;
}

.sponsors-section h2 {
    margin-bottom: 3rem;
    color: #fff;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 300;
    opacity: 0.8;
}

.sponsors-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    align-items: center;
}

.sponsor-card {
    background: var(--glass-bg);
    padding: 20px;
    border-radius: 12px;
    border: var(--glass-border);
    transition: transform 0.3s;
}

.sponsor-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.sponsor-card img {
    max-width: 180px;
    filter: grayscale(100%) brightness(1.5);
    /* Make logos look white/silver */
    transition: all 0.3s;
    opacity: 0.5;
}

.sponsor-card img:hover {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
}

/* Footer */
.main-footer {
    background-color: #000;
    color: #555;
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #222;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Authentication Page Styles */
.auth-page-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1b1b1e 0%, #08080a 100%);
    padding: 20px;
}

.auth-card {
    background: #151518;
    border: 1px solid #2a2a2e;
    border-radius: 16px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
}

.auth-card h2 {
    color: #fff;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-group label {
    display: block;
    color: #aaa;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
}

.form-input {
    width: 100%;
    background: #0f0f12;
    border: 1px solid #333;
    padding: 12px 15px;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 46, 46, 0.2);
}

.btn-block {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.auth-links {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
    color: #777;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Profile Action Buttons */
.btn-profile-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ddd;
    border: 1px solid #444;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.btn-profile-action:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #666;
    color: #fff;
    transform: translateY(-2px);
}

.btn-profile-action i {
    font-size: 1rem;
}

/* Social Links in Footer */
.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
}

.social-links a {
    text-decoration: none !important;
    border: none !important;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
    color: #777;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a::after,
.social-links a::before {
    content: none !important;
    display: none !important;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--primary-color);
}

/* Logo Animation */
.animated-logo {
    display: block;
}

.animated-logo .logo-path {
    fill: #ffffff;
    stroke: var(--primary-color);
    stroke-width: 10px;
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    pointer-events: visible;
    animation: drawLogo 10s ease-in-out infinite;
}

@keyframes drawLogo {
    0% {
        stroke-dashoffset: 4000;
        fill-opacity: 0;
        stroke: var(--primary-color);
    }

    15% {
        stroke-dashoffset: 0;
        fill-opacity: 0;
    }

    30% {
        stroke-dashoffset: 0;
        fill-opacity: 1;
        stroke: transparent;
    }

    95% {
        stroke-dashoffset: 0;
        fill-opacity: 1;
        stroke: transparent;
    }

    100% {
        stroke-dashoffset: 4000;
        fill-opacity: 0;
        stroke: transparent;
    }
}

.animated-logo:hover .logo-path {
    fill: var(--primary-color);
    fill: var(--primary-color);
    transition: fill 0.3s ease;
}

/* --- Hamburger Menu Styles --- */
.mobile-menu-btn {
    display: none;
    /* Hidden by default on desktop */
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
    z-index: 1001;
    border: none;
    background: transparent;
    padding: 0;
}

.mobile-menu-btn span {
    display: block !important;
    width: 100%;
    height: 3px;
    background-color: #fff !important;
    margin-bottom: 5px;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}

.mobile-menu-btn span:nth-child(1) {
    top: 0;
}

.mobile-menu-btn span:nth-child(2) {
    top: 10px;
}

.mobile-menu-btn span:nth-child(3) {
    top: 20px;
}

/* Animation Active State */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
    background-color: var(--primary-color);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 10px;
    background-color: var(--primary-color);
}

/* --- RESPONSIVE MEDIA QUERIES --- */

/* Tablet & Mobile (Max Width 1024px) */
@media (max-width: 1024px) {

    /* Header & Navigation */
    .mobile-menu-btn {
        display: block !important;
    }

    .main-nav ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(15, 15, 18, 0.95);
        backdrop-filter: blur(15px);
        padding: 20px 0;
        gap: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateY(-150%);
        /* Hidden by default */
        transition: transform 0.4s ease;
        z-index: 900;
    }

    .main-nav ul.active {
        transform: translateY(0);
        /* Visible */
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 15px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    .main-nav a:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .container {
        padding: 0 15px;
    }

    .hero-slider {
        height: 60vh;
    }

    .slide-content max-width {
        max-width: 90%;
    }

    .slide-content h2 {
        font-size: 3rem;
    }

    .sponsors-grid {
        gap: 2rem;
    }
}

/* Mobile Small (Max Width 768px) */
@media (max-width: 768px) {

    .main-nav ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(15, 15, 18, 0.95);
        backdrop-filter: blur(15px);
        padding: 20px 0;
        gap: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateY(-150%);
        /* Hidden by default */
        transition: transform 0.4s ease;
        z-index: 900;
    }

    .main-nav ul.active {
        transform: translateY(0);
        /* Visible */
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 15px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    .main-nav a:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    /* Hero */
    .hero-slider {
        height: 50vh;
        min-height: 400px;
    }

    .slide-content h2 {
        font-size: 2.2rem;
    }

    .btn-cta {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    /* Auth Forms */
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-card h2 {
        font-size: 1.5rem;
    }

    /* Sponsors */
    .sponsors-grid {
        gap: 1.5rem;
    }

    .sponsor-card img {
        max-width: 120px;
    }

    /* General Typography */
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 0.95rem;
    }

    /* Table Overflow Handling */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* --- Utilities & Grid System (Bootstrap-like) --- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-8,
.col-md-4,
.col-lg-3,
.col-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 768px) {
    .col-md-8 {
        flex: 0 0 66.66667%;
        max-width: 66.66667%;
    }

    .col-md-4 {
        flex: 0 0 33.33333%;
        max-width: 33.33333%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.text-end {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.g-4 {
    gap: 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    list-style: none;
    background-color: transparent;
    border-radius: 0.25rem;
}

.breadcrumb-item+.breadcrumb-item::before {
    display: inline-block;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    color: #6c757d;
    content: "/";
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Cards & Media */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--card-bg);
    background-clip: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.card-img-top {
    border-top-left-radius: calc(0.25rem - 1px);
    border-top-right-radius: calc(0.25rem - 1px);
}

.card-body {
    flex: 1 1 auto;
    padding: 1rem;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important;
}

/* Ratio */
.ratio {
    position: relative;
    width: 100%;
}

.ratio::before {
    display: block;
    padding-top: var(--bs-aspect-ratio);
    content: "";
}

.ratio-16x9 {
    --bs-aspect-ratio: 56.25%;
}

.ratio>* {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Typography */
.text-muted {
    color: #6c757d !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.text-gradient {
    background: linear-gradient(45deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.border-start {
    border-left: 1px solid #333 !important;
}

.border-4 {
    border-width: 4px !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.border-success {
    border-color: #2ecc71 !important;
}

.bg-light {
    background-color: #1a1a1e !important;
    color: white;
}

/* Dark theme adjustment */
.bg-white {
    background-color: #111 !important;
    color: white;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #fff;
    vertical-align: top;
    border-color: #333;
}

.table> :not(caption)>*>* {
    padding: .5rem .5rem;
    background-color: transparent;
    border-bottom-width: 1px;
    box-shadow: inset 0 0 0 9999px transparent;
}

.table-hover>tbody>tr:hover>* {
    color: #fff;
    background-color: rgba(255, 255, 255, .075);
}

/* Avatars */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: var(--primary-color);
}

/* --- More Utilities (Responsive & Layout) --- */
.gap-3 {
    gap: 1rem !important;
}

.d-none {
    display: none !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

@media (min-width: 768px) {
    .d-md-block {
        display: block !important;
    }

    .d-md-none {
        display: none !important;
    }

    .d-md-flex {
        display: flex !important;
    }

    .justify-content-md-between {
        justify-content: space-between !important;
    }

    .text-md-start {
        text-align: left !important;
    }
}