/**
 * Ludo Tournament - Custom Styles
 * Mobile-First Design | Ludo King Inspired
 */

:root {
    --primary: #E53935;
    --primary-dark: #C62828;
    --secondary: #43A047;
    --secondary-dark: #2E7D32;
    --accent: #FB8C00;
    --accent-dark: #EF6C00;
    --blue: #1E88E5;
    --blue-dark: #1565C0;
    --yellow: #FDD835;
    --yellow-dark: #F9A825;
    --dark: #1a1a2e;
    --darker: #16213e;
    --light: #f5f5f5;
    --white: #ffffff;
    --gray: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --gradient-red: linear-gradient(135deg, #E53935 0%, #C62828 100%);
    --gradient-green: linear-gradient(135deg, #43A047 0%, #2E7D32 100%);
    --gradient-blue: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    --gradient-yellow: linear-gradient(135deg, #FDD835 0%, #F9A825 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow: 0 4px 15px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes diceRoll {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(180deg) rotateY(0deg); }
    50% { transform: rotateX(180deg) rotateY(180deg); }
    75% { transform: rotateX(0deg) rotateY(180deg); }
    100% { transform: rotateX(0deg) rotateY(360deg); }
}

.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.5s ease forwards; }
.animate-slideInRight { animation: slideInRight 0.5s ease forwards; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-bounce { animation: bounce 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: 50px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-red);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.5);
}

.btn-secondary {
    background: var(--gradient-green);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.5);
}

.btn-accent {
    background: var(--gradient-yellow);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(253, 216, 53, 0.4);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 216, 53, 0.5);
}

.btn-blue {
    background: var(--gradient-blue);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
}

.btn-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
    min-height: 40px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
    min-height: 56px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

.invalid-feedback {
    display: none;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--danger);
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group .btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 20px;
}

/* Toggle Password */
.password-toggle {
    position: relative;
}

.password-toggle .toggle-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    transition: var(--transition);
}

.password-toggle .toggle-icon:hover {
    color: var(--white);
}

/* ============================================
   ALERTS & TOASTS
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #7ee787;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff7b7b;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffd54f;
}

.alert-info {
    background: rgba(23, 162, 184, 0.15);
    border: 1px solid rgba(23, 162, 184, 0.3);
    color: #4fc3f7;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease, fadeIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast-success { background: var(--gradient-green); }
.toast-error { background: var(--gradient-red); }
.toast-warning { background: var(--gradient-yellow); color: var(--dark); }
.toast-info { background: var(--gradient-blue); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(26, 26, 46, 0.98);
    box-shadow: var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
}

.navbar-brand img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.navbar-brand span {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-toggler {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover, .nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-link i {
    font-size: 1.1rem;
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 12px;
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 1.3rem;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--primary);
}

.bottom-nav-item.active {
    background: rgba(229, 57, 53, 0.15);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 20px 60px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.15) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(67, 160, 71, 0.1) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite reverse;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(229, 57, 53, 0.2);
    border: 1px solid rgba(229, 57, 53, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    animation: fadeIn 0.6s ease;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    animation: fadeIn 0.7s ease;
}

.hero-title span {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    animation: fadeIn 0.8s ease;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 0.9s ease;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 48px;
    animation: fadeIn 1s ease;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-yellow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* Ludo Board Animation */
.hero-board {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
    opacity: 0.1;
    animation: float 4s ease-in-out infinite;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 60px 20px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
    font-size: 0.95rem;
}

/* ============================================
   FEATURE CARDS
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.feature-icon.red { background: rgba(229, 57, 53, 0.15); color: #ef5350; }
.feature-icon.green { background: rgba(67, 160, 71, 0.15); color: #66bb6a; }
.feature-icon.blue { background: rgba(30, 136, 229, 0.15); color: #42a5f5; }
.feature-icon.yellow { background: rgba(253, 216, 53, 0.15); color: #ffee58; }

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* ============================================
   TOURNAMENT CARDS
   ============================================ */
.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.tournament-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.tournament-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.tournament-header {
    padding: 20px;
    background: var(--gradient-dark);
    position: relative;
}

.tournament-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.tournament-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.tournament-prize {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-yellow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tournament-body {
    padding: 20px;
}

.tournament-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tournament-info-item {
    text-align: center;
}

.tournament-info-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.tournament-info-value {
    font-size: 1rem;
    font-weight: 600;
}

.tournament-players {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.player-avatars {
    display: flex;
}

.player-avatars img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--dark);
    margin-left: -8px;
}

.player-avatars img:first-child {
    margin-left: 0;
}

.tournament-footer {
    padding: 0 20px 20px;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-live {
    background: rgba(67, 160, 71, 0.2);
    color: #66bb6a;
}

.status-upcoming {
    background: rgba(30, 136, 229, 0.2);
    color: #42a5f5;
}

.status-completed {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.12) 0%, transparent 70%);
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(67, 160, 71, 0.08) 0%, transparent 70%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 40px 32px;
    animation: fadeIn 0.5s ease;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo img {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

.auth-logo p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 4px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--white);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* OTP Input */
.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.otp-inputs .form-control {
    width: 55px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0;
}

/* ============================================
   LOADING & SPINNER
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.btn .spinner {
    width: 20px;
    height: 20px;
    border-top-color: currentColor;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--white);
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
}

/* ============================================
   WIN/LOSE POPUP
   ============================================ */
.result-popup {
    text-align: center;
    padding: 40px 30px;
}

.result-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 3rem;
    animation: bounce 1s ease;
}

.result-icon.win {
    background: var(--gradient-green);
    box-shadow: 0 10px 40px rgba(67, 160, 71, 0.4);
}

.result-icon.lose {
    background: var(--gradient-red);
    box-shadow: 0 10px 40px rgba(229, 57, 53, 0.4);
}

.result-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.result-title.win { color: #66bb6a; }
.result-title.lose { color: #ef5350; }

.result-amount {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.result-amount.win {
    background: var(--gradient-yellow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-amount.lose {
    color: rgba(255, 255, 255, 0.5);
}

.result-message {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 28px;
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */
.balance-card {
    background: var(--gradient-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.1) 0%, transparent 70%);
}

.balance-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 800;
}

.balance-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Stats Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.4rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   TABLE STYLES
   ============================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(40, 167, 69, 0.15);
    color: #7ee787;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.15);
    color: #ff7b7b;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffd54f;
}

.badge-info {
    background: rgba(23, 162, 184, 0.15);
    color: #4fc3f7;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.avatar-lg {
    width: 80px;
    height: 80px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
}

.search-bar i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--darker);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 20px 100px;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.footer-logo span {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .hero-stat-number {
        font-size: 1.5rem;
    }
    
    .auth-card {
        padding: 32px 24px;
    }
    
    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .section {
        padding: 40px 16px;
    }
    
    .tournament-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
    
    .footer {
        padding-bottom: 40px;
    }
}

/* Safe Area for iPhone X+ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.flex-column { flex-direction: column; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.p-2 { padding: 8px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }

.text-muted { color: rgba(255, 255, 255, 0.6); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }

.fs-sm { font-size: 0.875rem; }
.fs-lg { font-size: 1.125rem; }

.rounded { border-radius: var(--radius-sm); }
.shadow { box-shadow: var(--shadow); }

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shimmer Loading */
.shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}