:root {
    /* Light mode colors */
    --background: 210 40% 98%;
    --foreground: 222.2 47.4% 11.2%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 47.4% 11.2%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 47.4% 11.2%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.75rem;
}

.dark {
    /* Dark mode colors */
    --background: 224 71% 4%;
    --foreground: 213 31% 91%;
    --card: 224 71% 4%;
    --card-foreground: 213 31% 91%;
    --popover: 224 71% 4%;
    --popover-foreground: 215 20.2% 65.1%;
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 47.4% 11.2%;
    --secondary: 222.2 47.4% 11.2%;
    --secondary-foreground: 210 40% 98%;
    --muted: 223 47.4% 11.2%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 216 34% 17%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 63% 31%;
    --destructive-foreground: 210 40% 98%;
    --border: 216 34% 17%;
    --input: 216 34% 17%;
    --ring: 224.3 76.3% 48%;
}

* {
    border-color: hsl(var(--border));
    transition: background-color 0.3s ease-in-out,
                color 0.3s ease-in-out,
                border-color 0.3s ease-in-out,
                box-shadow 0.3s ease-in-out;
}

body {
    background: linear-gradient(135deg, 
        hsl(var(--background)) 0%,
        hsl(var(--background)/0.95) 25%,
        hsl(var(--primary)/0.1) 50%,
        hsl(var(--background)/0.95) 75%,
        hsl(var(--background)) 100%
    );
    color: hsl(var(--foreground));
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    transition: background 0.5s;
}

.dark body {
    background: linear-gradient(135deg, 
        hsl(var(--background)) 0%,
        hsl(var(--background)/0.95) 25%,
        hsl(var(--primary)/0.1) 50%,
        hsl(var(--background)/0.95) 75%,
        hsl(var(--background)) 100%
    );
    color: hsl(var(--foreground));
    transition: background 0.5s;
}

