:root {
    --bg-dark: #050505;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.1);

    /* Donut-inspired gradients */
    --primary-gradient: linear-gradient(135deg, #7B2CBF 0%, #FF4081 50%, #FFD740 100%);
    --hover-gradient: linear-gradient(135deg, #9C27B0 0%, #E91E63 50%, #FFC107 100%);
    --text-gradient: linear-gradient(90deg, #E0E0E0, #FFFFFF);

    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;

    --accent-purple: #7B2CBF;
    --accent-pink: #FF4081;
    --accent-yellow: #FFD740;

    --status-pending: #FFD740;
    --status-completed: #00E676;
    --status-rejected: #FF5252;

    --nav-bg: rgba(10, 10, 10, 0.7);
    --card-bg: rgba(20, 20, 20, 0.4);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Background Glow Effects */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(123, 44, 191, 0.2) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 64, 129, 0.15) 0%, transparent 70%);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}

/* Global Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.page-title {
    font-family: 'Poly Sans Neutral Wide', sans-serif;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: transparent;
    /* Uses body background */
    padding: 1rem;
}

.login-container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    min-width: 380px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

/* Add a subtle gradient border effect to login container */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-pink), transparent);
    opacity: 0.5;
}

.login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header h2 {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 2rem;
}

.login-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.discord-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    gap: 12px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
    position: relative;
    overflow: hidden;
}

.discord-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

/* Navbar */
.navbar {
    background: var(--nav-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.home-link {
    font-family: 'Poly Sans Neutral Wide', sans-serif;
    font-size: 1.2rem;
    background: transparent;
    color: var(--text-main);
    padding: 8px 0;
}

.home-link:hover {
    background: transparent;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 24px;
}

.create-event-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.create-event-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.3);
}

.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.username {
    font-weight: 600;
    font-size: 0.95rem;
}

.logout-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    padding-top: 0.75rem;
    margin-top: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 150px;
}

.logout-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.user-profile:hover .logout-dropdown {
    display: block;
    animation: fadeIn 0.2s ease;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    margin: 0;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0;
    text-align: left;
    background-color: transparent;
    border-radius: 0;
}

/* DataTables Customization */
table.dataTable {
    background: transparent !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    width: 100% !important;
    margin-top: 1rem !important;
}

table.dataTable thead th {
    background: transparent !important;
    color: var(--text-muted) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 16px !important;
}

table.dataTable tbody tr {
    background: rgba(255, 255, 255, 0.02) !important;
    transition: transform 0.2s ease, background 0.2s ease;
}

table.dataTable tbody tr:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    transform: scale(1.01);
}

table.dataTable tbody td {
    border: none !important;
    padding: 16px !important;
    color: var(--text-main);
    vertical-align: middle;
}

table.dataTable tbody td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

table.dataTable tbody td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* DataTables Controls */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-muted) !important;
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main);
    border-radius: 8px;
    padding: 8px 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 0 2px rgba(123, 44, 191, 0.2);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-muted) !important;
    border-radius: 8px !important;
    border: none !important;
    padding: 6px 12px !important;
    background: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-gradient) !important;
    color: white !important;
    font-weight: 600;
}

/* Status Filter Buttons */
.status-filter-wrapper {
    display: inline-flex;
    gap: 8px;
    margin-right: 16px;
    vertical-align: middle;
}

.status-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-main);
}

.status-filter-btn.active[data-status="Pending"] {
    background: rgba(255, 215, 64, 0.15);
    border-color: rgba(255, 215, 64, 0.4);
    color: var(--status-pending);
}

.status-filter-btn.active[data-status="Completed"] {
    background: rgba(0, 230, 118, 0.15);
    border-color: rgba(0, 230, 118, 0.4);
    color: var(--status-completed);
}

.dataTables_wrapper .dataTables_filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

.status-badge.pending {
    background: rgba(255, 215, 64, 0.15);
    color: var(--status-pending);
    border: 1px solid rgba(255, 215, 64, 0.3);
}

