html {
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif;
}

body {
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #0a1a0a;
    color: #e0e0ff;
    background-image: 
        /* Círculos originales */
        radial-gradient(circle at 10% 20%, rgba(157, 78, 221, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(0, 243, 255, 0.1) 0%, transparent 25%),
        
        /* Nuevos círculos - arriba izquierda */
        radial-gradient(circle at 20% 40%, rgba(157, 78, 221, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 10% 30%, rgba(0, 243, 255, 0.08) 0%, transparent 30%);

    min-height: 100vh;
    overflow-x: hidden;
}

section {
    height: 100vh;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 7rem 10% 7rem;
}

.home {
    height: 100vh;
    background-image: url('assets/background-sections.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.home div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home div h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.login-container {
    background: rgba(15, 15, 15, 0.9);
    padding: 3rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0, 255, 100, 0.2);
    width: 350px;
    border: 1px solid rgba(0, 255, 100, 0.3);
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: #e0e0e0;
    font-weight: 500;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: rgba(25, 25, 25, 0.9);
    border: 1px solid rgba(0, 255, 100, 0.3);
    border-radius: 8px;
    color: #fff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 0.95rem;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: rgba(0, 255, 100, 0.8);
    box-shadow: 0 0 10px rgba(0, 255, 100, 0.4);
}

.btn {
    width: 100%;
    background: linear-gradient(90deg, #00cc66, #00ff88);
    color: #0a0a0a;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.btn:hover {
    background: linear-gradient(90deg, #00ff88, #00cc66);
    transform: translateY(-2px);
}

/* ACABAR INSTRUCCIONES */
.instructions {
    min-height: 100vh;
    /* background-image: url('assets/bg_instructions.png'); */
    /* background-size: cover; */
    /* background-position: center; */
    /* background-repeat: no-repeat; */
    width: 100vw;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    gap: 7rem;
    padding: 7rem 18% 7rem;
}

.inst-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #00ff88, #00cc66);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.inst-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #00ff88, #00cc66);
    border-radius: 2px;
}

.instructions-grid {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 2rem;
    margin-bottom: 3rem;
}

.instruction-card {
    background: rgba(16, 16, 36, 0.8);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 243, 255, 0.1);
}

.instruction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #00ff88, #00cc66);
}

.instruction-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 243, 255, 0.2);
    border-color: rgba(0, 243, 255, 0.3);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #00ff88;
    text-align: center;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00ff88;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-content {
    line-height: 1.6;
    color: #e0e0ff;
}

/* PUZZLE */
.puzzle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 30px;
    font-family: Arial, sans-serif;
    /* background-color: #f8f9fa; */
    min-height: 100vh;
}

.tab-grid {
    display: grid;
    grid-template-columns: repeat(3, 150px);
    grid-template-rows: repeat(3, 150px);
    gap: 3px;
    border: 3px solid #333;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    background-color: #333;
}

.clks {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.clks:hover {
    transform: scale(1.03);
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.clks:active {
    transform: scale(0.98);
}

.launch {
    width: fit-content;
    padding: 10px 25px;
}

.clks.empty {
    background-color: transparent;
    border: 2px dashed #999;
    cursor: default;
}

.clks.empty:hover {
    background-color: transparent;
    transform: none;
    border-color: #999;
    box-shadow: none;
}

.p11 { background-position: 0% 0%; }
.p12 { background-position: 50% 0%; }
.p13 { background-position: 100% 0%; }
.p21 { background-position: 0% 50%; }
.p22 { background-position: 50% 50%; }
.p23 { background-position: 100% 50%; }
.p31 { background-position: 0% 100%; }
.p32 { background-position: 50% 100%; }
.p33 { background-position: 100% 100%; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.clks {
    animation: slideIn 0.5s ease;
}
@media (max-width: 768px) {
    .tab-grid {
        grid-template-columns: repeat(3, 120px);
        grid-template-rows: repeat(3, 120px);
    }
    
    .clks {
        background-size: 360px 360px;
    }
}

@media (max-width: 480px) {
    .puzzle {
        gap: 20px;
        padding: 20px;
    }
    
    .tab-grid {
        grid-template-columns: repeat(3, 100px);
        grid-template-rows: repeat(3, 100px);
    }
    
    .clks {
        background-size: 300px 300px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .btn.launch {
        font-size: 18px;
        padding: 14px 28px;
    }
}

.clks {
    transition: all 0.3s ease;
}

.tab-grid.puzzle-solved .clks:not(.empty) {
    animation: celebrate 0.6s ease 3;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 15px gold; }
    100% { transform: scale(1); }
}

.clks.moving {
    animation: slide 0.3s ease;
}

@keyframes slide {
    0% { transform: translateX(0); }
    50% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

/* CRUCIGRAMA */
.crucigrama {
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.crucigrama-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.pistas {
    margin-top: -40px;
}

.pista-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.pista-card p {
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    padding: 10px 20px;
    height: 70px;
    width: auto;
    text-align: center;
    justify-content: center;
    margin-top: 20px;
    font-size: 20px;
}

.respuesta-card {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.respuesta-card input {
    width: 70px;
    height: 70px;
    aspect-ratio: 1;
    background: rgba(16, 36, 16, 0.9);
    border: 1px solid rgba(0, 255, 136, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    cursor: pointer;
    text-transform: uppercase;
    text-align: center;
    font-size: 24px;
}

.respuesta-card input:focus, .respuesta-card input:valid {
    background: rgba(0, 255, 136, 0.3);
    border-color: #00ff88;
}

.selectCruci {
    border: 1px solid white !important;
}

/* RCDE ONCE INICIAL SEVILLA 2006-07 */
.oncercde {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.por, .def, .cen, .del {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* ADIVINAR PAISES */
.paises {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 7rem 10% 7rem;
    height: fit-content;
}

.containerpaises {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    justify-content: center;
    align-items: center;
    width: 85%;
    /* gap: -2rem; */
}

.india, .canada, .letonia, .austria {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.india img, .canada img, .letonia img, .austria img, .india input, .canada input, .letonia input, .austria input {
    transform: scale(0.7);
}

.india input, .canada input, .letonia input, .austria input {
    width: 50%;
}

.austria img {
    margin-bottom: -2rem;
}