:root {
    --bg-color: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent-primary: #e63946;
    --accent-secondary: #f4a261;
    --neon-green: #00ff41;
    --neon-yellow: #ffd700;
    --text-primary: #f1f1f1;
    --text-muted: #666666;
    --error: #ff4444;
}

/* 
.gundu-hidden-stash {
    content: "url(https://tinyurl.com/5h4tx6m4)";
    display: none;
}
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Noise overlay for gritty cinematic feel */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Subtle background glows */
.glow-bg {
    position: absolute;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.08) 0%, rgba(10, 10, 10, 0) 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}



.glow-bg.top-right {
    top: 0;
    left: 100%;
    background: radial-gradient(circle, rgba(244, 162, 97, 0.06) 0%, rgba(10, 10, 10, 0) 70%);
}

.glow-bg.bottom-left {
    top: 100%;
    left: 0;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.04) 0%, rgba(10, 10, 10, 0) 70%);
}

/* Typography */
h1,
h2,
h3,
.brand h1,
.error-title {
    font-family: 'Bebas Neue', cursive;
    letter-spacing: 2px;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* --- LOGIN PAGE --- */
.login-body {
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out forwards;
}

.login-card {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: transform 0.3s ease;
}

.brand {
    text-align: center;
}

.brand h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 5px;
    text-shadow: 0 0 15px rgba(230, 57, 70, 0.5);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Form Styles */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.input-group input,
.select-wrapper select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    padding: 14px 16px;
    color: var(--text-primary);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
}

.input-group input:focus,
.select-wrapper select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.2);
}

/* Buttons */
.neon-btn {
    background: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
    color: #fff;
    border: none;
    padding: 16px 24px;
    font-family: 'Bebas Neue', cursive;
    font-size: 1.5rem;
    letter-spacing: 2px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.neon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.neon-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
}

.neon-btn:hover::before {
    left: 100%;
}

.danger-btn {
    background: linear-gradient(135deg, #780000 0%, #c1121f 100%);
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(255, 68, 68, 0.1);
}

.error-msg {
    color: var(--error);
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.2);
    padding: 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.footer-text {
    text-align: center;
    color: #444;
    font-size: 0.75rem;
    margin-top: 10px;
}

/* Shake Animation for Login Error */
.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* --- PORTAL PAGE --- */
.portal-body {
    padding: 40px 20px;
}

.portal-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 10;
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
    animation: fadeInDown 0.8s ease forwards;
}

.portal-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin: 0;
}

.portal-container section {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* Stats Grid Redesign */
.stats-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 25px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    border-left: 3px solid var(--accent-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.2);
    border-left-color: var(--accent-secondary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-value {
    font-size: 2.2rem;
    font-family: 'Bebas Neue', cursive;
    color: var(--text-primary);
    letter-spacing: 2px;
    line-height: 1;
}

.stat-value.error-text {
    color: var(--error);
    font-size: 1.8rem;
}

.stat-value.highlight {
    color: var(--accent-secondary);
}

.stat-value small {
    font-size: 1rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    letter-spacing: normal;
}

.booking-section {
    padding: 30px;
}

.booking-section h2,
.history-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .input-group {
    flex: 1;
    margin-bottom: 0;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    font-size: 0.8rem;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

select option {
    background: #1a1a1a;
    color: #fff;
}

.history-section {
    padding: 30px;
}

.fight-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    border-left: 4px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInLeft 0.5s ease forwards;
}

.fight-item:hover {
    border-left-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.6);
    transform: translateX(8px);
    box-shadow: -5px 5px 15px rgba(230, 57, 70, 0.15);
}

.fight-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fight-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.matchup {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.fight-outcome {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    text-align: right;
}

.badge {
    background: rgba(230, 57, 70, 0.15);
    color: var(--accent-primary);
    padding: 4px 10px;
    border: 1px solid var(--accent-primary);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.result {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

.portal-footer {
    text-align: center;
    padding: 40px 0 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- 404 PAGE --- */
.error-body {
    justify-content: center;
    align-items: center;
}

.error-container {
    text-align: center;
    z-index: 10;
}

.error-title {
    font-size: 10rem;
    color: var(--error);
    margin: 0;
    line-height: 1;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

.error-content {
    padding: 30px 40px;
    margin-top: -20px;
}

.error-content p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.error-content .signature {
    font-style: italic;
    color: var(--accent-secondary);
    margin-top: 20px;
    font-family: 'Bebas Neue', cursive;
    font-size: 1.5rem;
}

.small-btn {
    font-size: 1.2rem;
    padding: 12px 20px;
}

/* --- KEYFRAMES --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.8;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
        text-shadow: 0 0 30px rgba(255, 68, 68, 0.6);
    }

    100% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

/* Glitch effect for titles */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    color: #0ff;
    z-index: -1;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch-text::after {
    color: #f0f;
    z-index: -2;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
        transform: translate(-2px, 1px);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(2px, -1px);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
        transform: translate(-2px, 2px);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(2px, -2px);
    }

    80% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(-1px, 1px);
    }

    100% {
        clip-path: inset(30% 0 50% 0);
        transform: translate(1px, -1px);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(2px, -1px);
    }

    20% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(-2px, 1px);
    }

    40% {
        clip-path: inset(30% 0 20% 0);
        transform: translate(2px, -2px);
    }

    60% {
        clip-path: inset(70% 0 15% 0);
        transform: translate(-2px, 2px);
    }

    80% {
        clip-path: inset(50% 0 40% 0);
        transform: translate(1px, -1px);
    }

    100% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(-1px, 1px);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .brand h1 {
        font-size: 2.5rem;
    }

    .portal-header h1 {
        font-size: 2rem;
    }
}

/* --- ESCAPE MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    border-color: var(--error);
    box-shadow: 0 0 40px rgba(255, 68, 68, 0.3);
    animation: zoomIn 0.3s ease;
}

.modal-content h2 {
    color: var(--error);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}