.status-badge.completed {
    background: rgba(0, 230, 118, 0.15);
    color: var(--status-completed);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.status-badge.rejected {
    background: rgba(255, 82, 82, 0.15);
    color: var(--status-rejected);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

/* Forms */
.create-event-form {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    display: grid;
    gap: 0.8rem;
}

.form-group label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-pink);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.1);
}

.form-group input[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Distribution Section */
.distribution-section {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.distribution-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.distribution-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.distribution-entry {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

/* Distribution Entry Inputs */
.distribution-entry input[type="number"],
.distribution-entry textarea,
.distribution-entry input[type="text"] {
    background: rgba(123, 44, 191, 0.08);
    border: 1px solid rgba(123, 44, 191, 0.25);
    border-radius: 10px;
    color: var(--text-main);
    padding: 12px 14px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.distribution-entry input[type="number"]:focus,
.distribution-entry textarea:focus,
.distribution-entry input[type="text"]:focus {
    outline: none;
    background: rgba(123, 44, 191, 0.12);
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.15);
}

.distribution-entry input[type="number"]::placeholder,
.distribution-entry textarea::placeholder,
.distribution-entry input[type="text"]::placeholder {
    color: rgba(160, 160, 160, 0.6);
}

.distribution-entry textarea {
    min-height: 80px;
    resize: vertical;
}

/* Remove Distribution Button */
.remove-distribution {
    background: transparent;
    border: 1px solid rgba(255, 82, 82, 0.2);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    align-self: center;
}

.remove-distribution svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 82, 82, 0.5);
    transition: fill 0.2s ease;
}

.remove-distribution:hover {
    background: rgba(255, 82, 82, 0.1);
    border-color: rgba(255, 82, 82, 0.4);
}

.remove-distribution:hover svg {
    fill: #ff5252;
}

.add-new-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--glass-border);
    color: var(--text-main);
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.add-new-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mode-btn {
    padding: 10px 24px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.mode-btn.active {
    background: var(--primary-gradient);
    border-color: var(--accent-purple);
    color: white;
}

/* Custom Mode */
.custom-header {
    display: grid;
    grid-template-columns: 150px 1fr 40px;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0 4px;
}

.custom-entry {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.custom-entry input {
    background: rgba(123, 44, 191, 0.08);
    border: 1px solid rgba(123, 44, 191, 0.25);
    border-radius: 10px;
    color: var(--text-main);
    padding: 12px 14px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.custom-entry input:focus {
    outline: none;
    background: rgba(123, 44, 191, 0.12);
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.15);
}

.custom-entry input::placeholder {
    color: rgba(160, 160, 160, 0.6);
}

.custom-entry .remove-line {
    background: transparent;
    border: 1px solid rgba(255, 82, 82, 0.2);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-entry .remove-line svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 82, 82, 0.5);
    transition: fill 0.2s ease;
}

.custom-entry .remove-line:hover {
    background: rgba(255, 82, 82, 0.1);
    border-color: rgba(255, 82, 82, 0.4);
}

.custom-entry .remove-line:hover svg {
    fill: #ff5252;
}

.submit-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.modal-close {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.2);
    color: rgba(255, 82, 82, 0.7);
    cursor: pointer;
    padding: 7px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.modal-close svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.modal-close:hover {
    background: rgba(255, 82, 82, 0.2);
    border-color: rgba(255, 82, 82, 0.4);
    color: #ff5252;
    transform: scale(1.05);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
}

.view-btn {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.view-btn:hover {
    background: rgba(255, 193, 7, 0.25);
    color: #ffd54f;
}

.edit-btn {
    background: rgba(233, 30, 99, 0.15);
    border-color: rgba(233, 30, 99, 0.3);
    color: #e91e63;
}

.edit-btn:hover {
    background: rgba(233, 30, 99, 0.25);
    color: #f48fb1;
}

.distribute-btn {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.distribute-btn:hover {
    background: rgba(76, 175, 80, 0.25);
    color: #81c784;
}

.delete-btn {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.delete-btn:hover {
    background: rgba(244, 67, 54, 0.25);
    color: #ef5350;
}

.distribute-btn.disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

.distribute-btn.disabled:hover {
    transform: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Flatpickr Overrides */
.flatpickr-calendar {
    background: #1a1a1a !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    border-radius: 16px !important;
}

.flatpickr-day {
    color: var(--text-main) !important;
}

.flatpickr-day.selected {
    background: var(--accent-pink) !important;
    border-color: var(--accent-pink) !important;
}

.flatpickr-day:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Code Input for Login */
.code-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 16px !important;
    text-align: center;
    font-size: 1.5rem !important;
    letter-spacing: 4px !important;
    transition: all 0.3s ease;
}

.code-input:focus {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 0 4px rgba(123, 44, 191, 0.2) !important;
}

.code-login-btn {
    background: var(--primary-gradient) !important;
    border-radius: 12px !important;
    padding: 14px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.code-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.3) !important;
}

/* Column Filter Popup */
.column-filter-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 250px;
}

.column-filter-popup.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.date-filter {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
}

.filter-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.filter-actions button {
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    border: none;
    transition: all 0.2s ease;
}

.clear-filter {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.clear-filter:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.apply-filter {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
}

.apply-filter:hover {
    opacity: 0.9;
}

.column-filter-button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.column-filter-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.column-filter-button:hover,
.column-filter-button.active {
    color: var(--text-main);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-transition.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Table Loading State */
.table-container {
    position: relative;
    min-height: 200px;
}

.table-container.table-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

.table-container.table-loading table {
    opacity: 0.1;
    pointer-events: none;
}

/* ==================== */
/* View Modal - User List */
/* ==================== */

.event-summary {
    background: rgba(123, 44, 191, 0.08);
    border: 1px solid rgba(123, 44, 191, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.event-summary .summary-item {
    margin-bottom: 0.75rem;
}

.event-summary .summary-item:last-child {
    margin-bottom: 0;
}

.summary-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
}

.summary-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-row .summary-item {
    margin-bottom: 0;
}

.summary-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-box {
    flex: 1;
    background: rgba(255, 64, 129, 0.1);
    border: 1px solid rgba(255, 64, 129, 0.2);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-pink);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Section */
.user-search-section {
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    pointer-events: none;
}

.username-search-input {
    width: 100%;
    padding: 12px 80px 12px 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: 'Manrope', sans-serif;
    transition: all 0.2s ease;
}

.username-search-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.15);
}

.username-search-input::placeholder {
    color: rgba(160, 160, 160, 0.6);
}

.search-counter {
    position: absolute;
    right: 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.search-counter.active {
    opacity: 1;
    color: var(--accent-yellow);
}

/* User List Table */
.user-list-container {
    max-height: 350px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.user-list-table {
    width: 100%;
    border-collapse: collapse;
}

.user-list-table thead {
    position: sticky;
    top: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.user-list-table thead th {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.user-list-table thead th:first-child {
    width: 50px;
    text-align: center;
}

.user-list-table thead th:last-child {
    width: 120px;
    text-align: right;
}

.user-list-table tbody tr {
    transition: background 0.15s ease;
}

.user-list-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.user-list-table tbody td {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.user-list-table tbody tr:last-child td {
    border-bottom: none;
}

.user-index {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.user-name {
    font-weight: 500;
}

.user-name mark {
    background: rgba(255, 215, 64, 0.3);
    color: var(--accent-yellow);
    padding: 1px 3px;
    border-radius: 3px;
}

.user-xp {
    text-align: right;
    color: var(--accent-pink);
    font-weight: 600;
    font-size: 0.85rem;
}

/* User ID and resolved username display */
.user-id {
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.user-resolved {
    color: var(--accent-purple);
    font-weight: 500;
}

.user-loading {
    color: var(--text-muted);
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* No Results */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    gap: 0.5rem;
}

.no-results svg {
    width: 40px;
    height: 40px;
    fill: rgba(255, 255, 255, 0.2);
}

/* Custom scrollbar for user list */
.user-list-container::-webkit-scrollbar {
    width: 6px;
}

.user-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.user-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.user-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Go Back Button */
.go-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.go-back-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.go-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--accent-purple);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: rgba(255, 82, 82, 0.1);
    border-color: rgba(255, 82, 82, 0.3);
    color: #ff5252;
}

/* ================================ */
/* Distribution Progress Modal */
/* ================================ */

.distribute-modal-content {
    max-width: 600px;
    width: 95%;
}

.distribute-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dist-stat {
    flex: 1;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.dist-stat:nth-child(2) {
    background: rgba(255, 215, 64, 0.1);
    border-color: rgba(255, 215, 64, 0.2);
}

.dist-stat-error {
    background: rgba(255, 82, 82, 0.1) !important;
    border-color: rgba(255, 82, 82, 0.2) !important;
}

.dist-stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #00e676;
    line-height: 1.2;
}

.dist-stat:nth-child(2) .dist-stat-number {
    color: var(--accent-yellow);
}

.dist-stat-error .dist-stat-number {
    color: #ff5252;
}

.dist-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Distribution List */
.distribute-list-container {
    max-height: 350px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.distribute-list-table {
    width: 100%;
    border-collapse: collapse;
}

.distribute-list-table thead {
    position: sticky;
    top: 0;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.distribute-list-table thead th {
    padding: 12px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.distribute-list-table thead th:first-child {
    width: 40px;
    text-align: center;
}

.distribute-list-table thead th:nth-child(3) {
    width: 80px;
    text-align: right;
}

.distribute-list-table thead th:last-child {
    width: 140px;
}

/* Distribution Row Styles */
.dist-user-row {
    transition: background 0.2s ease;
}

.dist-user-row td {
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.dist-user-row.current {
    background: rgba(123, 44, 191, 0.15);
}

.dist-user-row.status-completed {
    background: rgba(0, 230, 118, 0.05);
}

.dist-user-row.status-failed {
    background: rgba(255, 82, 82, 0.08);
}

.dist-user-row.status-retrying {
    background: rgba(255, 215, 64, 0.08);
}

.dist-index {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.dist-username {
    font-weight: 500;
}

.dist-amount {
    text-align: right;
    color: var(--accent-pink);
    font-weight: 600;
    font-size: 0.8rem;
}

.dist-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Status Icons */
.status-icon {
    font-weight: 600;
    font-size: 1rem;
}

.pending-icon {
    color: var(--text-muted);
}

.processing-icon {
    color: var(--accent-purple);
}

.completed-icon {
    color: #00e676;
}

.failed-icon {
    color: #ff5252;
}

.retrying-icon {
    color: var(--accent-yellow);
    font-size: 0.75rem;
    animation: pulse 1s infinite;
}

/* Bouncing dots animation */
.dots {
    display: inline-flex;
    gap: 2px;
}

.dots span {
    font-size: 1.5rem;
    line-height: 1;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Error text */
.dist-error {
    font-size: 0.7rem;
    color: #ff5252;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(255, 82, 82, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    cursor: help;
}

/* Distribution Actions */
.distribute-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.distribute-stop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 82, 82, 0.15);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: 10px;
    color: #ff5252;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.distribute-stop-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.distribute-stop-btn:hover {
    background: rgba(255, 82, 82, 0.25);
    border-color: #ff5252;
}

.distribute-close-btn {
    padding: 12px 32px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.distribute-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

/* Custom scrollbar for distribute list */
.distribute-list-container::-webkit-scrollbar {
    width: 6px;
}

.distribute-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.distribute-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.distribute-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Distribution Results in View Modal */
.stat-box.stat-success {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.stat-box.stat-success .stat-number {
    color: #00E676;
}

.stat-box.stat-failed {
    background: rgba(255, 82, 82, 0.15);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.stat-box.stat-failed .stat-number {
    color: #FF5252;
}

.user-list-table.has-results .user-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dist-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

.dist-result-icon.success {
    background: rgba(0, 230, 118, 0.2);
    color: #00E676;
}

.dist-result-icon.failed {
    background: rgba(255, 82, 82, 0.2);
    color: #FF5252;
}

.dist-result-error {
    font-size: 11px;
    color: #FF5252;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-row.dist-success {
    background: rgba(0, 230, 118, 0.05);
}

.user-row.dist-failed {
    background: rgba(255, 82, 82, 0.05);
}

.user-row.dist-success:hover {
    background: rgba(0, 230, 118, 0.1);
}

.user-row.dist-failed:hover {
    background: rgba(255, 82, 82, 0.1);
}