/* Custom styles complementing Bootstrap */

:root {
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    --light: #f8f9fa;
    --dark: #212529;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Navbar customization */
.navbar-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-custom .navbar-brand {
    font-size: 1.5rem;
    color: white !important;
    text-decoration: none;
    transition: transform 0.2s;
    padding: 0.5rem 0;
}

.navbar-custom .navbar-brand:hover {
    transform: scale(1.05);
    color: white !important;
}

.navbar-custom .brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.25rem;
    transition: all 0.3s;
}

.navbar-custom .navbar-brand:hover .brand-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(10deg);
}

.navbar-custom .brand-text {
    color: white;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.navbar-custom .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.5rem;
}

.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-custom .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.6rem 1rem;
    margin: 0 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.3s;
    font-weight: 500;
    position: relative;
}

.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link:focus {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.navbar-custom .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

.navbar-custom .navbar-nav .nav-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.navbar-custom .navbar-nav .dropdown-toggle::after {
    margin-left: 0.5rem;
    border-top-color: rgba(255, 255, 255, 0.8);
}

.navbar-custom .dropdown-menu-custom {
    background-color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 220px;
}

.navbar-custom .dropdown-menu-custom .dropdown-item {
    padding: 0.6rem 1.25rem;
    color: #495057;
    transition: all 0.2s;
    font-weight: 500;
}

.navbar-custom .dropdown-menu-custom .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    padding-left: 1.5rem;
}

.navbar-custom .dropdown-menu-custom .dropdown-item i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
    color: #6c757d;
}

.navbar-custom .dropdown-menu-custom .dropdown-item:hover i {
    color: #0d6efd;
}

.navbar-custom .dropdown-menu-custom .dropdown-divider {
    margin: 0.5rem 0;
    border-top-color: #dee2e6;
}

.navbar-custom .navbar-user {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    color: white !important;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-custom .navbar-user:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: white !important;
}

.navbar-custom .navbar-user:focus {
    color: white !important;
}

.navbar-custom .navbar-user i {
    color: white;
}

.navbar-custom .navbar-user .user-name {
    color: white;
    font-size: 0.95rem;
}

.navbar-custom .navbar-user.dropdown-toggle::after {
    margin-left: 0.75rem;
    border-top-color: rgba(255, 255, 255, 0.9);
}

/* Responsive navbar */
@media (max-width: 991px) {
    .navbar-custom .navbar-nav {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-custom .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
    
    .navbar-custom .navbar-nav:last-child {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-custom .navbar-user {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Page containers */
.page-container {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

/* Form cards */
.form-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Checkbox groups */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    cursor: pointer;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.table {
    background-color: white;
}

.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    font-weight: 500;
    transition: all 0.2s;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn i {
    margin-right: 0.25rem;
}

/* Auth pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-card {
    background-color: white;
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
}

.auth-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    color: #212529;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Cancha (Field) */
.cancha-container {
    margin-top: 2rem;
}

.cancha {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.equipo-cancha {
    border: 3px solid;
    border-radius: 0.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.equipo-cancha:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.equipo-cancha h3 {
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.jugadores-equipo {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.jugador-cancha {
    text-align: center;
    padding: 0.75rem;
    background-color: white;
    border-radius: 0.375rem;
    border: 2px solid #dee2e6;
    transition: all 0.2s;
}

.jugador-cancha:hover {
    border-color: var(--primary);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.jugador-cancha .numero {
    display: block;
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.jugador-cancha .nombre {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Color badges */
.color-badge {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 0.375rem;
    border: 2px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .cancha {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .page-container {
        padding: 1rem;
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    animation: fadeIn 0.3s ease-in;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Jugador foto styles */
.jugador-foto {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.jugador-foto-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 3px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.comentarios-jugador {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: #495057;
    white-space: pre-wrap;
}

.comentarios-jugador strong {
    display: block;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #212529;
    font-size: 1rem;
    font-weight: 600;
}

.comentarios-jugador strong:first-child {
    margin-top: 0;
}

/* Cards mejoradas */
.card {
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Form selects mejorados */
.form-select-lg {
    font-size: 1rem;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
}

/* Mejoras visuales generales */
.text-muted {
    color: #6c757d !important;
}

.fw-semibold {
    font-weight: 600;
}
