:root {
    --primary: #ff4e00;
    --primary-hover: #ff6a00;
    --primary-glow: rgba(255, 78, 0, 0.4);

    --bg-dark: #050505;
    --bg-sidebar: rgba(10, 10, 10, 0.95);
    --bg-card: rgba(20, 20, 20, 0.7);
    --bg-input: rgba(0, 0, 0, 0.4);

    --text-main: #ffffff;
    --text-muted: #888888;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 78, 0, 0.5);

    --sidebar-width: 280px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23111111' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Effects */
.background-glow {
    position: fixed;
    top: -20%;
    left: 20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 78, 0, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -2;
    pointer-events: none;
    animation: pulseGlow 10s infinite alternate;
}

@keyframes pulseGlow {
    from {
        opacity: 0.5;
        transform: scale(1);
    }

    to {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

.container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    z-index: 10;
}

.logo-area {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid var(--border);
    gap: 15px;
}

.logo {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

.logo-text h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

nav {
    flex: 1;
    padding: 25px 15px;
    overflow-y: auto;
}

.nav-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 15px 15px 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

ul {
    list-style: none;
}

.nav-item {
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    color: #cccccc;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.nav-item:hover i {
    color: var(--primary);
}

.nav-item.active {
    background: rgba(255, 78, 0, 0.1);
    border-color: rgba(255, 78, 0, 0.2);
    color: white;
}

.nav-item.active i {
    color: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary));
}

/* Dropdown */
.dropdown-header {
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    color: #cccccc;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    user-select: none;
}

.dropdown-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.dropdown-header .arrow {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-menu.open .arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding-left: 10px;
}

.dropdown-menu.open .dropdown-content {
    max-height: 800px;
    transition: max-height 0.6s ease-in;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.status-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
}

.status-indicator {
    width: 10px;
    height: 10px;
    background-color: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
}

.status-indicator.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(0, 255, 136, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
    }
}

