/* App.LE Club - Main Stylesheet */

/* CSS Custom Properties (Variables) */
:root {
    --club-primary: #1a1a1a;
    --club-secondary: #2d2d2d;
    --club-accent: #3d3d3d;
    --club-gold: #ffffff;
    --club-text: #f5f5f5;
    --club-text-muted: #9ca3af;
    --club-border: #374151;
    --club-success: #10b981;
    --club-error: #ef4444;
    --club-warning: #f59e0b;
    --club-info: #3b82f6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    --gradient-text: linear-gradient(135deg, #ffffff, #e5e5e5);
    --gradient-gold: linear-gradient(135deg, #ffffff, #e5e5e5);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-primary);
    color: var(--club-text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin: 0 0 1rem 0;
}

a {
    color: var(--club-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #e5e5e5;
}

/* Utility Classes */
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glass-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.glass-effect:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
    position: relative;
}

.glass-effect:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-effect:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.3), 
        rgba(255, 255, 255, 0.1), 
        transparent);
    animation: runningGlow 1.5s ease-in-out;
    z-index: 1;
}

@keyframes runningGlow {
    0% {
        left: -100%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Enhanced glass effect for profile fields */
.glass-field {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.glass-field:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 15px rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* Layout Components */
.container {
    max-width: 80%;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 2rem 0;
}

.card {
    background: var(--club-secondary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--club-border);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.btn:focus {
    outline: 2px solid var(--club-gold);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--club-gold);
    color: #000;
}

.btn-primary:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #000;
}

/* Ensure gold CTA links keep black text on hover */
a.bg-club-gold:hover {
    color: #000 !important;
}

.btn-secondary {
    background: var(--club-secondary);
    color: var(--club-text);
    border: 1px solid var(--club-border);
}

.btn-secondary:hover {
    background: var(--club-accent);
    border-color: var(--club-gold);
    color: var(--club-gold);
}

.btn-danger {
    background: var(--club-error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--club-success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--club-text);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--club-secondary);
    border: 1px solid var(--club-border);
    border-radius: 0.5rem;
    color: var(--club-text);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--club-gold);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-input::placeholder {
    color: var(--club-text-muted);
}

.form-select {
    appearance: none;
    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 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Select option styling for dark theme */
select option {
    background-color: var(--club-secondary) !important;
    color: var(--club-text) !important;
    padding: 0.5rem;
}

select option:hover {
    background-color: var(--club-accent) !important;
}

select option:checked {
    background-color: var(--club-gold) !important;
    color: var(--club-primary) !important;
}

.form-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--club-gold);
}

.form-error {
    color: var(--club-error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.form-help {
    color: var(--club-text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--club-success);
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--club-error);
    color: #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--club-warning);
    color: #f59e0b;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--club-info);
    color: #3b82f6;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--club-border);
}

.table th {
    background: var(--club-accent);
    font-weight: 600;
    color: var(--club-text);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: var(--club-secondary);
}

/* Navigation */
.nav {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: visible;
    z-index: 1000;
}

.nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.nav-container {
    max-width: 80%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 4rem;
    position: relative;
    overflow: visible;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--club-gold);
    text-decoration: none;
    position: absolute;
    left: 1rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
    flex: 1;
    position: relative;
    overflow: visible;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
    z-index: 10001;
}

.nav-dropdown-right {
    position: absolute;
    right: 1rem;
    z-index: 10001;
}

.nav-link {
    color: var(--club-text);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--club-gold);
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    color: var(--club-text);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.nav-dropdown-toggle:hover {
    color: var(--club-gold);
    background: rgba(255, 255, 255, 0.05);
}

.nav-dropdown-toggle[aria-expanded="true"] {
    color: var(--club-gold);
    background: rgba(255, 255, 255, 0.1);
}

.nav-dropdown-toggle[aria-expanded="true"] svg:last-child {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.5),
        0 4px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 10002 !important;
    padding: 0.5rem;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
}

/* Show menu when parent has .open class */
.nav-dropdown.open > .nav-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    max-height: 500px !important;
    overflow: visible !important;
    display: block !important;
}

/* Also check for aria-expanded on toggle button */
.nav-dropdown .nav-dropdown-toggle[aria-expanded="true"] ~ .nav-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    max-height: 500px !important;
    overflow: visible !important;
    display: block !important;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--club-text);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all var(--transition-fast);
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--club-gold);
}

.nav-dropdown-item svg {
    flex-shrink: 0;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--club-secondary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--club-border);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--club-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.75rem;
    color: var(--club-text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    min-width: 2.5rem;
}

.pagination a {
    background: var(--club-secondary);
    color: var(--club-text);
    border: 1px solid var(--club-border);
}

.pagination a:hover {
    background: var(--club-accent);
    color: var(--club-gold);
}

.pagination .current {
    background: var(--club-gold);
    color: #000;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .nav-container {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 0.75rem;
    }
    
    .nav-container {
        max-width: 100%;
        flex-direction: row;
        height: 4rem;
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    
    .nav-menu {
        flex-wrap: nowrap;
        gap: 0.75rem;
        font-size: 0.875rem;
    }
    
    .nav-brand {
        font-size: 1.25rem;
    }
    
    .nav-dropdown-menu {
        right: 0;
        left: auto;
        min-width: 180px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .card {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--club-border);
    border-radius: 50%;
    border-top-color: var(--club-gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .nav,
    .btn,
    .pagination {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}
