/**
 * BassHub Front Theme
 * Modern public-facing pages styling
 */

/* ========== CSS VARIABLES ========== */
:root {
    /* Primary Colors - Sky Blue */
    --primary: 2, 132, 199;
    --primary-dark: 3, 105, 161;

    /* Secondary Colors - Slate */
    --secondary: 15, 23, 42;

    /* Accent */
    --accent: 56, 189, 248;

    /* Backgrounds */
    --bg-subtle: 240, 249, 255;
    --surface: 255, 255, 255;

    /* Text */
    --text-main: 15, 23, 42;
    --text-muted: 100, 116, 139;
}

/* Green Theme Variant */
[data-theme="green"] {
    --primary: 5, 150, 105;
    --primary-dark: 4, 120, 87;
    --secondary: 20, 83, 45;
    --accent: 52, 211, 153;
    --bg-subtle: 236, 253, 245;
}

/* ========== BASE STYLES ========== */
body {
    font-family: 'Inter', sans-serif;
    color: rgb(var(--text-main));
}

/* ========== UTILITY CLASSES ========== */
.bg-primary { background-color: rgb(var(--primary)); }
.bg-primary-dark { background-color: rgb(var(--primary-dark)); }
.bg-secondary { background-color: rgb(var(--secondary)); }
.bg-subtle { background-color: rgb(var(--bg-subtle)); }
.bg-surface { background-color: rgb(var(--surface)); }

.text-primary { color: rgb(var(--primary)); }
.text-primary-dark { color: rgb(var(--primary-dark)); }
.text-secondary { color: rgb(var(--secondary)); }
.text-muted { color: rgb(var(--text-muted)); }

.border-primary { border-color: rgb(var(--primary)); }
.border-secondary { border-color: rgb(var(--secondary)); }

/* Hover states */
.hover-bg-primary:hover { background-color: rgb(var(--primary)); }
.hover-bg-primary-dark:hover { background-color: rgb(var(--primary-dark)); }
.hover-text-primary:hover { color: rgb(var(--primary)); }

/* ========== GLASS PANEL ========== */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* ========== PATTERN GRID ========== */
.pattern-grid {
    background-image:
        linear-gradient(rgba(var(--primary), 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--primary), 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ========== CUSTOM SCROLLBAR ========== */
.results-scroll::-webkit-scrollbar {
    height: 6px;
}

.results-scroll::-webkit-scrollbar-track {
    background: rgb(var(--bg-subtle));
}

.results-scroll::-webkit-scrollbar-thumb {
    background: rgba(var(--primary), 0.3);
    border-radius: 3px;
}

.results-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary), 0.6);
}

/* ========== TABLE ROW HOVER ========== */
.table-row-hover:hover td {
    background-color: rgb(var(--bg-subtle));
}

/* ========== FORM INPUTS ========== */
.front-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.front-input:focus {
    outline: none;
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 3px rgba(var(--primary), 0.1);
}

.front-input::placeholder {
    color: #9ca3af;
}

/* ========== BUTTONS ========== */
.btn-front-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: rgb(var(--primary));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(var(--primary), 0.2);
}

.btn-front-primary:hover {
    background-color: rgb(var(--primary-dark));
    transform: translateY(-1px);
}

.btn-front-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: rgb(var(--secondary));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-front-secondary:hover {
    opacity: 0.9;
}

.btn-front-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: white;
    color: rgb(var(--text-main));
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-front-outline:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

/* ========== STATUS BADGES ========== */
.badge-live {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background-color: #fef2f2;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-final {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background-color: #f3f4f6;
    color: #4b5563;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 0.25rem;
}

.badge-open {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background-color: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-upcoming {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

/* ========== ALERTS ========== */
.front-alert {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.front-alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.front-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.front-alert-info {
    background: rgb(var(--bg-subtle));
    color: rgb(var(--primary-dark));
    border: 1px solid rgba(var(--primary), 0.2);
}

/* ========== ANIMATIONS ========== */
@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse-live {
    animation: pulse-live 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========== AUTH CARD ========== */
.auth-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.auth-card-header {
    background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--accent)) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-card-body {
    padding: 2rem;
}

.auth-card-footer {
    text-align: center;
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid #e5e7eb;
}

/* ========== DIVIDER ========== */
.front-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.front-divider::before,
.front-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.front-divider span {
    padding: 0 1rem;
    font-size: 0.8125rem;
    color: rgb(var(--text-muted));
    text-transform: uppercase;
    font-weight: 500;
}

/* ========== PASSWORD STRENGTH ========== */
.password-strength-bars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.password-strength-bar {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: background 0.2s;
}

.password-strength-bar.weak { background: #ef4444; }
.password-strength-bar.fair { background: #f59e0b; }
.password-strength-bar.good { background: rgb(var(--primary)); }
.password-strength-bar.strong { background: #22c55e; }