.yaro {
    font-family: 'Lalezar', cursive;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.duration-500 {
    transition-duration: 500ms;
}

.duration-700 {
    transition-duration: 700ms;
}

.duration-1000 {
    transition-duration: 1000ms;
}

/* Hover effects */
.hover\:scale-105:hover {
    transform: scale(1.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover\:bg-primary\/90:hover {
    background-color: hsl(var(--primary) / 0.9);
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover\:bg-secondary\/80:hover {
    background-color: hsl(var(--secondary) / 0.8);
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover\:bg-accent:hover {
    background-color: hsl(var(--accent));
}

.hover\:text-accent-foreground:hover {
    color: hsl(var(--accent-foreground));
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px hsl(var(--ring));
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.btn-primary {
    background: linear-gradient(135deg, 
        hsl(var(--primary)) 0%, 
        hsl(var(--primary)/0.9) 100%
    );
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background: linear-gradient(135deg, 
        hsl(var(--primary)/0.9) 0%, 
        hsl(var(--primary)/0.8) 100%
    );
}

.btn-secondary {
    background: linear-gradient(135deg, 
        hsl(var(--secondary)) 0%, 
        hsl(var(--secondary)/0.9) 100%
    );
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    background: linear-gradient(135deg, 
        hsl(var(--secondary)/0.9) 0%, 
        hsl(var(--secondary)/0.8) 100%
    );
}

/* Card styles */
.card {
    background: linear-gradient(135deg, 
        hsl(var(--card)) 0%, 
        hsl(var(--card)/0.98) 50%,
        hsl(var(--card)/0.95) 100%
    );
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid hsl(var(--border)/0.1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg,
        hsl(var(--card)) 0%,
        hsl(var(--card)/0.98) 50%,
        hsl(var(--card)/0.95) 100%
    );
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid hsl(var(--border)/0.2);
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

th {
    text-align: left;
    font-weight: 600;
    background: linear-gradient(135deg,
        hsl(var(--primary)/0.2) 0%,
        hsl(var(--primary)/0.15) 100%
    );
    color: hsl(var(--primary));
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid hsl(var(--primary)/0.2);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid hsl(var(--border)/0.2);
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    background: linear-gradient(135deg,
        hsl(var(--card)) 0%,
        hsl(var(--card)/0.98) 50%,
        hsl(var(--card)/0.95) 100%
    );
}

tr:last-child td {
    border-bottom: none;
}

tr {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

tr:hover {
    background: linear-gradient(135deg,
        hsl(var(--primary)/0.12) 0%,
        hsl(var(--primary)/0.08) 100%
    );
}

/* Profile styles */
.profile-card {
    background: linear-gradient(135deg, 
        hsl(var(--card)) 0%, 
        hsl(var(--card)/0.98) 50%,
        hsl(var(--card)/0.95) 100%
    );
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid hsl(var(--border)/0.1);
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid hsl(var(--primary));
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, 
        hsl(var(--secondary)) 0%, 
        hsl(var(--secondary)/0.95) 100%
    );
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid hsl(var(--border)/0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--primary));
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mobile menu */
.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--primary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--primary)/0.8);
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.98);
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Glass effect */
.glass {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.1) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, 
        hsl(var(--primary)) 0%, 
        hsl(var(--primary)/0.8) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    td, th {
        padding: 0.75rem 1rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }
}

/* Highlight for current user row */
.tr-user-highlight {
  background: hsl(var(--primary) / 0.15) !important;
  background-color: rgba(59, 130, 246, 0.15) !important;
}

/* Ghost button for gamemode selector */
.btn-ghost {
  background: transparent;
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary));
}
.btn-ghost:hover {
  background: hsl(var(--primary) / 0.08);
}
@media (prefers-color-scheme: light) {
  /* Fix text colors in light mode */
  .text-gray-400 {
    color: hsl(var(--muted-foreground)) !important;
  }
  .text-gray-500 {
    color: hsl(var(--muted-foreground)) !important;
  }
  .text-gray-300 {
    color: hsl(var(--foreground)) !important;
  }
  .text-gray-200 {
    color: hsl(var(--foreground)) !important;
  }
  .text-gray-600 {
    color: hsl(var(--foreground)) !important;
  }
  .text-gray-900 {
    color: hsl(var(--foreground)) !important;
  }
  .text-white {
    color: hsl(var(--foreground)) !important;
  }
  
  /* Fix button colors */
  .btn-secondary {
    color: hsl(var(--foreground)) !important;
    background: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(var(--secondary)/0.9) 100%) !important;
    border: 1px solid hsl(var(--primary)/0.15);
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
  }
  .btn-secondary:hover {
    background: linear-gradient(135deg, hsl(var(--primary)/0.08) 0%, hsl(var(--secondary)/0.8) 100%) !important;
    color: hsl(var(--primary));
    box-shadow: 0 4px 16px 0 rgba(59,130,246,0.10);
    border: 1px solid hsl(var(--primary));
  }
  .btn-ghost {
    color: hsl(var(--primary));
    border: 1px solid hsl(var(--primary));
    background: transparent !important;
    box-shadow: none;
  }
  .btn-ghost:hover {
    background: hsl(var(--primary)/0.08) !important;
    color: hsl(var(--primary));
    box-shadow: 0 2px 8px 0 rgba(59,130,246,0.08);
  }
  .btn-secondary.gamemode-btn {
    background: linear-gradient(135deg, hsl(var(--primary)/0.12) 0%, hsl(var(--primary)/0.08) 100%) !important;
    color: hsl(var(--primary)) !important;
    border: 1.5px solid hsl(var(--primary));
    box-shadow: 0 2px 8px 0 rgba(59,130,246,0.08);
  }
  .btn-secondary.gamemode-btn:hover {
    background: linear-gradient(135deg, hsl(var(--primary)/0.18) 0%, hsl(var(--primary)/0.12) 100%) !important;
    color: hsl(var(--primary)) !important;
  }
  .btn-ghost.gamemode-btn {
    background: #fff !important;
    color: hsl(var(--primary));
    border: 1.5px solid hsl(var(--primary)/0.5);
    box-shadow: none;
  }
  .btn-ghost.gamemode-btn:hover {
    background: hsl(var(--primary)/0.08) !important;
    color: hsl(var(--primary));
    box-shadow: 0 2px 8px 0 rgba(59,130,246,0.08);
  }
}

/* Theme transition classes */
.theme-transition {
    transition: background-color 0.3s ease-in-out,
                color 0.3s ease-in-out,
                border-color 0.3s ease-in-out,
                box-shadow 0.3s ease-in-out;
}

.theme-transition-slow {
    transition: background-color 0.5s ease-in-out,
                color 0.5s ease-in-out,
                border-color 0.5s ease-in-out,
                box-shadow 0.5s ease-in-out;
}

