* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    background: #fff7d5;
    color: #e5e5e5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    transition: opacity 0.3s ease;
}

/* Selector de idioma */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 5px;
    z-index: 100;
}

.lang-select {
    padding: 8px 12px;
    background: rgba(42, 42, 62, 0.9);
    border: 1px solid #444;
    border-radius: 6px;
    color: #e5e5e5;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    outline: none;
}

.lang-select:hover {
    background: rgba(68, 68, 98, 0.9);
    border-color: #666;
}

.lang-select:focus {
    border-color: #00ff88;
    box-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

.lang-select option {
    background: #2a2a3e;
    color: #e5e5e5;
    padding: 8px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 40px;
}

.title {
    font-size: 5rem;
    font-weight: bold;
    color: #00ff88;
    color:#208380;
    /* text-shadow: 0 0 10px rgba(0, 255, 136, 0.3); */
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.subtitle {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.difficulty-selector {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
}

.difficulty-toggle {
    padding: 12px 20px;
    background: #2a2a3e;
    background: #E9B872;
    background: white; 
    border: 2px solid #444;
    border-radius: 8px;
    /* color: #e5e5e5; */
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.difficulty-toggle:hover {
    border-color: #666;
    transform: translateY(-1px);
}

.difficulty-toggle.active {
    background: #ff4444;
    background: #FF6B6B;
    /* color: #fff; */
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.difficulty-toggle.active:hover {
    background: #ff3333;
    background: #FF6B6B;
    border-color: #ff3333;
}

.difficulty-info {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    min-height: 20px;
    transition: all 0.3s ease;
}

.target-display {
    font-size: 1rem;
    color: #ffffff;
    color: #208380;
    /* margin-bottom: 20px; */
    font-weight: bold;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.grid {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.cell {
    width: 60px;
    height: 60px;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: #2a2a3e;
    background: #208380;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.cell.current-row {
    border-color: #666;
    background: #333;
    background: #175d5b;
    -webkit-tap-highlight-color: transparent;
}

.cell.current-row.active {
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.cell.current-row.active:hover {
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

/* Input invisible para activar teclado móvil */
.mobile-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 1px;
    height: 1px;
    border: none;
    background: transparent;
    color: transparent;
    outline: none;
}

.cell.correct {
    background: #00ff88;
    color: #000;
    border-color: #00ff88;
    animation: flip 0.6s ease-in-out;
}

.cell.present {
    background: #ffaa00;
    color: #000;
    border-color: #ffaa00;
    animation: flip 0.6s ease-in-out;
}

.cell.absent {
    background: #ff4444;
    color: #fff;
    border-color: #ff4444;
    animation: flip 0.6s ease-in-out;
}

@keyframes flip {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(-90deg); }
    100% { transform: rotateY(0); }
}

.hints-section {
    background: rgba(42, 42, 62, 0.5);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    min-height: 60px;
    width: 100%;
    max-width: 400px;
    display: none;
}

.hint-text {
    font-size: 0.9rem;
    color: #00ff88;
    text-align: center;
    min-height: 20px;
}

.hint-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.hint-btn {
    padding: 8px 16px;
    background: #444;
    border: 1px solid #666;
    border-radius: 6px;
    color: #e5e5e5;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.hint-btn:hover:not(:disabled) {
    background: #555;
    border-color: #888;
}

.hint-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.hint-btn.premium {
    background: #ffaa00;
    color: #000;
    border-color: #ffaa00;
}

.hint-btn.premium:hover:not(:disabled) {
    background: #ff9900;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

/* Pad numérico en 2 filas alineado con las celdas */
/* .number-pad {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 10px 0;
    max-width: 320px;
    justify-self: center;
    width: 100%;
    justify-items: center;
} */


.number-pad {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    margin: 10px 0;
    /* max-width: 380px; */
    justify-self: center;
    width: 100%;
    justify-items: center;
}

.backspace-btn {
    width: 60px;
    background: #444;
    background: #2a2a3e;
    background: #FF6B6B;
    border: 2px solid #666;
    border-radius: 8px;
    /* color: #e5e5e5; */
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-row: span 2; /* Ocupa las 2 filas */
    /* height: calc(128px + 8px);  */
}

.backspace-btn:hover:not(:disabled) {
    border-color: #ff8800;
    background: #FF6B6B;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.backspace-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.backspace-btn:disabled {
    background: #1a1a2e;
    color: #666;
    border-color: #333;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.number-btn {
    width: 60px;
    height: 60px;
    background: #2a2a3e;
    background: #E9B872;
    background: #fff;
    border: 2px solid #444;
    border-radius: 8px;
    /* color: #e5e5e5; */
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover:not(:disabled) {
    border-color: #00ff88;
    background: #333;
    background: #d19f59;
    background: #ffaa00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.number-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.number-btn:disabled {
    background: #1a1a2e;
    color: #666;
    border-color: #333;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn {
    padding: 12px 30px;
    font-size: 1rem;
    background: linear-gradient(45deg, #00ff88, #00cc6a);
    border: none;
    border-radius: 8px;
    color: #000;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.3);
}

.submit-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.clear-btn {
    padding: 12px 20px;
    background: #444;
    border: 1px solid #666;
    border-radius: 8px;
    color: #e5e5e5;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #555;
    border-color: #888;
}

.message {
    font-size: 0.8rem;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.message:empty {
    display: none;
}

.message.win {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    color: #00ff88;
    color:black;
}

.message.lose {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
}

.new-game-btn {
    /* padding: 10px 25px; */
    min-width: 240px;
    min-height: 40px;
    background: #444;
    background: #175d5b;
    border: 1px solid #666;
    border-radius: 8px;
    color: #e5e5e5;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.new-game-btn:hover {
    background: #555;
    border-color: #888;
}

.stats {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    display: flex;
    gap: 20px;
    align-items: center;
}

.legend {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #208380;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.correct { background: #00ff88; }
.legend-color.present { background: #ffaa00; }
.legend-color.absent { background: #ff4444; }

.input-instructions {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-bottom: 10px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-family: 'Courier New', monospace;
}

.modal-content {
    background: #2a2a3e;
    background: white;
    border: 2px solid #444;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 1.2rem;
    color: #00ff88;
    color:#208380;
    margin-bottom: 15px;
    font-weight: bold;
}

.modal-text {
    font-size: 0.9rem;
    color: #e5e5e5;
    color: #3e4d47;
    margin-bottom: 25px;
    line-height: 1.4;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-btn.confirm {
    /* background: #00ff88;
    color: #000; */
    background: #208380;
    color: white;
}

.modal-btn.confirm:hover {
    background: #00cc6a;
    transform: translateY(-2px);
}

.modal-btn.cancel {
    background: #444;
    color: #e5e5e5;
    border: 1px solid #666;
}

.modal-btn.cancel:hover {
    background: #555;
    border-color: #888;
}

/* Pie de página */
.footer {
    /* margin-top: 4rem; */
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(68, 68, 68, 0.3);
    width: 100%;
    max-width: 600px;
}

.footer-text {
    font-size: 0.75rem;
    color: #666;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
    margin: 0;
}


/* Efecto de confetis */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.8;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift, 0px)) rotate(720deg);
        opacity: 0;
    }
}

/* Diferentes formas de confeti */
.confetti.square {
    border-radius: 0;
    transform: rotate(45deg);
}

.confetti.triangle {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 10px solid;
    border-radius: 0;
}

.confetti.rectangle {
    width: 8px;
    height: 15px;
    border-radius: 2px;
}

.sigma-symbol {
    font-size: 1em; /* Mismo tamaño que el elemento padre */
    font-family: 'Courier New', monospace;
    font-weight: inherit;
    vertical-align: baseline;
    line-height: inherit;
    display: inline;
    /* Forzar métricas consistentes */
    font-variant-numeric: inherit;
    font-feature-settings: inherit;
    transform: none;
    /* Prevenir escalado en móviles */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}



/* === SIDEBAR Y DESAFÍOS DIARIOS === */

.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    /* background: white; */
    background: none;
    /* border: 2px solid #208380; */
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    z-index: 1002;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
}

.hamburger {
    width: 20px;
    height: 2px;
    background: #208380;
    transition: all 0.3s ease;
}

.sidebar.open .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sidebar.open .hamburger:nth-child(2) {
    opacity: 0;
}

.sidebar.open .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.sidebar-content {
    padding: 80px 20px 20px 20px;
    height: calc(100vh - 80px); /* Altura completa menos el padding top */
    display: flex;
    flex-direction: column;
}

.sidebar-spacer {
    flex-grow: 1; /* Ocupa todo el espacio disponible */
    min-height: 20px; /* Mínimo espacio */
}


.sidebar-title {
    color: #208380;
    font-size: 1.1rem;
    margin-bottom: 20px;
    /* text-align: center; */
    font-family: 'Courier New', monospace;
}

.calendar-section {
    margin-bottom: 20px;
}

.calendar-header {
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #208380;
    font-weight: bold;
    transition: background 0.3s ease;
}

.calendar-header:hover {
    background: #e8e8e8;
}

.calendar-arrow {
    transition: transform 0.3s ease;
}

.calendar-section.collapsed .calendar-arrow {
    transform: rotate(-90deg);
}

.calendar-content {
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.calendar-section.collapsed .calendar-content {
    max-height: 0;
    overflow: hidden;
}

.calendar-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s ease;
    color: #333;
    font-size: 0.9rem;
}

.calendar-date:hover {
    background: #f8f8f8;
}

.calendar-date.current {
    background: #e8f4f3;
    color: #208380;
    font-weight: bold;
}

.calendar-date.completed {
    background: #e8f5e8;
}

.date-status {
    display: flex;
    gap: 4px;
    align-items: center;
}

.difficulty-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: white;
    transition: all 0.3s ease;
}

.difficulty-status.started {
    background: #ffaa00; /* Naranja - iniciado pero no completado */
}

.difficulty-status.completed {
    background: #00ff88; /* Verde - completado correctamente */
}

.difficulty-status.completed::after {
    content: "✓";
}

.difficulty-status.failed {
    background: #ff4444; /* Rojo - completado incorrectamente */
}

.difficulty-status.failed::after {
    content: "✗";
}

.reset-btn {
    width: 100%;
    padding: 12px;
    background: #FF6B6B;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: background 0.3s ease;
}

.reset-btn:hover {
    background: #ff5252;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Fecha del desafío actual */
.daily-challenge-date {
    font-size: 1rem;
    color: #208380;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Navegación de fechas */
.date-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.nav-arrow {
    width: 40px;
    height: 40px;
    background: #208380;
    background: none;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    /* background: #175d5b; */
    transform: scale(1.1);
}

.nav-arrow:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.logo-container {
    text-align: center;
    margin-bottom: 10px;
}

.logo {
    height: 60px;
    width: auto; /* Mantiene las proporciones */
    max-width: 100%;
    object-fit: contain;
    /* Opcional: añadir un filtro de color si quieres que coincida con tu esquema */
    /* filter: brightness(1.1) contrast(1.1); */
    margin-top: -25px;
}

/* Botón de instrucciones */
.instructions-btn {
    width: 100%;
    padding: 12px;
    background: #208380;
    /* background: #6ed7dc; */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.instructions-btn:hover {
    background: #175d5b;
}

/* Modal de instrucciones */
/* .instructions-modal {
    max-width: 500px;
    text-align: left;
} */

.instructions-modal {
    max-width: 500px;
    text-align: left;
    max-height: 80vh; /* Máximo 80% de la altura de la pantalla */
    display: flex;
    flex-direction: column;
}

/* .instructions-text {
    text-align: left;
    line-height: 1.6;
} */

.instructions-text {
    text-align: left;
    line-height: 1.6;
    overflow-y: auto; /* Scroll vertical cuando sea necesario */
    max-height: calc(80vh - 120px); /* Altura máxima menos espacio para título y botones */
    padding-right: 10px; /* Espacio para la barra de scroll */
    margin-bottom: 20px;
}

.instruction-item {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.instruction-item strong {
    color: #208380;
}

.instructions-modal .modal-title {
    flex-shrink: 0; /* El título no se comprime */
}

.instructions-modal .modal-buttons {
    flex-shrink: 0; /* Los botones no se comprimen */
    margin-top: auto; /* Empuja los botones al fondo */
}

/* Estilo personalizado para la barra de scroll */
.instructions-text::-webkit-scrollbar {
    width: 6px;
}

.instructions-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.instructions-text::-webkit-scrollbar-thumb {
    background: #208380;
    border-radius: 3px;
}

.instructions-text::-webkit-scrollbar-thumb:hover {
    background: #175d5b;
}

.color-examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 10px;
    margin-top: 5px;
    
}

.color-example {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.color-example .legend-color {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.footer-contact {
    font-size: 0.75rem;
    color: #666;
    font-family: 'Courier New', monospace;
    margin: 5px 0 0 0;
}

.contact-link {
    color: #208380;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #175d5b;
    text-decoration: underline;
}

/* Botón de donación */
.donate-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #0070ba; /* Color PayPal */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.8rem;
    transition: background 0.3s ease;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    margin-top: 60px; 
    flex-shrink: 0; /* No se comprime */
}

.donate-btn:hover {
    background: #005ea6; /* PayPal hover */
    text-decoration: none;
    color: white;
}

.donate-btn:visited {
    color: white;
}

/* Modal de donación */
.donate-modal {
    max-width: 450px;
}

.donate-text {
    text-align: center;
    line-height: 1.6;
    margin-bottom: 25px;
}

.donate-confirm {
    background: #0070ba !important;
    color: white !important;
    text-decoration: none;
    display: inline-block;
}

.donate-confirm:hover {
    background: #005ea6 !important;
    color: white !important;
    text-decoration: none;
}

.donate-confirm:visited {
    color: white !important;
}


/* Banner de cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px 20px;
    z-index: 10000;
    display: flex;
    justify-content: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 600px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.cookie-accept {
    background: #208380;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.cookie-accept:hover {
    background: #175d5b;
}


/* Estilos para el ejemplo animado en el modal de instrucciones */
/* REEMPLAZAR toda la sección de estilos del ejemplo */

/* Estilos para el ejemplo animado en el modal de instrucciones */
.game-example {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    border: 2px solid #e9ecef;
}

.example-sum {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #208380;
    font-weight: bold;
}

.example-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.example-row {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.example-label {
    font-weight: bold;
    min-width: 80px;
    color: #495057;
    font-size: 0.9rem;
}

.example-cells {
    display: flex;
    gap: 8px;
}

.example-cell {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    background: white;
    background: #175d5b;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.example-cell.animate-flip {
    animation: flipToColor 1.2s ease forwards;
}

.example-cell.correct {
    background: #00ff88;
    color: #000;
    /* color: white; */
    border-color: #00ff88;
}

.example-cell.present {
    background: #ffaa00;
    color: #000;
    /* color: white; */
    border-color: #ffaa00;
}

.example-cell.absent {
    background: #ff4444;
    color: #fff;
    border-color: #ff4444;
}

@keyframes flipToColor {
    0% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
        background: white;
        background: #175d5b;
        border-color: #ddd;
        color: #333;
        color: white;
    }
    45% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
        background: white;
        background: #175d5b;
        border-color: #ddd;
        color: white;
    }
    50% {
        transform: scale(1.05) rotateY(-90deg);
        opacity: 0.8;
    }
    55% {
        transform: scale(1.05) rotateY(90deg);
        opacity: 0.8;
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

/* Asegurar que la animación se pueda reiniciar */
.example-cell.animate-flip {
    animation: flipToColor 1.2s ease forwards;
    animation-fill-mode: forwards;
}

.example-explanation {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.explanation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
}

.explanation-item .legend-color {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}


/* Mejorar el formato de texto con saltos de línea en instrucciones */
.instruction-item span[data-translate="instruction_3_text"] {
    white-space: pre-line;
    line-height: 1.6;
}


/* Modal de felicitaciones */
.congratulations-modal {
    max-width: 400px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px solid #208380;
    box-shadow: 0 15px 40px rgba(32, 131, 128, 0.2);
}

.congratulations-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: celebration 1s ease-in-out infinite alternate;
}

@keyframes celebration {
    0% {
        transform: scale(1) rotate(-5deg);
    }
    100% {
        transform: scale(1.1) rotate(5deg);
    }
}

.congratulations-modal .modal-title {
    font-size: 1.3rem;
    color: #208380;
    margin-bottom: 25px;
    font-weight: bold;
    line-height: 1.4;
}

.share-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: bold;
    min-width: 140px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: linear-gradient(135deg, #20c157 0%, #0e6b5f 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}


.share-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: bold;
    min-width: 140px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.share-btn span {
    white-space: nowrap;
}

.share-btn:hover {
    background: linear-gradient(135deg, #20c157 0%, #0e6b5f 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.share-btn:hover svg {
    transform: scale(1.1);
}

/* Botón compartir redondo en el juego */
/* Botón compartir estilo celda */
.round-share-btn {
    width: 60px;
    height: 60px;
    border: 2px solid #175d5b;
    border-radius: 8px;
    background: #208380;
    color: #fff;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    /* margin: 15px auto 0 auto; */
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    opacity: 0;
    transform: scale(0.8);
    animation: popInCell 0.6s ease forwards;
    animation-delay: 0.5s;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.round-share-btn:hover {
    border-color: #00ff88;
    background: #175d5b;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
}

.round-share-btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.round-share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.round-share-btn .share-text {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    text-align: center;
}

@keyframes popInCell {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Ajustes para móviles */
@media (max-width: 768px) {
   
}


/* Sección de inspiración Wordle */
.inspiration-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.inspiration-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #666;
    text-align: center;
}

.wordle-links {
    margin-top: 8px;
}

.wordle-links a {
    color: #208380;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.wordle-links a:hover {
    color: #175d5b;
    text-decoration: underline;
}

.wordle-links a:visited {
    color: #208380;
}





/*MENUS OCULTOS*/

.difficulty-info {
    display: none;
}

.stats {
    display: none;
}






@media (max-width: 768px) {
    .cell {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* .title {
        font-size: 4rem;
    } */

    .title {
        font-size: 4rem;
        /* Forzar fuente monospace estricta en móviles */
        font-family: 'Courier New', 'Courier', monospace;
        /* Prevenir zoom automático en iOS */
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        text-size-adjust: 100%;
        /* Forzar renderizado consistente */
        -webkit-font-feature-settings: "kern" off;
        -moz-font-feature-settings: "kern" off;
        font-feature-settings: "kern" off;
    }
    
    .sigma-symbol {
        /* Forzar exactamente el mismo tamaño en móviles */
        font-size: 4rem !important;
        transform: scale(1) !important;
        display: inline-block;
        width: auto;
        height: auto;
    }
    
    .difficulty-selector {
        gap: 8px;
    }
    
    .difficulty-btn {
        padding: 8px 12px;
        font-size: 0.7rem;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }

    /* .number-pad {
        max-width: 320px;
        gap: 6px;
    } */

    .number-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .backspace-btn {
        font-size: 1.2rem;
        /* height: calc(100px + 6px);  */
    }
    
    .backspace-spacer {
        width: 50px;
        height: 50px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .language-selector {
        top: 10px;
        right: 10px;
        gap: 3px;
    }

    .lang-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
    }

    .header {
        margin-top: 50px;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
    }

    .footer {
        padding: 15px 10px;
    }
    
    .footer-text {
        font-size: 0.7rem;
    }

    /*SIDEBAR Y DESAFÍOS*/

    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .sidebar-toggle {
        top: 15px;
        left: 15px;
        width: 35px;
        height: 35px;
    }
    
    .hamburger {
        width: 18px;
    }
    
    .sidebar-content {
        padding: 70px 15px 15px 15px;
    }
    
    .calendar-content {
        max-height: 300px;
    }
    
    .daily-challenge-date {
        font-size: 0.9rem;
    }
    
    .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .logo {
        height: 80px; /* Tamaño más pequeño en móviles */
        max-width: 280px;
    }

    .footer-contact {
        font-size: 0.7rem;
    }

    .cookie-content {
        flex-direction: column;
        gap: 10px;
    }
    .game-example {
        padding: 15px;
    }
    
    .example-row {
        gap: 10px;
    }
    
    .example-label {
        min-width: 70px;
        font-size: 0.8rem;
    }
    
    .example-cell {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .example-cells {
        gap: 6px;
    }
    
    .example-explanation {
        font-size: 0.8rem;
    }

     .congratulations-modal {
        max-width: 350px;
    }
    
    .congratulations-icon {
        font-size: 3rem;
    }
    
    .congratulations-modal .modal-title {
        font-size: 1.1rem;
    }

    .share-btn {
        min-width: 120px;
        gap: 6px;
    }
    
    .share-btn svg {
        height: 16px;
        width: 16px;
    }

     .round-share-btn {
        width: 45px;
        height: 45px;
    }
    
       
    .round-share-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .round-share-btn .share-text {
        font-size: 0.55rem;
        letter-spacing: 0.3px;
    }

     .inspiration-text {
        font-size: 0.8rem;
    }
    
    .inspiration-section {
        margin-top: 20px;
        padding-top: 15px;
    }
}