/* modal.css */
/* Base modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--glass-bg, rgba(20, 20, 20, 0.85));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 24px;
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Base header styles */
.modal-country-header {
    position: relative;
    padding: 40px 20px 20px;
    text-align: center;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    overflow: hidden;
}

.modal-country-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    margin: 0;
    color: white;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.modal-country-stripe {
    height: 6px;
    width: 100%;
}

.modal-body {
    padding: 24px;
}

.modal-info-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    color: var(--text-secondary, #ccc);
}

.modal-info-bar span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-info-bar strong {
    color: var(--gold-light, #ffe082);
    min-width: 90px;
}

.modal-description {
    font-style: italic;
    color: var(--text-primary, #fff);
    margin-bottom: 24px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.modal-guidelines {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary, #ddd);
    line-height: 1.6;
}

.modal-guidelines h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.4rem;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
    margin-top: 20px;
    margin-bottom: 12px;
}

.modal-actions {
    margin-top: 30px;
    text-align: center;
}

.register-btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 30px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

/* Decorative elements */
.modal-country-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 20px 20px;
    opacity: 0.5;
    z-index: 1;
}

.corner-flag {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 40px 40px 0 0;
    z-index: 3;
}

.goal-post {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    z-index: 1;
}

/* Custom Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

/* Country Specifics */
/* Portugal */
.modal-content[data-country='portugal'] .modal-country-header {
    background: linear-gradient(135deg, #C4161C 0%, #8A0F13 100%);
}
.modal-content[data-country='portugal'] .corner-flag {
    border-color: #046A38 transparent transparent transparent;
}
.modal-content[data-country='portugal'] .modal-country-stripe {
    background: #046A38;
}
.modal-content[data-country='portugal'] .modal-guidelines strong { color: #C4161C; }
.modal-content[data-country='portugal'] .register-btn {
    background: linear-gradient(90deg, #C4161C, #046A38);
}
.modal-content[data-country='portugal']::-webkit-scrollbar-thumb { background: #C4161C; }

/* Argentina */
.modal-content[data-country='argentina'] .modal-country-header {
    background: repeating-linear-gradient(90deg, #75AADB, #75AADB 20px, #FFFFFF 20px, #FFFFFF 40px);
}
.modal-content[data-country='argentina'] .modal-country-header h2 { color: #000; text-shadow: 0 2px 4px rgba(255,255,255,0.6); }
.modal-content[data-country='argentina'] .corner-flag { border-color: #75AADB transparent transparent transparent; }
.modal-content[data-country='argentina'] .modal-country-stripe { background: #E8A836; }
.modal-content[data-country='argentina'] .modal-guidelines strong { color: #75AADB; }
.modal-content[data-country='argentina'] .register-btn { background: linear-gradient(90deg, #75AADB, #E8A836); }
.modal-content[data-country='argentina']::-webkit-scrollbar-thumb { background: #75AADB; }

/* Brazil */
.modal-content[data-country='brazil'] .modal-country-header {
    background: linear-gradient(135deg, #FEDD00 0%, #E0C100 100%);
}
.modal-content[data-country='brazil'] .modal-country-header h2 { color: #009C3B; text-shadow: 0 2px 4px rgba(255,255,255,0.6); }
.modal-content[data-country='brazil'] .corner-flag { border-color: #009C3B transparent transparent transparent; }
.modal-content[data-country='brazil'] .modal-country-stripe { background: #002776; }
.modal-content[data-country='brazil'] .modal-guidelines strong { color: #009C3B; }
.modal-content[data-country='brazil'] .register-btn { background: linear-gradient(90deg, #009C3B, #FEDD00); color: #002776; }
.modal-content[data-country='brazil']::-webkit-scrollbar-thumb { background: #009C3B; }

/* Spain */
.modal-content[data-country='spain'] .modal-country-header { background: linear-gradient(135deg, #C60B1E 0%, #900816 100%); }
.modal-content[data-country='spain'] .corner-flag { border-color: #FFC400 transparent transparent transparent; }
.modal-content[data-country='spain'] .modal-country-stripe { background: #FFC400; }
.modal-content[data-country='spain'] .modal-guidelines strong { color: #FFC400; }
.modal-content[data-country='spain'] .register-btn { background: linear-gradient(90deg, #C60B1E, #FFC400); }
.modal-content[data-country='spain']::-webkit-scrollbar-thumb { background: #C60B1E; }

/* England */
.modal-content[data-country='england'] .modal-country-header { background: #FFFFFF; }
.modal-content[data-country='england'] .modal-country-header h2 { color: #003366; text-shadow: none; }
.modal-content[data-country='england'] .corner-flag { border-color: #CE1126 transparent transparent transparent; }
.modal-content[data-country='england'] .modal-country-stripe { background: #003366; }
.modal-content[data-country='england'] .modal-guidelines strong { color: #003366; }
.modal-content[data-country='england'] .register-btn { background: linear-gradient(90deg, #FFFFFF, #003366); color: #000; }
.modal-content[data-country='england']::-webkit-scrollbar-thumb { background: #003366; }

/* France */
.modal-content[data-country='france'] .modal-country-header { background: linear-gradient(135deg, #002395 0%, #001661 100%); }
.modal-content[data-country='france'] .corner-flag { border-color: #ED2939 transparent transparent transparent; }
.modal-content[data-country='france'] .modal-country-stripe { background: repeating-linear-gradient(90deg, #002395 0%, #002395 33.3%, #FFFFFF 33.3%, #FFFFFF 66.6%, #ED2939 66.6%, #ED2939 100%); }
.modal-content[data-country='france'] .modal-guidelines strong { color: #002395; }
.modal-content[data-country='france'] .register-btn { background: linear-gradient(90deg, #002395, #ED2939); }
.modal-content[data-country='france']::-webkit-scrollbar-thumb { background: #002395; }

/* Japan */
.modal-content[data-country='japan'] .modal-country-header { background: linear-gradient(135deg, #00205B 0%, #001336 100%); }
.modal-content[data-country='japan'] .corner-flag { border-color: #BC002D transparent transparent transparent; }
.modal-content[data-country='japan'] .modal-country-stripe { background: #BC002D; }
.modal-content[data-country='japan'] .modal-guidelines strong { color: #BC002D; }
.modal-content[data-country='japan'] .register-btn { background: linear-gradient(90deg, #00205B, #BC002D); }
.modal-content[data-country='japan']::-webkit-scrollbar-thumb { background: #00205B; }
