/* Swiss Manager Modern - Custom CSS Theme */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--warning-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Modern Cards */
.modern-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.modern-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    transform: translateY(-2px);
}

/* Modern Buttons */
.btn-modern {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-modern-primary {
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
}

.btn-modern-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    color: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.btn-modern-secondary {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.btn-modern-secondary:hover {
    background: var(--gray-50);
    color: var(--gray-800);
    border-color: var(--gray-300);
}

/* Form Controls */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid var(--gray-300);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
    color: var(--gray-600);
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Chess-specific Styles */
.chess-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    border: 2px solid var(--gray-800);
    border-radius: 0.5rem;
    overflow: hidden;
}

.chess-square {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chess-square.light {
    background-color: #f0d9b5;
}

.chess-square.dark {
    background-color: #b58863;
}

.chess-square:hover {
    opacity: 0.8;
}

/* Tournament Cards */
.tournament-card {
    border-left: 4px solid var(--primary-color);
}

.tournament-card:hover {
    border-left-color: var(--warning-color);
}

/* Achievement Badges */
.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.achievement-badge.common {
    background: var(--gray-100);
    color: var(--gray-700);
}

.achievement-badge.uncommon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.achievement-badge.rare {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.achievement-badge.epic {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.achievement-badge.legendary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Progress Bars */
.progress {
    border-radius: 1rem;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Statistics */
.stat-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

/* Feature Icons */
.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-card {
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .feature-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    .btn-modern {
        padding: 0.6rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #0f172a;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;
    }
    
    body {
        background-color: var(--gray-50);
        color: var(--gray-800);
    }
    
    .modern-card {
        background: var(--gray-100);
        border-color: var(--gray-200);
    }
}

/* Print Styles */
@media print {
    .modern-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btn-modern {
        display: none;
    }
    
    .navbar {
        display: none;
    }
}