/* ============================================================
   FONDO — USAR EL DEL INDEX (NO AÑADIR OTRO)
   ============================================================ */

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', Arial, sans-serif;
    background: #f4f4f4 !important; /* fondo uniforme */
}

/* ============================================================
   HEADER — AJUSTE PREMIUM
   ============================================================ */

header {
    background: linear-gradient(
        135deg,
        #000000 0%,
        #0a1a2f 35%,
        #cc0077 60%,   /* NEÓN MASCOALBA */
        #0078ff 100%
    );
    border-bottom: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 8px 25px rgba(204, 0, 119, 0.25); /* glow neón */
}

/* ============================================================
   MAIN — FONDO PLANO SIN DEGRADADO
   ============================================================ */

.morse-main {
    width: 100%;
    padding-top: 60px !important;
    padding-bottom: 40px !important;
    overflow: visible !important;
    box-sizing: border-box;
    background: #f4f4f4 !important; /* fondo plano definitivo */
    margin-top: 40px !important; /* separación para evitar efecto óptico */
}

/* ============================================================
   MORSE.CSS — TARJETA A ANCHO COMPLETO
   ============================================================ */

.morse-app {
    font-family: 'Roboto', sans-serif;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent !important;
    overflow-x: hidden;
}

/* CONTENEDOR GENERAL */
.morse-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
    padding-bottom: 20px !important;
    background: transparent !important;
    box-sizing: border-box;
}

/* TARJETA PRINCIPAL */
.morse-card {
    width: 100%;
    background: #ffffff !important;
    border-radius: 18px;
    padding: 50px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.25);
    transition: 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 0 !important;
}

.morse-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 55px rgba(0,0,0,0.35);
}

/* TÍTULOS */
.morse-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #0a2a43;
    letter-spacing: -1px;
}

.morse-subtitle {
    text-align: center;
    color: #5a6a7a;
    margin-bottom: 40px;
    font-size: 1.2rem;
}

/* GRID A DOS COLUMNAS */
.morse-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: transparent !important;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .morse-grid {
        grid-template-columns: 1fr;
    }
}

/* SUBTÍTULOS DE SECCIÓN */
.morse-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0a2a43;
}

/* TEXTAREAS */
.morse-textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid #dce3ee;
    font-size: 1.1rem;
    font-family: 'Roboto Mono', monospace;
    background: #f8faff;
    transition: 0.25s ease;
    box-sizing: border-box;
    color: #111;
}

.morse-textarea:focus {
    outline: none;
    border-color: #0078ff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0,120,255,0.18);
}

/* BOTONES */
.morse-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 18px 0;
}

.morse-btn {
    padding: 14px 26px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.25s ease;
}

/* PRIMARIO */
.morse-btn-primary {
    background: #0078ff;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,120,255,0.35);
}

.morse-btn-primary:hover {
    background: #005fcc;
    transform: translateY(-3px);
}

/* SECUNDARIO */
.morse-btn-secondary {
    background: #e8f0ff;
    color: #234;
}

.morse-btn-secondary:hover {
    background: #d8e6ff;
    transform: translateY(-3px);
}

/* GHOST */
.morse-btn-ghost {
    background: transparent;
    border: 2px solid #ccd4e0;
    color: #5a6a7a;
}

.morse-btn-ghost:hover {
    background: #f1f5fa;
    transform: translateY(-3px);
}

/* RESULTADO */
.morse-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.morse-pill {
    background: #e8f0ff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #345;
    font-weight: 700;
}

.morse-result-box {
    background: #f8faff;
    border: 2px solid #dce3ee;
    border-radius: 14px;
    padding: 20px;
    min-height: 180px;
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    white-space: pre-wrap;
    line-height: 1.6;
    transition: 0.25s ease;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
    color: #111;
}

.morse-result-box:hover {
    background: #fff;
}

/* NOTAS */
.morse-note {
    font-size: 0.95rem;
    color: #5a6a7a;
    margin-top: 10px;
}

.morse-ok { color: #22863a; }
.morse-error { color: #b31d28; }

/* ============================================================
   CONTADOR VISITAS
   ============================================================ */

.flip-counter {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #000;
    padding: 15px 25px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    margin: 40px auto 20px auto;
}

.flip-number {
    font-size: 2rem;
    font-weight: 800;
    color: #cc0077;
    animation: flip 0.6s ease;
    transform-origin: bottom;
}

.flip-label {
    margin-top: 8px;
    font-size: 1rem;
    color: #fff;
    opacity: 0.8;
    letter-spacing: 1px;
}

@keyframes flip {
    0% { transform: rotateX(90deg); opacity: 0; }
    100% { transform: rotateX(0deg); opacity: 1; }
}

/* ============================================================
   AJUSTE ADSENSE
   ============================================================ */

.adsense-placeholder {
    margin-top: 20px !important;
}

/* BOTÓN NEGRO PROFESIONAL */
.morse-btn-black {
    background: #000;                     /* negro elegante */
    color: #fff;
    padding: 14px 26px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.25s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35); /* sombra premium */
}

/* HOVER — ELEVACIÓN SUAVE */
.morse-btn-black:hover {
    background: #111;                     /* negro más suave */
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}

/* ACTIVE — EFECTO “PULSAR” GUAY */
.morse-btn-black:active {
    transform: translateY(1px) scale(0.97); /* efecto presión */
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    background: #0a0a0a;
}

/* Reducir espacio entre anuncio y traductor */
.adsense-placeholder {
    margin: 10px auto 20px auto !important;
    padding: 8px 0;
    font-size: 0.9rem;
    text-align: center;
    max-width: 728px; /* tamaño máximo de anuncio */
}

/* Reducir espacio superior del traductor */
.morse-main {
    margin-top: 0px !important;
    padding-top: 0px !important;
}

/* Eliminar espacio al final del traductor Morse */
.morse-main {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.morse-wrapper {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.morse-card {
    margin-bottom: 10px !important; /* un toque mínimo para que respire */
}

/* Ajustar el anuncio para que no empuje hacia abajo */
.adsense-placeholder {
    margin-bottom: 10px !important;
}
