/* assets/css/main.css - Core styles that apply globally */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    
    --success-color: #10b981;
    --warning-color: #fbbf24;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-gray: #f1f5f9;
    --bg-dark: #1e293b;
    
    --border-light: #e2e8f0;
    --border-gray: #cbd5e1;
    --border-dark: #475569;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Monaco', 'Menlo', monospace;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.5em;
}

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

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    border: 1px solid transparent;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--border-light);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-danger {
    background: var(--error-color);
    color: var(--text-white);
    border: 1px solid transparent;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.readonly-field {
    background-color: #f5f5f5;
    border-color: #ddd;
    color: #666;
    cursor: not-allowed;
}

/* Role Switcher */
.role-switcher {
	position: relative;
}

.role-switcher select {
	padding: 6px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background: white;
	font-size: 14px;
	color: #374151;
	cursor: pointer;
}
       
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.logo-section .game {
    color: #000;
	font-size: 18px;
}

.logo-section .face {
	color: #00c2ff;
	font-size: 18px;
	padding-right: 4px;
}

.emoji-icon-xl {
    width: 48px;
    height: 48px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
}

.emoji-icon-small {
    width: 16px;
    height: 16px;
	margin-left:4px;
}

/* User Menu Container */
.user-menu-container {
    position: relative;
}

/* User Menu Container */
.user-menu-container {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-menu-toggle:hover {
    background: #f1f5f9;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.user-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.2;
}

.user-role-label {
    font-size: 12px;
    color: #64748b;
    line-height: 1.2;
}


/* Notification badge and tooltip styles */
.notification-container {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.notification-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.notification-container:hover .notification-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.notification-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}


.notification-list {
    padding: 4px 0;
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 20px;
    border-bottom: 6px solid #e5e7eb;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-type {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 6px;
}

/* Type color coding */
.notification-type.event_reminder {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification-type.team_invite {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-type.video_upload {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.notification-type.clip_created {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.notification-type.event_status_change {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification-type.default {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.notification-message {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
}

.empty-notifications {
    padding: 32px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.empty-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.notification-list::-webkit-scrollbar {
    width: 4px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.tooltip-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.tooltip-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.tooltip-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0 0 0;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition-normal);
    background: var(--bg-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-error {
    color: var(--error-color);
    font-size: 12px;
    margin-top: var(--spacing-xs);
}

/* Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

/* Badges and Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning-color);
}

.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-light { color: var(--text-light); }
.text-white { color: var(--text-white); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-error { color: var(--error-color); }

.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }
.bg-gray { background: var(--bg-gray); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

.p-xs { padding: var(--spacing-xs); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.m-xs { margin: var(--spacing-xs); }
.m-sm { margin: var(--spacing-sm); }
.m-md { margin: var(--spacing-md); }
.m-lg { margin: var(--spacing-lg); }
.m-xl { margin: var(--spacing-xl); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 50%; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Responsive Utilities */
@media (max-width: 768px) {
    .mobile-hidden { display: none; }
    .mobile-full { width: 100%; }
    .mobile-text-center { text-align: center; }
}

@media (min-width: 769px) {
    .desktop-hidden { display: none; }
}

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

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: var(--success-color);
}

.notification-error {
    background: var(--error-color);
}

.notification-warning {
    background: var(--warning-color);
}

.notification-info {
    background: var(--info-color);
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* =====================================================
   STAT CARDS - CENTRALIZED & SMALLER
   ===================================================== */

/* Base Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* SMALLER: was 200-250px */
    gap: 20px; /* SMALLER: was 24px */
    margin-bottom: 6px;
	margin-top: 12px;
}

/* For larger stat cards where needed */
.stats-grid.large {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

/* Base Stat Card - SMALLER VERSION */
.stat-card {
    background: var(--bg-primary, white);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    padding: 12px; /* SMALLER: was 24px */
    transition: all var(--transition-normal, 0.2s ease);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.1));
    transform: translateY(-2px);
}

/* Stat Card Layouts */
.stat-card.horizontal {
    display: flex;
    align-items: center;
    gap: 12px; /* SMALLER: was 16px */
    text-align: left;
}

.stat-card.vertical,
.stat-card:not(.horizontal) {
    text-align: center;
    display: block;
}

/* Stat Card Elements */
.stat-icon {
    font-size: 28px; /* SMALLER: was 32px */
    margin-bottom: 10px; /* SMALLER: was 12px */
    flex-shrink: 0;
}

.stat-card.horizontal .stat-icon {
    background: var(--bg-gray, #f1f5f9);
    padding: 10px; /* SMALLER: was 12px */
    border-radius: var(--radius-md, 8px);
    margin-bottom: 0;
}

.stat-card.vertical .stat-icon {
    display: block;
    margin: 0 auto 10px;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-number {
    font-size: 24px; /* SMALLER: was 28-32px */
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin-bottom: 4px;
    line-height: 1.1;
}

.stat-label {
    color: var(--text-secondary, #64748b);
    font-size: 13px; /* SMALLER: was 14px */
    font-weight: 500;
    margin-bottom: 6px; /* SMALLER: was 8px */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-change {
    font-size: 11px; /* SMALLER: was 12-13px */
    font-weight: 600;
    padding: 3px 8px; /* SMALLER: was 4-6px 8-12px */
    border-radius: 12px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-change.positive {
    color: var(--success-color, #059669);
    background: rgba(16, 185, 129, 0.1);
}

.stat-change.negative {
    color: var(--error-color, #dc2626);
    background: rgba(239, 68, 68, 0.1);
}

.stat-change.neutral {
    color: var(--text-secondary, #64748b);
    background: var(--bg-gray, #f1f5f9);
}

/* Team Stat Cards (specific styling) */
.team-stat-card {
    background: var(--bg-primary, white);
    padding: 18px; /* SMALLER: was var(--spacing-lg) */
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border-light, #e2e8f0);
    text-align: center;
    transition: transform var(--transition-normal, 0.2s ease);
}

.team-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.1));
}

.team-stat-icon {
    font-size: 28px; /* SMALLER: was 32px */
    margin-bottom: var(--spacing-sm, 8px);
    background: var(--bg-gray, #f1f5f9);
    width: 50px; /* SMALLER: was 60px */
    height: 50px; /* SMALLER: was 60px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm, 8px);
}

.team-stat-number {
    font-size: 24px; /* SMALLER: was 28px */
    font-weight: bold;
    color: var(--text-primary, #1e293b);
    margin-bottom: 4px;
}

.team-stat-label {
    color: var(--text-secondary, #64748b);
    font-size: 13px; /* SMALLER: was 14px */
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Even smaller on mobile */
        gap: 16px;
    }
    
    .stat-card {
        padding: 16px; /* SMALLER: was 20-24px on mobile */
    }
    
    .stat-number {
        font-size: 20px; /* SMALLER: was 24px+ */
    }
    
    .stat-icon {
        font-size: 24px; /* SMALLER: was 28px+ */
    }
    
    .stat-card.horizontal {
        gap: 12px;
    }
    
    .stat-card.horizontal .stat-icon {
        padding: 8px;
    }
    
    .team-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .team-stat-number {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr; /* Single column on small mobile */
        gap: 12px;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-change {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* =====================================================
   VARIANT CLASSES FOR SPECIAL CASES
   ===================================================== */

/* Large stat cards for admin or special pages */
.stat-card.large {
    padding: 24px;
}

.stat-card.large .stat-number {
    font-size: 32px;
}

.stat-card.large .stat-icon {
    font-size: 36px;
}

/* Compact stat cards for dense layouts */
.stat-card.compact {
    padding: 12px;
}

.stat-card.compact .stat-number {
    font-size: 20px;
}

.stat-card.compact .stat-icon {
    font-size: 24px;
}

/* Status-specific styling */
.stat-card.urgent {
    border-left: 4px solid var(--error-color, #dc2626);
}

.stat-card.warning {
    border-left: 4px solid var(--warning-color, #f59e0b);
}

.stat-card.success {
    border-left: 4px solid var(--success-color, #10b981);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.modal-close:hover {
    background: var(--bg-gray);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* Common layout patterns */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar {
    background: var(--bg-primary);
    border-right: 1px solid var(--border-light);
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: var(--spacing-xl);
    overflow-y: auto;
}

