/* Variables CSS */
:root {
    --primary-color: #0010ef;
    --primary-dark: #0000cc;
    --primary-light: #3344ff;
    --secondary-color: #667eea;
    --accent-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #0010ef 0%, #667eea 50%, #764ba2 100%);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5em;
    font-weight: 700;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 1.2em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95em;
    transition: color 0.2s;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

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

.main-nav a:hover::after {
    width: 100%;
}

.user-menu {
    position: relative;
}

.user-name {
    cursor: pointer;
    padding: 8px 15px;
    background: var(--bg-light);
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.user-name:hover {
    background: var(--border-color);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    min-width: 200px;
    padding: 8px 0;
    overflow: hidden;
}

.user-menu:hover .user-dropdown {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: var(--bg-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1em;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--gradient-hero);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 0.95;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 80px 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5em;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
}

.hero-icon {
    display: inline-block;
    margin-right: 15px;
    font-size: 1em;
}

.hero-subtitle {
    font-size: 1.5em;
    margin-bottom: 15px;
    opacity: 0.95;
    font-weight: 500;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

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

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.2em;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon-wrapper {
    margin-bottom: 25px;
}

.feature-icon {
    font-size: 3.5em;
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.feature-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.feature-description {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95em;
}

/* Tournaments Section */
.tournaments-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.tournament-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.tournament-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tournament-badge .badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-open { background: rgba(255, 255, 255, 0.25); }
.badge-drawn { background: rgba(255, 255, 255, 0.25); }
.badge-in_progress { background: rgba(255, 255, 255, 0.25); }
.badge-completed { background: rgba(255, 255, 255, 0.25); }

.tournament-sport {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    opacity: 0.95;
}

.sport-icon {
    font-size: 1.2em;
}

.tournament-body {
    padding: 25px;
    flex: 1;
}

.tournament-name {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.tournament-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.9em;
}

.info-item svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

.tournament-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
}

/* Empty State */
.empty-tournaments {
    padding: 120px 0;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 5em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.8em;
    color: var(--text-color);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1.1em;
    color: var(--text-light);
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: var(--gradient-primary);
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.7;
}

/* Footer */
.main-footer {
    background: #1f2937;
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.footer-section p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

/* Dashboard Styles */
.dashboard-container {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 2.5em;
    color: var(--text-color);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 3em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-light);
    font-size: 1.1em;
}

/* Tables */
.data-table {
    width: 100%;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.data-table thead {
    background: var(--bg-light);
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-color);
}

.data-table tr:hover {
    background: var(--bg-light);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft { background: #e5e7eb; color: #6b7280; }
.status-open { background: #d1fae5; color: #065f46; }
.status-closed { background: #f3f4f6; color: #6b7280; }
.status-drawn { background: #dbeafe; color: #1e40af; }
.status-in_progress { background: #fef3c7; color: #92400e; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: #d1fae5; color: #065f46; }
.status-approved { background: #d1fae5; color: #065f46; }

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5em;
    }
    
    .hero-subtitle {
        font-size: 1.2em;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
    }
    
    .section-title {
        font-size: 2em;
    }
    
    .features-grid,
    .tournaments-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .modal {
        width: 95%;
        margin: 20px;
    }
    
    .toast {
        min-width: 250px;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .btn,
    .modal-overlay {
        display: none !important;
    }
    
    body {
        background: white;
    }
}
