:root {
    --bg-dark: #020b14;
    --primary: #00f3ff;
    --secondary: #9d00ff;
    --accent: #39ff14;
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
    --glass: rgba(2, 11, 20, 0.7);
    --border-color: rgba(0, 243, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: radial-gradient(circle at top, #1a2332 0%, #0a0f1c 100%);
    background-attachment: fixed;
    /* Ensure it covers full scroll */
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    padding-top: 0;
    min-height: 100vh;
}



/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Flexbox Utilities */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-end {
    justify-content: flex-end;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: 5px;
}

.gap-2 {
    gap: 10px;
}

.gap-3 {
    gap: 15px;
}

.gap-4 {
    gap: 20px;
}

/* Spacing Utilities */
.mb-1 {
    margin-bottom: 5px;
}

.mb-2 {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mb-4 {
    margin-bottom: 25px;
}

.mb-5 {
    margin-bottom: 40px;
}

.mt-1 {
    margin-top: 5px;
}

.mt-2 {
    margin-top: 10px;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 25px;
}

.mt-5 {
    margin-top: 40px;
}

.me-2 {
    margin-right: 10px;
}

.ms-2 {
    margin-left: 10px;
}



.form-group {
    margin-bottom: 20px;
    position: relative;
    /* For Password Toggle */
}

.form-control {
    width: 100%;
    padding: 12px;
    background: rgba(2, 11, 20, 0.6);
    /* Darker opacity for readability */
    border: 1px solid rgba(0, 243, 255, 0.2);
    color: var(--text-main);
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    background: rgba(2, 11, 20, 0.9);
}

.form-control.is-invalid {
    border-color: #ff4444;
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.3);
}

.form-control.is-valid {
    border-color: var(--accent);
    box-shadow: 0 0 5px rgba(57, 255, 20, 0.3);
}

/* Password Toggle Icon */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 40px;
    /* Adjust based on label height */
    cursor: pointer;
    color: var(--primary);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.password-toggle:hover {
    opacity: 1;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-accent {
    color: var(--accent);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 30px;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: all 0.3s ease;
    z-index: -1;
    border-radius: 30px;
}

.btn:hover {
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
}

.btn:hover::before {
    left: 0;
}

.btn-secondary {
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-secondary::before {
    background: var(--secondary);
}

.btn-secondary:hover {
    box-shadow: 0 0 20px rgba(157, 0, 255, 0.4);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: var(--glass);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* Announcement Bar - Horizontal Capsule Style */
.announcement-bar {
    position: relative;
    max-width: 800px;
    width: calc(100% - 60px);
    margin: 100px auto 20px auto;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border: 2px solid rgba(0, 243, 255, 0.5);
    border-radius: 60px;
    padding: 16px 60px 16px 28px;
    box-shadow:
        0 0 25px rgba(0, 243, 255, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Slide-in animation */
.announcement-slide-in {
    animation: slideDownCapsule 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), capsule-glow 4s ease-in-out 0.6s infinite;
}

@keyframes slideDownCapsule {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes capsule-glow {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(0, 243, 255, 0.15),
            0 8px 32px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow:
            0 0 35px rgba(0, 243, 255, 0.3),
            0 8px 32px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

/* Dismiss animation */
.announcement-bar.dismissed {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
    pointer-events: none;
}

/* Hover glow effect */
.announcement-bar:hover {
    box-shadow:
        0 0 40px rgba(0, 243, 255, 0.35),
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
}

.announcement-icon {
    color: var(--primary);
    font-size: 1.1rem;
    animation: pulse-icon 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-icon {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.15);
    }
}

/* Close/Dismiss Button */
.announcement-close {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    line-height: 1;
    backdrop-filter: blur(5px);
}

.announcement-close:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.9);
    color: #fff;
    transform: translateY(-50%) scale(1.15) rotate(90deg);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.announcement-close:active {
    transform: translateY(-50%) scale(1) rotate(90deg);
}

.announcement-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
}

.announcement-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.announcement-details {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Legacy support */
.announcement-text {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .announcement-bar {
        margin-top: 80px;
        padding: 10px 45px 10px 18px;
        border-radius: 30px;
        width: calc(100% - 24px);
    }

    .announcement-title {
        font-size: 0.85rem;
    }

    .announcement-details {
        font-size: 0.75rem;
    }

    .announcement-icon {
        font-size: 0.95rem;
    }

    .announcement-content {
        gap: 10px;
    }

    .announcement-text-wrapper {
        flex-direction: column;
        gap: 2px;
    }

    .announcement-close {
        right: 12px;
        width: 22px;
        height: 22px;
        font-size: 12px;
    }
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.brand-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.2;
    text-decoration: none;
    color: var(--text-main);
    z-index: 2;
    /* visible above other things */
}

.brand-text span {
    display: block;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    /* Center the links absolutely to ensure they are true center, or just margin auto */
    /* Since we have 3 items: Text, Links, Logo. Flex space-between works well if widths are balanced. */
    /* If we want true center, position absolute is an option, but flex is safer for responsive. */
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s;
}

.nav-logo:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px var(--primary));
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* User Dropdown */
.user-menu {
    position: relative;
    cursor: pointer;
}

.user-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    min-width: 200px;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
    margin-top: 10px;
    z-index: 1001;
}

.user-menu:hover .dropdown-content {
    display: block;
}

.dropdown-content p {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.dropdown-content .level {
    color: var(--accent);
    font-weight: bold;
}

.dropdown-content a {
    display: block;
    margin-top: 10px;
    color: var(--text-main);
    text-decoration: none;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    text-align: center;
}

.dropdown-content a:hover {
    background: rgba(0, 243, 255, 0.1);
}


/* Animations */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--primary);
    }

    50% {
        box-shadow: 0 0 20px var(--primary), 0 0 10px var(--secondary);
    }

    100% {
        box-shadow: 0 0 5px var(--primary);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.glow-box {
    animation: glow 3s infinite;
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

/* Forms handled above */

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    color: var(--primary);
    font-weight: 600;
}

/* Mobile Menu */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }
}