/* WhatnotFam — Custom CSS
   Complements Tailwind CDN. Add to <link> after Tailwind.
   ------------------------------------------------------------------ */

/* ── Form inputs ─────────────────────────────────────────────────── */
.form-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}
.form-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.25);
}
.form-input::placeholder {
    color: #374151 !important;
    -webkit-text-fill-color: #374151 !important;
    opacity: 1;
}
/* Fix browser autofill overriding text/bg color */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #000000 !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
    box-shadow: 0 0 0px 1000px #ffffff inset;
    transition: background-color 5000s ease-in-out 0s;
}
select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25rem 1.25rem;
    padding-right: 2rem;
}
textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    background-color: #7c3aed;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.1s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary:hover {
    background-color: #6d28d9;
}
.btn-primary:active {
    transform: scale(0.98);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    background-color: transparent;
    color: #d1d5db;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid #374151;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-secondary:hover {
    background-color: #1f2937;
    border-color: #4b5563;
    color: #fff;
}
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    background-color: #991b1b;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
}
.btn-danger:hover {
    background-color: #7f1d1d;
}

/* ── Navigation links ────────────────────────────────────────────── */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
}
.nav-link:hover,
.nav-link.active {
    color: #fff;
    background-color: rgba(124,58,237,0.15);
}

.mobile-nav-link {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #d1d5db;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
}
.mobile-nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.05);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #d1d5db;
    text-decoration: none;
    transition: background-color 0.1s, color 0.1s;
}
.dropdown-item:hover {
    background-color: rgba(255,255,255,0.06);
    color: #fff;
}

/* ── Role / status badges ────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.badge-admin {
    background-color: rgba(220,38,38,0.15);
    color: #f87171;
    border: 1px solid rgba(220,38,38,0.3);
}
.badge-mvs {
    background-color: rgba(124,58,237,0.15);
    color: #a78bfa;
    border: 1px solid rgba(124,58,237,0.3);
}
.badge-free {
    background-color: rgba(75,85,99,0.3);
    color: #9ca3af;
    border: 1px solid rgba(75,85,99,0.4);
}

/* ── Label ───────────────────────────────────────────────────────── */
.label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

/* ── Form section card ───────────────────────────────────────────── */
.form-card {
    background-color: #16162a;
    border: 1px solid #1f2937;
    border-radius: 1rem;
    padding: 1.5rem;
}

/* ── Alert / flash ───────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-success {
    background-color: rgba(4,120,87,0.15);
    color: #6ee7b7;
    border-color: rgba(4,120,87,0.3);
}
.alert-error {
    background-color: rgba(185,28,28,0.15);
    color: #fca5a5;
    border-color: rgba(185,28,28,0.3);
}
.alert-warning {
    background-color: rgba(180,83,9,0.15);
    color: #fcd34d;
    border-color: rgba(180,83,9,0.3);
}
.alert-info {
    background-color: rgba(29,78,216,0.15);
    color: #93c5fd;
    border-color: rgba(29,78,216,0.3);
}

/* ── Tips ticker / marquee ───────────────────────────────────────── */
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}
.marquee-track:hover {
    animation-play-state: paused;
}
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Stat card ───────────────────────────────────────────────────── */
.stat-card {
    background-color: #16162a;
    border: 1px solid #1f2937;
    border-radius: 1rem;
    padding: 1.25rem;
}

/* ── Table ───────────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    border-radius: 1rem;
    border: 1px solid #1f2937;
    background-color: #16162a;
}
.table-wrap table {
    width: 100%;
    font-size: 0.875rem;
    border-collapse: collapse;
}
.table-wrap thead th {
    background-color: #1a1a2e;
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    text-align: left;
}
.table-wrap tbody tr {
    border-top: 1px solid #1f2937;
    transition: background-color 0.1s;
}
.table-wrap tbody tr:hover {
    background-color: rgba(255,255,255,0.03);
}
.table-wrap td {
    padding: 0.75rem 1rem;
    color: #d1d5db;
    vertical-align: middle;
}

/* ── Divider ─────────────────────────────────────────────────────── */
.divider {
    border: none;
    border-top: 1px solid #1f2937;
    margin: 1.5rem 0;
}

/* ── Avatar ──────────────────────────────────────────────────────── */
.avatar {
    border-radius: 9999px;
    object-fit: cover;
    background-color: #1f2937;
}
.avatar-sm  { width: 2rem;    height: 2rem; }
.avatar-md  { width: 2.5rem;  height: 2.5rem; }
.avatar-lg  { width: 3.5rem;  height: 3.5rem; }
.avatar-xl  { width: 6rem;    height: 6rem; }
.avatar-2xl { width: 9rem;    height: 9rem; }

/* ── Profile banner ──────────────────────────────────────────────── */
.profile-banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #1a1a2e;
    border-radius: 0.75rem 0.75rem 0 0;
}

/* ── Toast notifications (JS driven) ────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
    pointer-events: none;
}
.toast {
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 260px;
    max-width: 360px;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.25s, transform 0.25s;
    border: 1px solid transparent;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.toast-success {
    background-color: #064e3b;
    color: #6ee7b7;
    border-color: #065f46;
}
.toast-error {
    background-color: #7f1d1d;
    color: #fca5a5;
    border-color: #991b1b;
}
.toast-info {
    background-color: #1e3a5f;
    color: #93c5fd;
    border-color: #1e40af;
}

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.375rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid #374151;
    color: #9ca3af;
    text-decoration: none;
    transition: background-color 0.1s, color 0.1s;
}
.pagination a:hover {
    background-color: rgba(124,58,237,0.15);
    border-color: #7c3aed;
    color: #fff;
}
.pagination .current {
    background-color: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}

/* ── Slot badge ──────────────────────────────────────────────────── */
.slot-open   { background-color: rgba(4,120,87,0.15);  color: #34d399; border-color: rgba(4,120,87,0.3); }
.slot-taken  { background-color: rgba(185,28,28,0.15); color: #f87171; border-color: rgba(185,28,28,0.3); }
.slot-prime  { background-color: rgba(180,83,9,0.15);  color: #fbbf24; border-color: rgba(180,83,9,0.3); }

/* ── Video card ──────────────────────────────────────────────────── */
.video-card {
    background-color: #16162a;
    border: 1px solid #1f2937;
    border-radius: 0.875rem;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
    text-decoration: none;
    display: block;
}
.video-card:hover {
    border-color: #7c3aed;
    transform: translateY(-2px);
}
.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background-color: #0f0f1a;
}
.video-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.65);
    backdrop-filter: blur(2px);
    border-radius: 0.875rem 0.875rem 0 0;
}

/* ── Forum ───────────────────────────────────────────────────────── */
.question-row {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #1f2937;
    transition: background-color 0.1s;
    text-decoration: none;
}
.question-row:hover {
    background-color: rgba(255,255,255,0.02);
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0f0f1a;
}
::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* ── Responsive helpers ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .profile-banner { height: 140px; }
    .btn-primary,
    .btn-secondary { width: 100%; justify-content: center; }
}

/* ── Misc utilities ──────────────────────────────────────────────── */
.text-brand-400  { color: #a78bfa; }
.text-brand-300  { color: #c4b5fd; }
.bg-brand-600    { background-color: #7c3aed; }
.ring-brand      { box-shadow: 0 0 0 3px rgba(124,58,237,0.35); }

/* Make body dark by default even before Tailwind loads */
html, body {
    background-color: #0f0f1a;
    color: #e5e7eb;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
