button, input, select {
    font: inherit;
}

/* BUTTONS */
.btn-gold {
    background: var(--gold);
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    padding: 0.6rem 2rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    letter-spacing: 1px;
    -webkit-transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    -webkit-clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.btn-gold:hover {
    background: var(--gold-hover);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 18px 60px rgba(142, 4, 255, 0.4);
}

.btn-switch {
    background: rgba(142, 4, 255, 0.1);
    color: var(--gold);
    border: 1px solid var(--gold);
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
    -webkit-clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn-switch:hover {
    background: var(--gold);
    color: #ffffff;
    box-shadow: 0 0 15px var(--gold-glow);
}

.btn-switch svg {
    -webkit-transition: transform 0.4s ease;
    transition: transform 0.4s ease;
    flex-shrink: 0;
}

.btn-switch:hover svg {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

.btn-action {
    background: rgba(255, 255, 255, 0.03);
    color: #d4d4d4;
    border: 1px solid #2a2a2a;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-left: 4px;
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit:hover {
    background: rgba(142, 4, 255, 0.2);
    border-color: var(--gold);
    color: #ffffff;
    box-shadow: 0 0 12px var(--gold-glow);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.btn-ban {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.btn-ban:hover {
    background: rgba(220, 38, 38, 0.25);
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.btn-unban {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.05);
}

.btn-unban:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: #4ade80;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.btn-delete {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(220, 38, 38, 0.6);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.btn-red {
    background: #dc2626;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    padding: 0.6rem 2rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    letter-spacing: 1px;
    -webkit-transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    -webkit-clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.btn-red:hover {
    background: #b91c1c;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
}

/* BADGES & CODES */
.badge {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 999px;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.badge-ok {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}

.badge-banned {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
}

.code {
    font-family: monospace;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.code-gold {
    color: var(--gold);
}

.clickable-code {
    cursor: pointer;
    -webkit-transition: color 0.2s ease, text-decoration 0.2s ease;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.clickable-code:hover {
    text-decoration: underline;
    color: #ffffff !important;
}

/* FORMS & INPUTS */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: 'Oswald', sans-serif;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-select {
    width: 100%;
    max-width: 100%;
    background: #060606;
    border: 1px solid #333;
    color: white;
    padding: 0.85rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    border-radius: 8px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(142, 4, 255, 0.25);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

#searchInput {
    width: 100%;
    background: #060606;
    border: 1px solid #333;
    color: white;
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    border-radius: 8px;
    -webkit-appearance: none;
    appearance: none;
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>");
    background-repeat: no-repeat;
    background-position: 12px center;
}

#searchInput:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e04ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>");
}

#searchInput::placeholder {
    color: var(--text-muted);
}

/* MODALS */
.modal-overlay {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    -webkit-transition: opacity 0.25s ease, visibility 0.25s ease;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 520px;
    -webkit-animation: popIn 0.28s ease forwards;
    animation: popIn 0.28s ease forwards;
}

.modal-buttons {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.delete-modal-box {
    border-color: #7f1d1d !important;
}

.delete-modal-box::before,
.delete-modal-box::after {
    border-color: #ef4444 !important;
}

/* LOGIN OVERLAY */
#loginOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 6, 6, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: clamp(320px, 90vw, 420px);
    background: var(--bg-panel);
    border: 1px solid #1a1a1a;
    padding: 2.5rem;
    position: relative;
    -webkit-animation: popIn 0.32s ease;
    animation: popIn 0.32s ease;
}

.login-box::before,
.login-box::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border-color: var(--gold);
    border-style: solid;
}

.login-box::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.login-box::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}

/* TOASTS */
#toastContainer {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    display: grid;
    gap: 0.75rem;
    z-index: 1100;
    max-width: min(420px, calc(100vw - 3rem));
}

.toast {
    padding: 1rem 1.25rem;
    background: rgba(15, 15, 15, 0.96);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
    font-size: 0.95rem;
    line-height: 1.4;
    -webkit-animation: toastIn 0.2s ease;
    animation: toastIn 0.2s ease;
}

.toast--success { border-color: #4ade80; }
.toast--error { border-color: #f87171; }
.toast--info { border-color: var(--gold); }

.toast.hide {
    opacity: 0;
    -webkit-transform: translateY(16px);
    transform: translateY(16px);
    -webkit-transition: opacity 0.25s ease, transform 0.25s ease;
    transition: opacity 0.25s ease, transform 0.25s ease;
}