/* ============================================
   MI CARDO - BASE STYLES
   Estilos compartidos entre todas las páginas
   ============================================ */

/* ============ RESET & BOX MODEL ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============ CSS VARIABLES - COLORES ESCOCESES ============ */
:root {
    /* Colores principales */
    --scottish-blue: #005eb8;
    --scottish-blue-dark: #004a93;
    --scottish-blue-light: #e8f4ff;
    --thistle-purple: #7e3f8f;
    --thistle-purple-dark: #6a2c70;

    /* Colores neutros */
    --text-dark: #2c3e50;
    --text-muted: #5a6c7d;
    --text-light: #8492a6;
    --border-color: #e0e0e0;
    --border-light: #f0f2f5;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;

    /* Colores de estado */
    --success: #28a745;
    --success-bg: #d4edda;
    --success-text: #155724;
    --error: #c0392b;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --warning: #f39c12;

    /* Medallas */
    --gold: #ffd700;
    --gold-dark: #e6c200;
    --silver: #c0c0c0;
    --silver-dark: #a8a8a8;
    --bronze: #cd7f32;
    --bronze-dark: #b8702d;

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-scottish: 0 8px 32px rgba(0, 94, 184, 0.3);

    /* Bordes redondeados */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 50%;

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ TIPOGRAFÍA ============ */
body {
    font-family: 'Source Sans Pro', sans-serif;
    color: var(--text-dark);
    line-height: 1.5;
}

h1, h2, h3, h4 {
    font-family: 'Lora', serif;
}

/* ============ FONDOS CON IMAGEN ============ */
.bg-rugby {
    background: url('../images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    position: relative;
    transition: background-image 1s ease-in-out;
}

.bg-rugby::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

.bg-rugby-dark::before {
    background: rgba(0, 0, 0, 0.5);
}

/* ============ BOTONES ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Source Sans Pro', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.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 ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled::before {
    display: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--scottish-blue) 0%, #004a99 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 94, 184, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #004a99 0%, #003d7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 94, 184, 0.4);
}

.btn-purple {
    background: linear-gradient(135deg, var(--thistle-purple) 0%, #6a2f7a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(126, 63, 143, 0.3);
}

.btn-purple:hover:not(:disabled) {
    background: linear-gradient(135deg, #6a2f7a 0%, #5a2568 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(126, 63, 143, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-danger, .btn-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover:not(:disabled), .btn-delete:hover:not(:disabled) {
    background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #545b62 0%, #3d4246 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-edit {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-edit:hover:not(:disabled) {
    background: linear-gradient(135deg, #138496 0%, #0f6674 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0a800 0%, #c69500 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-gold:hover:not(:disabled) {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--scottish-blue);
    color: var(--scottish-blue);
    box-shadow: none;
}

.btn-outline:hover:not(:disabled) {
    background: var(--scottish-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 94, 184, 0.3);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 14px;
}

.btn-icon {
    padding: 10px;
    border-radius: 10px;
    min-width: 44px;
    min-height: 44px;
}

.btn-icon svg, .btn-icon img {
    width: 20px;
    height: 20px;
}

/* ============ FORMULARIOS ============ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: 'Source Sans Pro', sans-serif;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--scottish-blue);
}

/* ============ MENSAJES ============ */
.message {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid transparent;
}

.message.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #c3e6cb;
}

.message.error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: #f5c6cb;
}

/* ============ ANIMACIONES ============ */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes pulse-crown {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(255, 215, 0, 0); }
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* ============ UTILIDADES ============ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.hidden { display: none !important; }

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-style: italic;
}
