@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #a855f7;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.15), transparent 25%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Layout & Containers */
.container,
.admin-container {
    width: 100%;
    max-width: 1440px;
    /* Increased max-width for "Pro" feel */
    margin: 0 auto;
    padding: 3rem 4rem;
    /* More breathing room */
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Centering Utilities */
.text-center {
    text-align: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-col-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Announcement Bar */
.announcement-bar {
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    z-index: 101;
    /* Above header */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.announcement-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    max-width: 1440px;
    margin: 0 auto;
}

.announcement-info {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
}

.announcement-warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: white;
}

.announcement-danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    color: white;
}

.announcement-success {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: white;
}

/* Header & Nav */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    /* Match container padding */
    background: rgba(15, 23, 42, 0.6);
    /* More transparent */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-menu-btn {
    display: none;
}

.logo h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    /* Increased gap */
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.nav-links a:hover {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 8rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4.5rem;
    /* Bigger hero */
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 10%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.04em;
}

.hero p {
    font-size: 1.35rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 650px;
    line-height: 1.6;
}

/* Cards & Grid */
.grid,
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    /* Wider cards */
    gap: 2.5rem;
    /* More space between cards */
    width: 100%;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

.card h3,
.card h4 {
    margin-top: 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    font-size: 0.95rem;
}

.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #15803d);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.btn-icon {
    padding: 0.5rem;
    background: transparent;
    color: var(--text-muted);
    box-shadow: none;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    /* Fix for mobile card inheritance */
    word-break: normal;
    word-wrap: normal;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.4);
    min-width: 600px;
    /* Force minimum width to trigger scroll on mobile */
}

th,
td {
    white-space: nowrap;
    /* Prevent text vertically stacking */
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.02);
}

td {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge,
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Secondary Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: var(--text-muted);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    color: white;
}

/* File Input Styling */
input[type="file"] {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--glass-border);
    border-radius: 8px;
    height: auto;
}

input[type="file"]::file-selector-button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.4rem 1rem;
    margin-right: 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Badge Variants */
.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-accepted,
.status-valide {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-refused,
.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-banned {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-suspended {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-ok {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Utilities Specific to Admin Page Integration */
.col-span-2 {
    grid-column: span 2;
}

@media(max-width: 1024px) {
    .col-span-2 {
        grid-column: span 1;
    }
}

/* Request Item Styling */
.request-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.request-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.request-title {
    font-weight: 700;
    color: var(--primary);
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: background 0.2s;
}

.checkbox-wrapper:hover {
    background: rgba(255, 255, 255, 0.08);
}

.checkbox-wrapper input {
    margin-right: 10px;
    accent-color: var(--secondary);
    width: 18px;
    height: 18px;
    background: transparent;
}

/* Responsive */
/* Responsive Design */
@media (max-width: 1024px) {

    .container,
    .admin-container {
        max-width: 95%;
        padding: 2rem;
    }

    header {
        padding: 1.5rem 2rem;
    }

    .grid,
    .dashboard-grid {
        gap: 1.5rem;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {

    /* Mobile Header Layout */
    header {
        padding: 1rem 1.5rem;
        flex-direction: row;
        /* Keep logo and burger side by side */
        justify-content: space-between;
        background: rgba(15, 23, 42, 0.95);
        position: relative;
    }

    /* Burger Menu Button (Visible only on mobile) */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 200;
    }

    .mobile-menu-btn span {
        width: 100%;
        height: 3px;
        background: var(--text-main);
        border-radius: 3px;
        transition: all 0.3s ease-in-out;
    }

    /* Mobile Nav Links (Full Screen Overlay) */
    .nav-links {
        display: none;
        position: fixed;
        /* Fixed to cover screen */
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 15, 30, 0.98);
        /* Almost solid deep dark blue */
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        /* Center items vertically */
        align-items: center;
        padding: 2rem;
        gap: 2.5rem;
        z-index: 150;
        /* Behind the burger button but above content */
    }

    /* Adjust Burger to sit on top of the overlay */
    .mobile-menu-btn {
        z-index: 200;
        position: relative;
    }

    /* Show menu with fade in */
    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease forwards;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .nav-links a {
        width: auto;
        text-align: center;
        padding: 0;
        font-size: 1.5rem;
        /* Larger font for mobile menu */
        font-weight: 700;
        background: transparent;
        border: none;
        color: var(--text-muted);
        transition: color 0.3s;
    }

    .nav-links a:hover {
        color: var(--text-main);
        background: transparent;
    }

    /* Special styling for the Discord button in mobile menu */
    .nav-links a.btn {
        margin-top: 1rem;
        padding: 1rem 2rem;
        width: 100%;
        max-width: 300px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        border-radius: 99px;
        font-size: 1.2rem;
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    }

    .nav-links a.btn:hover {
        transform: scale(1.05);
        background: linear-gradient(135deg, var(--primary), var(--secondary));
    }

    /* Burger Animation when Active */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* General Mobile Adjustments & Fixes */
    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .container,
    .admin-container {
        padding: 1.5rem 1rem;
        width: 100%;
        overflow-x: hidden;
        /* Prevent container spill */
    }

    /* Fix Admin Header Overflow */
    .admin-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .admin-title {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
    }

    /* Fix Button sizing & content wrapping */
    .btn {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        white-space: normal;
        /* Allow text to wrap if needed */
        height: auto;
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
        line-height: 1.4;
    }

    /* Fix Form Elements (Input/Select/Textarea) */
    input,
    textarea,
    select {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
        /* No zoom */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Handle overflow gracefully */
        min-width: 0;
        /* Flex item fix */
    }

    /* Container fixes */
    .card {
        padding: 1.25rem;
        width: 100%;
        /* Ensure card fits container */
        max-width: 100%;
        overflow: hidden;
        /* containment */
    }

    /* Ensure forms inside cards don't overflow */
    form {
        width: 100%;
        max-width: 100%;
    }

    .hero {
        padding: 4rem 1rem;
    }

    .hero h1 {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }

    .grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .col-span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
}