 body {
            min-height: 100vh;
            margin: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background: #f5f5f5;
            font-family: Arial, sans-serif;
        }
 
 .main-header {
        top: 0;
        left: 0;
        width: 100vw;
        min-height: 100px;
        background: #861e13;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        z-index: 1000;
    }
.main-header-text {
    color: #fff;
    font-family: Impact, Charcoal, 'Arial Black', sans-serif;
    font-size: 2.7em;
    font-style: italic;
    letter-spacing: 2px;
    text-align: center;
    width: 100%;
    user-select: none;
    margin-top: 18px;
    line-height: 1.1;
}

#sub-footer {
        width: 100vw;
        background: #f5f5f5;
        border-top: 1px solid #e0e0e0;
        left: 0;
        bottom: 0;
        z-index: 999;
    }
#sub-footer-core {
    max-width: 900px;
    margin: 0 auto;
    padding: 22px 16px 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85em;
}
.copyright {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.mispoliticas {
    margin-bottom: 6px;
}
.mispoliticas a {
    color: #555;
    font-size: 0.85em;
    text-decoration: underline;
    margin: 0 2px;
}
.mispoliticas a:hover {
    color: #2980b9;
}
.micopyright {
    color: #888;
    font-size: 0.85em;
}
@media (max-width: 600px) {
    #sub-footer-core { font-size: 0.85em; }
    .mispoliticas a, .micopyright { font-size: 0.85em; }
}

.info-msg {
    max-width: 600px;
    min-width: 320px;
    background: #f9f6e7;
    border: 1.5px solid #f1e1a6;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(44,62,80,0.12);
    padding: 32px 24px 24px 24px;
    margin: 60px auto 30px auto; /* separación de 3 líneas aprox */
    text-align: center;
    font-size: 1.08em;
    color: #333;
    font-weight: 500;
    display: block;
}
.info-msg .info-title {
    font-weight: bold;
    display: block;
    margin-bottom: 1.2em;
    font-size: 1.13em;
}
.info-msg .info-line {
    display: block;
    margin-bottom: 0.7em;
}
.info-msg a {
    color: #c0392b;
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.2s;
}
.info-msg a:hover {
    color: #2980b9;
    text-decoration: underline;
}

h1 {
            margin-bottom: 5px;
            color: #2c3e50;
            text-align: center;
            font-size: 1.9rem;
            letter-spacing: 1px;
        }

/* Estilos específicos para el juego de Morse */
#gameContainer {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* Selección de dificultad */
.difficulty-selection {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 30px;
}

.difficulty-selection h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2em;
}

.difficulty-selection p {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.game-mode-section {
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.game-mode-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    text-align: center;
    font-size: 1.3em;
}

.difficulty-options {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.alphabet-options .difficulty-card {
    width: 150px;
}

.alphabet-card {
    background: linear-gradient(135deg, #f8c471, #f5b041);
    color: #2c3e50;
    border: 2px solid #e67e22;
}

.alphabet-card h4,
.alphabet-card p,
.alphabet-card .difficulty-speed,
.alphabet-card .difficulty-example {
    color: #2c3e50;
}

.alphabet-card.selected {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-color: #d35400;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
    color: #2c3e50;
}

.alphabet-card.selected h4,
.alphabet-card.selected p,
.alphabet-card.selected .difficulty-speed,
.alphabet-card.selected .difficulty-example {
    color: #2c3e50;
}

.alphabet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.3);
    color: #2c3e50;
}

.alphabet-card:hover h4,
.alphabet-card:hover p,
.alphabet-card:hover .difficulty-speed,
.alphabet-card:hover .difficulty-example {
    color: #2c3e50;
}

.difficulty-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px 12px;
    width: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.difficulty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.difficulty-card.selected {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-color: #2980b9;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.difficulty-card h4 {
    margin: 0 0 6px 0;
    font-size: 1.0em;
    color: inherit;
    font-weight: bold;
}

.difficulty-card p {
    margin: 0 0 6px 0;
    font-size: 0.85em;
    color: inherit;
}

.difficulty-card.selected h4,
.difficulty-card.selected p {
    color: rgba(255,255,255,0.9);
}

.difficulty-speed {
    font-size: 0.75em;
    font-weight: bold;
    opacity: 0.8;
    display: block;
    margin-bottom: 8px;
}

.difficulty-example {
    font-size: 0.7em;
    font-style: italic;
    opacity: 0.7;
    display: block;
    margin-top: 5px;
}

.difficulty-card.selected .difficulty-example {
    opacity: 0.9;
}

#start-game-button {
    font-size: 1.3em;
    padding: 15px 40px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

#start-game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    gap: 20px;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #2c3e50;
    flex: 1;
    gap: 15px;
}

.difficulty-info {
    color: #3498db;
    font-size: 0.9em;
}

#new-game-button {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #95a5a6;
    background: transparent;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

#new-game-button:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.morse-game-container {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.word-display {
    text-align: center;
    margin-bottom: 30px;
}

.word-reveal {
    font-size: 1.5em;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 10px;
    min-height: 30px;
}

.morse-display {
    font-size: 1.3em;
    font-family: 'Courier New', monospace;
    color: #3498db;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    min-height: 20px;
    letter-spacing: 3px;
}

.game-controls {
    text-align: center;
}

#play-button {
    font-size: 1.2em;
    padding: 15px 30px;
    margin-bottom: 25px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

#play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

#play-button.playing {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    animation: pulse-playing 1.5s ease-in-out infinite;
}

#play-button.playing:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

@keyframes pulse-playing {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.input-section {
    margin-bottom: 25px;
}

.input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

#user-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    font-size: 1.1em;
    border: 2px solid #bdc3c7;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s ease;
    text-align: center;
}

#user-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

#check-button, #next-button {
    font-size: 1.1em;
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

#check-button:hover, #next-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.result-section {
    margin-top: 25px;
    text-align: center;
}

.result-message {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 15px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.game-end {
    text-align: center;
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.game-end h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.2em;
}

.game-end p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #34495e;
}

#restart-button {
    font-size: 1.2em;
    padding: 15px 40px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

#restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    #gameContainer {
        padding: 15px;
    }
    
    .difficulty-selection {
        padding: 25px 20px;
    }
    
    .difficulty-selection h2 {
        font-size: 1.6em;
    }
    
    .game-mode-section {
        margin-bottom: 30px;
        padding: 15px;
    }
    
    .game-mode-section h3 {
        font-size: 1.1em;
    }
    
    .difficulty-options {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .difficulty-card {
        width: 90%;
        max-width: 280px;
    }
    
    .alphabet-options .difficulty-card {
        width: 90%;
        max-width: 250px;
    }
    
    .morse-game-container {
        padding: 20px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .game-stats > div {
        font-size: 0.9em;
    }
    
    #new-game-button {
        align-self: center;
        font-size: 0.85em;
        padding: 6px 14px;
    }
    
    #play-button {
        font-size: 1em;
        padding: 12px 25px;
    }
    
    .word-reveal {
        font-size: 1.3em;
    }
    
    .morse-display {
        font-size: 1.1em;
        letter-spacing: 2px;
    }
    
    #user-input {
        font-size: 1em;
    }
    
    .main-header-text {
        font-size: 2.2em;
    }
}


