@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

/* Enable smooth page transitions for modern browsers */
@view-transition {
    navigation: auto;
}

/* Customize the transition animation */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.3s;
    animation-timing-function: ease-in-out;
}

:root {
    --bg: #050507;
    /* Darker black for contrast */
    --card-bg: rgba(20, 20, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Brand Colors */
    --primary: #5865F2;
    --primary-glow: rgba(88, 101, 242, 0.5);

    --danger: #ed4245;
    --danger-glow: rgba(237, 66, 69, 0.5);

    --success: #2ecc71;
    /* Brighter Green */
    --success-glow: rgba(46, 204, 113, 0.5);

    --text: #ffffff;
    --text-mute: #a1a1aa;
}

* {
    box-sizing: border-box;
}

/* Prevent flashing content */
body {
    opacity: 1;
    /* Default state */
    transition: opacity 0.5s ease;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    /* Subtle grid pattern */
    background-image:
        radial-gradient(at 0% 0%, rgba(88, 101, 242, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(237, 66, 69, 0.1) 0px, transparent 50%),
        radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 30px 30px;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(5, 5, 7, 0.8);
    /* More transparency */
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.server-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.server-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* --- BUTTONS (THE GLOW) --- */
.btn {
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border-radius: 12px;
    /* Softer corners */
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* The Glow Magic */
    box-shadow: 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* Primary Button Hover */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px var(--primary-glow);
    filter: brightness(1.1);
}

/* Danger Button (Red Glow) */
.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    box-shadow: 0 10px 30px -10px var(--danger-glow);
}

/* Outline Button (Subtle) */
.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-mute);
}

.btn-outline:hover {
    border-color: var(--text);
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 20px -5px rgba(255, 255, 255, 0.1);
}

/* --- LAYOUT --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
    flex: 1;
    animation: fadeIn 0.6s ease-out;
}

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

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

/* --- CARDS --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    /* Modern rounded look */
    padding: 2.5rem;
    margin-bottom: 24px;
    backdrop-filter: blur(20px);
    /* Heavy blur */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    /* Smooth GPU-accelerated hover effect */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    will-change: transform;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.3);
}

/* --- FORMS & INPUTS --- */
input,
textarea {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    margin-top: 8px;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15);
}

/* --- HERO --- */
.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    /* Text Gradient */
    background: linear-gradient(to bottom right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-mute);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

/* --- TABLES --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

th {
    text-align: left;
    color: var(--text-mute);
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    color: #eee;
}

tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.bg-ban {
    background: rgba(237, 66, 69, 0.15);
    color: #ff5f62;
    border: 1px solid rgba(237, 66, 69, 0.2);
}

.bg-kick {
    background: rgba(240, 178, 50, 0.15);
    color: #ffcd4d;
    border: 1px solid rgba(240, 178, 50, 0.2);
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }
}

/* --- CURSOR GLOW EFFECT --- */
#cursor-glow {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.08), transparent 60%);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    /* Centers the glow on the mouse */
    pointer-events: none;
    /* Lets clicks pass through */
    z-index: -1;
    /* Behind the content */
    transition: opacity 0.3s ease, transform 0.1s ease-out;
    opacity: 1;
    mix-blend-mode: screen;
    /* Blends nicely with dark bg */
}

/* When hiding */
#cursor-glow.hidden {
    opacity: 0;
}

/* --- BACKGROUND FLOATING EMOJIS --- */
.floating-emoji {
    position: fixed;
    bottom: -150px;
    /* Start below screen */
    z-index: -5;
    /* Way behind everything */
    pointer-events: none;
    opacity: 0.6;
    /* Subtle visibility */
    animation: floatUp linear infinite;
    filter: drop-shadow(0 0 10px rgba(88, 101, 242, 0.2));
    /* Slight glow */
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.15;
        /* Fade in */
    }

    90% {
        opacity: 0.15;
        /* Stay visible */
    }

    100% {
        transform: translateY(-120vh) rotate(360deg) scale(1);
        /* Move way up */
        opacity: 0;
    }
}

/* --- MOBILE RESPONSIVENESS --- */

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    .container {
        padding: 2rem 1.5rem;
    }

    /* Dashboard grid adjustments */
    .card {
        padding: 1.5rem;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {

    /* 1. Layout Adjustments */
    .container {
        padding: 1.5rem 1rem;
    }

    .navbar {
        padding: 0.75rem 1rem;
        gap: 10px;
    }

    .server-brand {
        font-size: 1rem;
        gap: 10px;
    }

    .server-logo {
        width: 36px;
        height: 36px;
    }

    /* 2. Hero Section */
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    /* Hero icon smaller on mobile */
    .hero img[id="heroIcon"] {
        width: 80px !important;
        height: 80px !important;
    }

    /* 3. Cards & Tables */
    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
        overflow-x: auto;
    }

    .card h3 {
        font-size: 1.1rem;
    }

    table {
        min-width: 500px;
        font-size: 0.85rem;
    }

    table th,
    table td {
        padding: 8px 10px;
    }

    /* 4. Buttons - Better Touch Targets */
    .btn,
    .btn-outline {
        padding: 14px 20px;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Button containers stack */
    .hero>div[style*="flex"] {
        flex-direction: column !important;
        gap: 12px !important;
        width: 100%;
        padding: 0 1rem;
    }

    /* 5. Forms & Inputs */
    input,
    textarea,
    select {
        font-size: 16px !important;
        /* Prevents iOS zoom on focus */
        padding: 12px !important;
    }

    /* 6. Member Stats */
    #memberStats {
        gap: 25px !important;
        margin-top: 30px !important;
    }

    #memberStats>div {
        min-width: 80px;
    }

    #onlineCount,
    #totalCount {
        font-size: 1.5rem !important;
    }

    /* 7. Dashboard Specific */
    /* Force grid to single column */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Dossier search */
    div[style*="display:flex"][style*="gap:10px"] {
        flex-direction: column;
    }

    #searchId {
        width: 100% !important;
    }

    /* Evidence viewer messages */
    .message {
        padding: 10px !important;
    }

    .message .avatar {
        width: 32px !important;
        height: 32px !important;
    }

    /* 8. Disable Desktop Effects */
    #cursor-glow {
        display: none !important;
    }

    .floating-emoji {
        opacity: 0.1;
        animation-duration: 30s;
        /* Slow down for performance */
    }

    /* 9. Scrollbar hidden on mobile */
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
}

/* Small Phone Breakpoint */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .navbar {
        padding: 0.5rem 0.75rem;
    }

    .server-brand span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .btn,
    .btn-outline {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    #onlineCount,
    #totalCount {
        font-size: 1.3rem !important;
    }

    #memberStats>div>div:last-child {
        font-size: 0.75rem !important;
    }
}