.jugamos {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-halogen);
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    max-width: 100%;
}

h1{
    color: var(--color-electron);   
    margin-bottom: 0.5rem;
}

.wordle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-color: var(--color-noble-gas);
    border-width: 2px;
}

.wordle-row {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.wordle-cell {
    width: 3rem;
    height: 3rem;
    border: 2px solid #ffffff;
    border-radius: 8px;
    background: transparent;
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    line-height: 1;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 0 0 3rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: popIn 0.3s ease-out;
    color: transparent;
    padding: 0.5rem 0;
    margin: 0.2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.05em;
}

.wordle-cell:not(:empty) {
    background: white;
    color: #2c3e50;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.wordle-cell.correct {
    background: #51c788;
    color: white;
    border-color: #39b171;
    transform: scale(1.1);
    animation: correctFlip 0.6s ease-out;
}

@keyframes correctFlip {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

.wordle-cell.present {
    background: #e8c742;
    color: #333;
    border-color: #e8c742;
    animation: presentFlip 0.6s ease-out;
}

@keyframes presentFlip {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

.wordle-cell.absent {
    background: #b9bbbd;
    color: white;
    border-color: #bfc2c4;
    animation: absentFlip 0.6s ease-out;
}

@keyframes absentFlip {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

/* Ajuste para el hover en celdas vacías */
.wordle-cell:hover {
    border-color: var(--color-halogen);
    box-shadow: 0 0 0 2px rgba(232, 199, 66, 0.2);
}

.wordle-input {
    font-size: 1.2rem;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    border: 2px solid #ccc;
    width: min(300px, 80%);
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: 'Times New Roman', Times, serif;
    letter-spacing: 1px;
    color: #2c3e50;
    margin-right: 0.8rem;
}

.wordle-input::placeholder {
    color: #95a5a6;
    font-style: italic;
    letter-spacing: normal;
}

.wordle-input:focus {
    outline: none;
    border-color: var(--color-halogen);
    box-shadow: 0 0 0 3px rgba(232, 199, 66, 0.2),
                inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wordle-input:hover {
    border-color: #999;
}

@keyframes pulseButton {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glowButton {
    0% { box-shadow: 0 0 5px rgba(135, 206, 235, 0.5); }
    50% { box-shadow: 0 0 20px rgba(135, 206, 235, 0.8); }
    100% { box-shadow: 0 0 5px rgba(135, 206, 235, 0.5); }
}

.wordle-btn {
    background: var(--color-noble-gas);
    color: #2c3e50;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulseButton 2s infinite ease-in-out, glowButton 2s infinite ease-in-out;
}

.wordle-btn:hover {
    background: #5fb3d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    animation: none;
}

.wordle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: none;
}

.wordle-btn:disabled {
    background: #bbb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    animation: none;
}

/* Contenedor para input y botón */
.wordle-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .wordle-input-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .wordle-input {
        width: 100%;
        margin-right: 0;
    }
    
    .wordle-btn {
        width: 100%;
    }

    .wordle-cell {
        width: 2.8rem;
        height: 2.8rem;
        font-size: 1.4rem;
        flex: 0 0 2.8rem;
        padding: 0.4rem 0;
        margin: 0.15rem 0;
    }
}

@media (max-width: 480px) {
    .wordle-cell {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.2rem;
        flex: 0 0 2.2rem;
        padding: 0.3rem 0;
        margin: 0.1rem 0;
        letter-spacing: 0.03em;
    }
    
    .wordle-row {
        gap: 0.3rem;
        max-width: 280px;
    }

    .wordle-input {
        font-size: 1rem;
        padding: 0.6rem 0.8rem;
    }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-game-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: bold;
    position: relative;
    padding-bottom: 0.5rem;
}

.modal-game-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--color-halogen);
    border-radius: 2px;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    width: min(90%, 500px);
    position: relative;
    animation: scaleIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-halogen);
    transition: all 0.3s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.modal-close:hover {
    color: var(--color-nonmetal);
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

#modal-message {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    animation: slideIn 0.3s ease;
}

.dino-celebration {
    margin-top: 2rem;
    animation: slideIn 0.5s ease;
}

.dino-gif {
    max-width: min(300px, 90%);
    border-radius: 12px;
    margin: 1rem auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.celebration-text {
    font-size: min(2.2rem, 8vw);
    color: var(--color-halogen);
    margin: 1rem 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: bounce 1s ease infinite;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .wordle-container {
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .wordle-input {
        font-size: 1.1rem;
        padding: 0.7rem 1rem;
        width: 100%;
        margin-right: 0;
    }
    
    .wordle-btn {
        width: 100%;
        font-size: 1.1rem;
        padding: 0.7rem 1rem;
        margin-top: 0.5rem;
    }

    .modal-game-title {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }

    /* Virtual keyboard styles */
    .virtual-keyboard {
        display: grid;
        grid-template-columns: repeat(10, 1fr);
        gap: 0.3rem;
        padding: 0.5rem;
        background: #f0f0f0;
        border-radius: 8px;
        margin-top: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .key {
        background: white;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 0.5rem;
        font-size: 1rem;
        text-align: center;
        cursor: pointer;
        user-select: none;
        transition: all 0.2s ease;
    }

    .key:active {
        background: #e0e0e0;
        transform: scale(0.95);
    }

    .key.correct {
        background: #51c788;
        color: white;
        border-color: #39b171;
    }

    .key.present {
        background: #e8c742;
        color: #333;
        border-color: #e8c742;
    }

    .key.absent {
        background: #b9bbbd;
        color: white;
        border-color: #bfc2c4;
    }

    .key.enter {
        grid-column: span 2;
        background: var(--color-nonmetal);
        color: white;
    }

    .key.backspace {
        grid-column: span 2;
        background: #ff6b6b;
        color: white;
    }

    /* Hide the tab in mobile menu */
    .carbon-nav ul li a.halogen-tab {
        display: none;
    }
}

@media (max-width: 480px) {

    h1{
        font-size: 2.5rem;
        margin: 2rem;
        text-align: center;
    }
    .wordle-cell {
        width: min(2.8rem, 18vw);
        height: min(2.8rem, 18vw);
        font-size: min(1.6rem, 9vw);
        flex: 0 0 2.8rem;
        padding: 0.4rem 0;
        margin: 0.15rem 0;
    }

    .virtual-keyboard {
        grid-template-columns: repeat(9, 1fr);
        gap: 0.2rem;
        padding: 0.3rem;
    }

    .key {
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .wordle-input {
        font-size: 1rem;
        padding: 0.6rem 0.8rem;
    }

    .wordle-board {
        padding: 0rem;
        margin: 0rem;
        width: 100vw;
        max-width: 100vw;
    }

   .container{
    padding: 0rem;
    margin: 0.5rem 0rem;
   }
}

.color-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: #333;
}

.legend-color {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-color.correct {
    background: #51c788;
    border-color: #39b171;
    color: white;
}

.legend-color.present {
    background: #e8c742;
    border-color: #e8c742;
    color: white;
}

.legend-color.absent {
    background: #b9bbbd;
    border-color: #bfc2c4;
    color: white;
}

.legend-btn {
    background: white;
    border: 2px solid var(--color-halogen);
    color: var(--color-electron);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-btn:hover {
    background: var(--color-electron);
    color: white;
}

.legend-btn i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .wordle-cell {
        width: min(3.5rem, 18vw);
        height: min(3.5rem, 18vw);
        font-size: min(2.2rem, 10vw);
    }

    .wordle-input {
        font-size: 1.4rem;
        padding: 0.8rem 1.2rem;
    }

    .wordle-btn {
        font-size: 1.4rem;
        padding: 0.8rem 1.5rem;
    }

    .legend-item {
        font-size: 1.2rem;
    }

    .legend-color {
        width: 2rem;
        height: 2rem;
    }
}

.rules-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.rule-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    transition: all 0.3s ease;
}

.rule-section:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.rule-section h4 {
    color: var(--color-halogen);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rule-section p {
    color: #2c3e50;
    line-height: 1.5;
    margin: 0;
}

.rule-section ol, .rule-section ul {
    margin: 0;
    padding-left: 1.5rem;
}

.rule-section li {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.rule-section li:last-child {
    margin-bottom: 0;
}

.color-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: #2c3e50;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.legend-color {
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.legend-color:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .rule-section {
        padding: 1rem;
    }

    .rule-section h4 {
        font-size: 1.1rem;
    }

    .rule-section p, .rule-section li {
        font-size: 0.95rem;
    }

    .legend-item {
        font-size: 0.95rem;
    }

    .legend-color {
        width: 1.8rem;
        height: 1.8rem;
    }
}

@media (max-width: 480px) {
    .rule-section {
        padding: 0.8rem;
    }

    .rule-section h4 {
        font-size: 1rem;
    }

    .rule-section p, .rule-section li {
        font-size: 0.9rem;
    }

    .legend-item {
        font-size: 0.9rem;
    }

    .legend-color {
        width: 1.6rem;
        height: 1.6rem;
    }
} 