/* Add smooth transitions for specific elements */
body, .card, .btn, .glass, .gradient-text, table, tr, td, th {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover animations */
.hover\:translate-y-2:hover {
    transform: translateY(2px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add smooth transitions for text colors */
.text-foreground, .text-muted-foreground, .text-primary, .text-secondary {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add smooth transitions for backgrounds */
.bg-primary, .bg-secondary, .bg-accent, .bg-muted {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add smooth transitions for borders */
.border-primary, .border-secondary, .border-accent, .border-muted {
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ready to Compete section styles */
.ready-to-compete {
    background: linear-gradient(135deg,
        hsl(217 91% 60% / 0.3) 0%,
        hsl(217 91% 60% / 0.2) 50%,
        hsl(217 91% 60% / 0.3) 100%
    ) !important;
    border: 2px solid hsl(217 91% 60% / 0.3) !important;
    border-radius: var(--radius) !important;
    padding: 3rem !important;
    text-align: center !important;
    box-shadow: 0 8px 16px -4px hsl(217 91% 60% / 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
}

.ready-to-compete::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: radial-gradient(
        circle at 50% 50%,
        hsl(217 91% 60% / 0.2) 0%,
        transparent 70%
    ) !important;
    pointer-events: none !important;
}

.ready-to-compete h2 {
    color: hsl(217 91% 60%) !important;
    font-size: 3rem !important;
    font-weight: 800 !important;
    margin-bottom: 1.5rem !important;
    text-shadow: 0 2px 4px hsl(217 91% 60% / 0.2) !important;
    position: relative !important;
}

.ready-to-compete p {
    color: hsl(var(--foreground)) !important;
    margin-bottom: 2.5rem !important;
    font-size: 1.25rem !important;
    line-height: 1.6 !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative !important;
}

.ready-to-compete .btn {
    background: linear-gradient(135deg,
        hsl(217 91% 60%) 0%,
        hsl(217 91% 60% / 0.9) 100%
    ) !important;
    color: white !important;
    padding: 1.25rem 3rem !important;
    border-radius: var(--radius) !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    border: none !important;
    box-shadow: 0 4px 12px -2px hsl(217 91% 60% / 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.ready-to-compete .btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(
        90deg,
        transparent,
        hsl(217 91% 60% / 0.2),
        transparent
    ) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.ready-to-compete .btn:hover {
    background: linear-gradient(135deg,
        hsl(217 91% 60% / 0.9) 0%,
        hsl(217 91% 60%) 100%
    ) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px -4px hsl(217 91% 60% / 0.4) !important;
}

.ready-to-compete .btn:hover::before {
    transform: translateX(100%) !important;
}

/* Dark mode specific enhancements */
.dark .ready-to-compete {
    background: linear-gradient(135deg,
        hsl(217 91% 60% / 0.4) 0%,
        hsl(217 91% 60% / 0.3) 50%,
        hsl(217 91% 60% / 0.4) 100%
    ) !important;
    border: 2px solid hsl(217 91% 60% / 0.4) !important;
    box-shadow: 0 8px 16px -4px hsl(217 91% 60% / 0.3) !important;
}

.dark .ready-to-compete::before {
    background: radial-gradient(
        circle at 50% 50%,
        hsl(217 91% 60% / 0.3) 0%,
        transparent 70%
    ) !important;
}

.dark .ready-to-compete h2 {
    color: hsl(217 91% 60%) !important;
    text-shadow: 0 2px 4px hsl(217 91% 60% / 0.3) !important;
}

.dark .ready-to-compete p {
    color: hsl(var(--foreground)) !important;
}

.dark .ready-to-compete .btn {
    background: linear-gradient(135deg,
        hsl(217 91% 60%) 0%,
        hsl(217 91% 60% / 0.95) 100%
    ) !important;
    box-shadow: 0 4px 12px -2px hsl(217 91% 60% / 0.4) !important;
}

.dark .ready-to-compete .btn:hover {
    background: linear-gradient(135deg,
        hsl(217 91% 60% / 0.95) 0%,
        hsl(217 91% 60%) 100%
    ) !important;
    box-shadow: 0 8px 20px -4px hsl(217 91% 60% / 0.5) !important;
}

/* Table dark mode enhancements */
.dark table {
    border: 2px solid hsl(var(--border)/0.4);
}

.dark th {
    background: linear-gradient(135deg,
        hsl(var(--primary)/0.3) 0%,
        hsl(var(--primary)/0.25) 100%
    );
    border-bottom: 2px solid hsl(var(--primary)/0.4);
}

.dark td {
    border-bottom: 1px solid hsl(var(--border)/0.4);
}

.dark tr:hover {
    background: linear-gradient(135deg,
        hsl(var(--primary)/0.2) 0%,
        hsl(var(--primary)/0.15) 100%
    );
} 