.status-text {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.status-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(10px);
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-left p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    background: linear-gradient(45deg, #333, #444);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    border: 2px solid var(--border);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Config Layout */
form {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    padding-bottom: 100px;
    /* Space for FAB */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.config-section {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

.config-section.active {
    display: block;
}

.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 30px;
}

.section-header h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #fff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: var(--text-muted);
}

/* Dashboard Banner */
.welcome-banner {
    background: linear-gradient(135deg, rgba(255, 78, 0, 0.1), rgba(0, 0, 0, 0.5));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.banner-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.banner-content p {
    color: var(--text-muted);
}

.banner-img {
    height: 150px;
    opacity: 0.8;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
    transform: rotate(-10deg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 25px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 78, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-info p {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 5px;
}


/* Cards & Forms */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header i {
    color: var(--primary);
}

.description-text {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.badge {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input,
textarea,
select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 15px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select option {
    background: #111;
    color: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 78, 0, 0.1);
}

.code-font {
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #aaddff;
}

/* Password Toggle */
.input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
}

.toggle-password:hover {
    color: white;
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.color-preview-box {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #000;
}

.color-input-number {
    width: 120px;
}

input[type="color"] {
    padding: 0;
    width: 45px;
    height: 45px;
    border: none;
    background: none;
    cursor: pointer;
}

/* Builder Rows */
.list-builder {
    margin-bottom: 15px;
}

.builder-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
    align-items: center;
}

.builder-row select {
    width: 40%;
}

.builder-row input {
    flex: 1;
}

.del-btn {
    background: rgba(255, 50, 50, 0.1);
    color: #ff4444;
    border: 1px solid rgba(255, 50, 50, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.del-btn:hover {
    background: rgba(255, 50, 50, 0.2);
}

.add-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--border);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-btn:hover {
    background: rgba(255, 78, 0, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Tag Builder */
.tag-builder {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 40px;
}

.tag {
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag i {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tag i:hover {
    opacity: 1;
}

/* Builder Card (Ticket Types) */
.builder-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.row-header {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
}

.row-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-group-small label {
    font-size: 0.75rem;
    margin-bottom: 4px;
    display: block;
    color: var(--text-muted);
}

.full {
    grid-column: 1 / -1;
}

.input-group {
    display: flex;
    gap: 10px;
}

.small-btn {
    padding: 0 15px;
    background: var(--primary);
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}


/* Save Area */
.save-area {
    position: fixed;
    bottom: 20px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 50;
    transition: all 0.3s;
}

.save-area.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.save-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(255, 78, 0, 0.4);
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255, 78, 0, 0.5);
}

.save-btn:active {
    transform: translateY(0);
}


/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    /* Aligned with FAB? Or maybe center? */
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-left: 4px solid #00ff88;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.toast.show {
    transform: translateX(-50%) translateY(-80px);
    opacity: 1;
}

.toast i {
    color: #00ff88;
    font-size: 1.2rem;
}

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.9);
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: opacity 0.3s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.spinner {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 3px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.spinner-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    opacity: 0.8;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Player Table */
.player-table th {
    font-weight: 600;
    font-size: 0.9rem;
}

.player-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.player-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 800px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    position: relative;
    padding: 30px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: white;
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.modal-col h4 {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row span:first-child {
    color: var(--text-muted);
}

.stat-box {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

.money-box {
    color: #00ff88;
}

.bank-box {
    color: #00ccff;
}

.inventory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inv-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.inv-count {
    color: var(--primary);
    font-weight: bold;
    margin-left: 5px;
}

.code-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #ccc;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-input);
    transition: .4s;
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
    background-color: white;
}

.slider.round {
    border-radius: 34px;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0d0d0d;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.perm-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.perm-label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-player-list {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
}

.dashboard-player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
}

.dashboard-player-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Modern Buttons */
.btn-modern-add {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: all 0.3s;
}

.btn-modern-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.4);
}

.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    transition: all 0.2s;
    color: white;
}

.btn-action.edit {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.btn-action.edit:hover {
    background: rgba(255, 193, 7, 0.25);
}

.btn-action.delete {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.btn-action.delete:hover {
    background: rgba(220, 53, 69, 0.25);
}

.btn-modern-primary {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-modern-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* User Menu */
.user-profile {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.user-menu.hidden {
    display: none;
}

.menu-item {
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Player Detail Modal specific */
.player-modal-header-row {
    display: flex;
    align-items: baseline;
}



.menu-item:hover {
    background: rgba(255, 78, 0, 0.1);
    color: white;
}

.perm-hidden {
    display: none !important;
}

.builder-row {
    transition: background 0.2s;
}

.builder-row:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}
/* Tabs */
.tabs-container {
    display: flex;
    gap: 10px;
}

.btn-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-tab.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    font-weight: 600;
}

/* --- NEW MODERN PLAYER LIST --- */

/* Tabs */
.tabs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 8px;
    width: fit-content;
}

.btn-tab {
    background: transparent;
    border: none;
    color: #888;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-tab:hover {
    color: #ddd;
    background: rgba(255, 255, 255, 0.05);
}

.btn-tab.active {
    background: linear-gradient(135deg, #ff4e00, #ff8c00); 
    /* Using gradient based on accent color */
    color: white;
    box-shadow: 0 4px 15px rgba(255, 78, 0, 0.3);
    font-weight: 600;
}

/* Toolbar & Search */
.list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: #ff4e00;
    box-shadow: 0 0 0 2px rgba(255, 78, 0, 0.2);
    outline: none;
}

.btn-load-players {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    background: linear-gradient(135deg, #ff4e00, #ff8c00);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-load-players:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 78, 0, 0.4);
}

/* Table Styling */
.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.player-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(30, 30, 35, 0.4);
}

.player-table thead {
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.player-table th {
    padding: 15px 20px;
    text-align: left;
    color: #aaa;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.player-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}

.player-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.player-table td {
    padding: 15px 20px;
    color: #ddd;
    vertical-align: middle;
}

.player-name-cell {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.player-id-sub {
    font-size: 0.8rem;
    color: #666;
    font-family: monospace;
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
}

.empty-state {
    text-align: center;
    padding: 40px !important;
    color: #666;
    font-style: italic;
}

.small-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ccc;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.small-btn:hover {
    background: #ff4e00;
    color: white;
}
.hidden {
    display: none !important;
}
