/* SquadHack - Custom Overrides & Animations */
/* Works alongside Tailwind CDN */

/* ---------- Base Resets ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #06060b;
    color: #cbd5e1;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a0a0f;
}
::-webkit-scrollbar-thumb {
    background: #2f2f42;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6;
}

/* ---------- Glow Effects ---------- */
.glow-violet {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15), 0 0 60px rgba(139, 92, 246, 0.05);
}

.glow-violet-strong {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3), 0 0 80px rgba(139, 92, 246, 0.1);
}

.glow-text {
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5), 0 0 40px rgba(139, 92, 246, 0.2);
}

/* ---------- Glass Card ---------- */
.glass {
    background: rgba(17, 17, 24, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.glass-strong {
    background: rgba(17, 17, 24, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

/* ---------- Button Styles ---------- */
.btn-neon {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-neon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-neon:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.4), 0 10px 30px -10px rgba(139, 92, 246, 0.3);
}

.btn-neon:hover::before {
    opacity: 1;
}

.btn-neon span, .btn-neon i, .btn-neon svg {
    position: relative;
    z-index: 1;
}

.btn-neon-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
}

.btn-neon-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.btn-ghost {
    background: transparent;
    color: #a78bfa;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-ghost:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    color: #c084fc;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.btn-ghost-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
}

.btn-danger:hover {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0a0a0f;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
}

.btn-warning:hover {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

/* ---------- Input Styles ---------- */
.input-dark {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #f1f5f9;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    width: 100%;
    outline: none;
}

.input-dark:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), 0 0 20px rgba(139, 92, 246, 0.1);
    background: rgba(10, 10, 15, 1);
}

.input-dark::placeholder {
    color: #475569;
}

select.input-dark {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236366f1' 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 0.75rem center;
    padding-right: 2.5rem;
}

textarea.input-dark {
    resize: vertical;
    min-height: 100px;
}

input[type="checkbox"].check-neon {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 5px;
    background: rgba(10, 10, 15, 0.8);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

input[type="checkbox"].check-neon:checked {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

input[type="checkbox"].check-neon:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ---------- Alert Styles ---------- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

/* ---------- Badges ---------- */
.badge-glow {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---------- Hero Background ---------- */
.hero-grid-bg {
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.hero-radial {
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
}

/* ---------- Gradient Text ---------- */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #c084fc 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-hero {
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 40%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Card Hover ---------- */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.12), 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    border-color: rgba(139, 92, 246, 0.3) !important;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #111118;
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
    0% { opacity: 0; transform: translateY(20px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Data Table ---------- */
.data-table-wrap {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid rgba(139, 92, 246, 0.1);
    background: #111118;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table thead {
    background: rgba(139, 92, 246, 0.06);
}

.data-table th {
    padding: 0.875rem 1.25rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    color: #8b5cf6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Inter', sans-serif;
}

.data-table td {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid rgba(139, 92, 246, 0.05);
    color: #94a3b8;
    font-size: 0.875rem;
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.04);
}

/* ---------- Profile Tab System ---------- */
.tab-panel {
    display: none;
    animation: fade-in 0.3s ease-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fade-in {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---------- Mobile Nav ---------- */
.mobile-nav {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-nav.open {
    transform: translateX(0);
}

/* ---------- Particles ---------- */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes particle-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -15px) rotate(90deg); }
    50% { transform: translate(-8px, 15px) rotate(180deg); }
    75% { transform: translate(-20px, -8px) rotate(270deg); }
}

/* ---------- Admin Sidebar ---------- */
.admin-sidebar-link {
    transition: all 0.2s ease;
}

.admin-sidebar-link:hover {
    background: rgba(139, 92, 246, 0.06);
}

.admin-sidebar-link.active {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa !important;
    border-right: 2px solid #8b5cf6;
}

/* ---------- Stats Card ---------- */
.stat-card-gradient {
    position: relative;
    overflow: hidden;
}

.stat-card-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

/* ---------- Misc ---------- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 768px) {
    .hero-title-main {
        font-size: 2.5rem !important;
    }
}

/* ---------- Legal / Prose Styling ---------- */
.prose-custom h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #e2e8f0;
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
}
.prose-custom p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}
.prose-custom ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
}
.prose-custom li {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.25rem;
}
.prose-custom table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.prose-custom th,
.prose-custom td {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}
.prose-custom strong {
    color: #e2e8f0;
}
