/**
 * Shadow Spade Admin - Matching Public Site Theme
 */

/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES (matching public site)
   ═══════════════════════════════════════════════════════════════ */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-input: #0d0d0d;

    --neon-green: #00ff88;
    --neon-green-dim: #00cc6a;
    --neon-green-glow: rgba(0, 255, 136, 0.3);
    --neon-red: #ff3366;
    --neon-red-glow: rgba(255, 51, 102, 0.3);
    --neon-gold: #ffd700;
    --neon-gold-glow: rgba(255, 215, 0, 0.3);
    --neon-purple: #9966ff;
    --discord-blue: #5865F2;

    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --text-muted: #555555;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Press Start 2P', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.8;
    font-size: 0.75rem;
    background-image:
        radial-gradient(ellipse at top, rgba(0, 255, 136, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(255, 51, 102, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
}

/* Animated background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 136, 0.015) 2px, rgba(0, 255, 136, 0.015) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 51, 102, 0.015) 2px, rgba(255, 51, 102, 0.015) 4px);
    pointer-events: none;
    animation: slidePattern 30s linear infinite;
    z-index: 0;
}

@keyframes slidePattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING SUITS (matching public site)
   ═══════════════════════════════════════════════════════════════ */
.floating-suits {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.suit {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.06;
    animation: float 20s infinite ease-in-out;
}

.suit:nth-child(1) { left: 5%; animation-delay: 0s; color: var(--neon-green); }
.suit:nth-child(2) { left: 20%; animation-delay: 4s; color: var(--neon-red); }
.suit:nth-child(3) { left: 40%; animation-delay: 8s; color: var(--text-primary); }
.suit:nth-child(4) { left: 60%; animation-delay: 12s; color: var(--neon-red); }
.suit:nth-child(5) { left: 80%; animation-delay: 16s; color: var(--neon-green); }
.suit:nth-child(6) { left: 95%; animation-delay: 2s; color: var(--neon-gold); }

@keyframes float {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.06; }
    90% { opacity: 0.06; }
    50% { transform: translateY(-10vh) rotate(180deg); }
}

/* ═══════════════════════════════════════════════════════════════
   LOADING
   ═══════════════════════════════════════════════════════════════ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader {
    text-align: center;
}

.loader .suits {
    font-size: 2rem;
    letter-spacing: 0.5rem;
    margin-bottom: 1.5rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.loader-text {
    font-size: 0.6rem;
    color: var(--neon-green);
}

@keyframes glow {
    from { text-shadow: 0 0 10px var(--neon-green-glow); }
    to { text-shadow: 0 0 30px var(--neon-green), 0 0 50px var(--neon-green-glow); }
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

#dashboard-section {
    align-items: flex-start;
    padding-top: 40px;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS (matching public site style)
   ═══════════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-secondary);
    border: 2px solid var(--neon-green);
    border-radius: 8px;
    box-shadow: 0 0 30px var(--neon-green-glow);
    overflow: hidden;
}

.card-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.card-header .suits {
    font-size: 1.5rem;
    letter-spacing: 0.3rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--neon-green-glow);
}

.card-header h1 {
    font-size: 1rem;
    color: var(--neon-green);
    margin-bottom: 8px;
    text-shadow: 0 0 20px var(--neon-green-glow);
}

.card-header h2 {
    font-size: 0.7rem;
    color: var(--neon-green);
    margin-bottom: 8px;
    text-shadow: 0 0 15px var(--neon-green-glow);
}

.subtitle, .card-subtitle {
    font-size: 0.55rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-body {
    padding: 25px;
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════════════════════════════ */
.login-form {
    padding: 0 30px 30px;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--neon-green);
    box-shadow: 0 2px 15px var(--neon-green-glow);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.suits-small {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--neon-green-glow);
}

.brand-text {
    font-size: 0.55rem;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green-glow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-home {
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    text-decoration: none;
}

.btn-home:hover {
    background: var(--neon-green);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--neon-green-glow);
}

.user-info {
    text-align: center;
    margin-bottom: 20px;
}

.user-email {
    font-size: 0.45rem;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.55rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="text"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-input);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 6px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 15px var(--neon-green-glow);
}

input::placeholder {
    color: var(--text-muted);
    font-size: 0.5rem;
}

input[type="datetime-local"] {
    color-scheme: dark;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.55rem;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-box {
    background: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green-glow);
}

.checkbox-label input:checked + .checkbox-box::after {
    content: '✓';
    color: var(--bg-primary);
    font-size: 0.6rem;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(to bottom, var(--neon-green), var(--neon-green-dim));
    color: var(--bg-primary);
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 15px var(--neon-green-glow);
}

.btn-primary:hover {
    background: var(--neon-green);
    box-shadow: 0 0 30px var(--neon-green-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--neon-red);
    color: var(--neon-red);
}

.btn-outline:hover {
    background: var(--neon-red);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--neon-red-glow);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.45rem;
}

.btn-lg {
    padding: 15px 25px;
    font-size: 0.6rem;
}

/* ═══════════════════════════════════════════════════════════════
   MODE SELECTION
   ═══════════════════════════════════════════════════════════════ */
.mode-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--bg-card);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-card:hover {
    border-color: rgba(0, 255, 136, 0.4);
}

.mode-card input[type="radio"] {
    display: none;
}

.mode-card:has(input:checked) {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 15px var(--neon-green-glow);
}

.mode-label {
    flex: 1;
    font-size: 0.55rem;
    color: var(--text-primary);
}

.mode-card:has(input:checked) .mode-label {
    color: var(--neon-green);
}

.mode-check {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.mode-card:has(input:checked) .mode-check {
    opacity: 1;
    background: var(--neon-green);
    color: var(--bg-primary);
}

/* DateTime Settings */
.datetime-settings {
    padding: 15px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 6px;
    margin-bottom: 20px;
}

.datetime-settings .form-group {
    margin-bottom: 12px;
}


/* ═══════════════════════════════════════════════════════════════
   SAVE SECTION
   ═══════════════════════════════════════════════════════════════ */
.save-section {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
}

.save-status {
    margin-top: 15px;
    font-size: 0.5rem;
    min-height: 20px;
}

.save-status.success {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green-glow);
}

.save-status.error {
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red-glow);
}

/* ═══════════════════════════════════════════════════════════════
   ERROR MESSAGE
   ═══════════════════════════════════════════════════════════════ */
.error-message {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
    text-align: center;
    padding: 30px 0;
    font-size: 0.45rem;
    color: var(--neon-purple);
    text-shadow: 0 0 10px rgba(153, 102, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-secondary);
    border: 2px solid var(--neon-green);
    border-radius: 6px;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 0.5rem;
    box-shadow: 0 0 20px var(--neon-green-glow);
    animation: slideIn 0.3s ease;
}

.toast.error {
    border-color: var(--neon-red);
    box-shadow: 0 0 20px var(--neon-red-glow);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .page {
        padding: 15px;
    }

    .card-header {
        padding: 20px;
    }

    .card-body {
        padding: 20px;
    }

    .login-form {
        padding: 0 20px 20px;
    }

    .header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .header-actions {
        gap: 8px;
    }

    .mode-card {
        padding: 12px 15px;
    }

    .toast-container {
        left: 15px;
        right: 15px;
        bottom: 15px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-green-dim);
}
