/* ===== PALETA MIDNIGHT ===========================
   --bg-deep:      #080f1a   fondo base
   --bg-card:      #0f1d2e   cards principales
   --bg-input:     #060d16   inputs
   --bg-inset:     #0a1526   columnas internas
   --border-main:  #295a9c66 bordes cards
   --border-sub:   #295a9c44 bordes inputs / sub
   --accent-cyan:  #73cdff   títulos, etiquetas activas
   --accent-mid:   #398bbd   subtítulos, card-title
   --accent-navy:  #295a9c   botón principal base
   --accent-pink:  #f5bab4   calibración, peligro suave
   --accent-green: #a2de7a   resultados, CSV
   --text-primary: #c8dff0   texto principal
   --text-muted:   #4a6a8a   texto secundario / labels
   ================================================ */

/* ===== ACORDEÓN ===== */
.accordion-card {
    padding-bottom: 16px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    padding-bottom: 0;
    transition: opacity 0.15s;
}

.accordion-header:hover {
    opacity: 0.8;
}

.accordion-icon {
    font-size: 10px;
    color: #398bbd;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-icon.collapsed {
    transform: rotate(180deg);
}

.accordion-body {
    overflow: hidden;
    max-height: 3000px;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding-top 0.3s ease;
    opacity: 1;
    padding-top: 12px;
}

.accordion-body.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
}

/* ===== FUENTE ===== */
@font-face {
    font-family: 'Pokemon';
    src: url('../pokemon-frlg.woff2') format('woff2');
}

/* ===== RESET Y BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Pokemon', monospace;
    background: #080f1a;
    color: #c8dff0;
    min-height: 100vh;
}

/* ===== LAYOUT ===== */
.app {
    max-width: 960px;
    margin: auto;
    padding: 20px;
    padding-bottom: 60px;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    color: #73cdff;
    font-size: 20px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* ===== CARD ===== */
.card {
    background: #0f1d2e;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    border: 1px solid #295a9c55;
}

.card-title {
    color: #398bbd;
    font-size: 11px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.85;
}

/* ===== INPUTS ===== */
input:not([type="checkbox"]),
textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #295a9c44;
    background: #060d16;
    color: #c8dff0;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}

input:not([type="checkbox"]):focus,
textarea:focus {
    outline: 2px solid #398bbd;
    outline-offset: 1px;
    border-color: #398bbd;
}

/* ===== TOGGLE ===== */
.toggle-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 12px;
}

.label  { color: #4a6a8a; }
.active { color: #73cdff; }

/* toggle pequeño */
.switch-sm {
    position: relative;
    width: 34px;
    height: 18px;
    flex-shrink: 0;
}
.switch-sm input { display: none; }
.slider-sm {
    position: absolute;
    inset: 0;
    background: #1a3050;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid #295a9c55;
    transition: background 0.3s;
}
.slider-sm:before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    top: 2px;
    left: 2px;
    background: #73cdff;
    border-radius: 50%;
    transition: transform 0.3s;
}
.switch-sm input:checked + .slider-sm:before {
    transform: translateX(16px);
}

/* ===== TRACKER — INPUTS ===== */
.tracker-inputs {
    margin-bottom: 8px;
}

/* ===== BOTONES ===== */
.btn-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    white-space: nowrap;
}
button:hover  { opacity: 0.82; }
button:active { transform: scale(0.97); }

/* btn-add: gradiente navy→mid (botón principal) */
.btn-add {
    background: #060d16;
    color: #a2de7a;
    border: 1px solid #a2de7a88;
}

/* btn-clear: contorno translúcido */
.btn-clear {
    background: #060d16;
    color: #a2de7a;
    border: 1px solid #a2de7a88;
}

/* btn-csv: verde lima */
.btn-csv {
    background: #060d16;
    color: #a2de7a;
    border: 1px solid #a2de7a88;
}

/* btn-danger: contorno rosa */
.btn-danger {
    background: #060d16;
    color: #a2de7a;
    border: 1px solid #a2de7a88;
}

/* ===== META INFO ===== */
.session-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 10px;
    color: #4a6a8a;
    flex-wrap: wrap;
    gap: 4px;
}

/* ===== TABLA SESIÓN ===== */
.session-wrap {
    margin-top: 12px;
    overflow-x: auto;
    max-height: 420px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.session-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    white-space: nowrap;
    table-layout: auto;
}

.session-table thead th {
    color: #73cdff;
    font-weight: 600;
    padding: 5px 8px;
    border-bottom: 1px solid #295a9c55;
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
    background: #0f1d2e;
    z-index: 2;
}

.session-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #295a9c22;
    font-size: 11px;
    color: #c8dff0;
}

.session-table tbody tr:hover td {
    background: rgba(115, 205, 255, 0.04);
}

/* filas especiales */
.row-target td         { background: rgba(41, 90, 156, 0.15) !important; }
.row-target td.col-tag { color: #73cdff; font-size: 10px; }
.row-result td.col-tag { color: #4a6a8a; font-size: 10px; }

/* columnas de color */
.col-seed       { color: #4a6a8a !important; font-size: 10px !important; }
.col-pid        { color: #e8f4ff !important; }
.col-shiny-star { color: #f5bab4 !important; }
.col-shiny-sq   { color: #73cdff !important; }

/* botón eliminar fila */
.col-del       { text-align: center; cursor: pointer; color: #4a6a8a; font-size: 13px; }
.col-del:hover { color: #f5bab4; }

/* mensaje vacío */
.empty-msg {
    text-align: center;
    color: #1e3a5f;
    padding: 18px 0;
    font-size: 11px;
}

/* ===== POKÉMON ===== */
#pokeResults {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poke-forms-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex-shrink: 0;
    max-width: 100%;
}

.poke-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.poke-shiny-badge {
    font-size: 9px;
    color: #f5bab4;
    text-align: center;
    letter-spacing: 0.3px;
}

.poke-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(41, 90, 156, 0.08);
    border: 1px solid #295a9c44;
    border-radius: 10px;
    padding: 8px 12px;
    transition: transform 0.15s, border-color 0.15s;
    flex-wrap: wrap;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.poke-card:hover {
    transform: translateY(-2px);
    border-color: #398bbd88;
}

.poke-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    image-rendering: pixelated;
    flex-shrink: 0;
    transition: filter 0.2s;
}

.poke-img[data-shiny]:hover {
    filter: brightness(1.1);
}

.poke-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 80px;
}

.poke-name {
    font-size: 14px;
    color: #a2de7a;
}

.poke-num {
    font-size: 11px;
    color: #4a6a8a;
}

.poke-macros {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.btn-macro {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #a2de7a88;
    background: #060d16;
    color: #a2de7a;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    white-space: nowrap;
    width: auto;
}

.btn-macro:hover {
    opacity: 0.82;
}

.btn-macro.active {
    border-color: #a2de7a;
    background: rgba(162, 222, 122, 0.12);
    color: #a2de7a;
}

.macro-imgs-wrap {
    width: 100%;
    margin-top: 4px;
}

.macro-img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #295a9c44;
    margin-top: 6px;
}

/* ===== NATURALEZAS ===== */
#naturResults {
    margin-top: 10px;
}

.natur-card {
    background: rgba(41, 90, 156, 0.08);
    border: 1px solid #295a9c44;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: transform 0.15s, border-color 0.15s;
}

.natur-card:hover {
    transform: translateY(-2px);
    border-color: #398bbd88;
}

.natur-name {
    font-size: 14px;
    color: #a2de7a;
    margin-bottom: 4px;
}

.natur-row {
    font-size: 11px;
    color: #4a6a8a;
    line-height: 1.6;
}

.natur-empty {
    font-size: 11px;
    color: #1e3a5f;
    text-align: center;
    padding: 12px 0;
}

/* ===== CALIBRADOR ===== */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 4px;
}

.cal-col {
    background: rgba(41, 90, 156, 0.08);
    border: 1px solid #295a9c44;
    border-radius: 10px;
    padding: 10px 10px 12px;
}

.cal-col-title {
    font-size: 10px;
    color: #73cdff;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 6px;
    opacity: 0.85;
}

.cal-result {
    font-size: 13px;
    color: #a2de7a;
    text-align: center;
    min-height: 18px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    transition: opacity 0.15s;
}

.cal-result:hover {
    opacity: 0.7;
    text-decoration: underline dotted;
}

.cal-result-offset {
    font-size: 12px;
    color: #73cdff;
    text-align: center;
    min-height: 16px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #295a9c44;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.cal-result-offset:hover {
    opacity: 0.6;
    text-decoration: underline dotted;
}

.cal-fields {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.cal-unit-btn {
    flex-shrink: 0;
    margin-top: 4px;
}

.cal-unit-label {
    font-size: 9px;
    color: #4a6a8a;
    text-align: center;
    flex-shrink: 0;
    width: 34px;
    margin-left: -34px;
    margin-top: 22px;
}

.cal-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.cal-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cal-label {
    font-size: 9px;
    color: #4a6a8a;
    letter-spacing: 0.3px;
}

/* campo Calibración en rosa para distinguirlo */
.cal-input-calibracion {
    color: #f5bab4 !important;
}

.cal-input {
    width: 100% !important;
    padding: 5px 7px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
}

.meta-counters {
    display: flex;
    gap: 16px;
}

.col-calib {
    text-align: center;
    white-space: nowrap;
}

.calib-dot {
    color: #a2de7a;
    font-size: 11px;
    margin: 0 1px;
}

/* ===== SITE HEADER ===== */
.site-header {
    position: relative;
    width: 100%;
    min-height: 300px;
    overflow: hidden;
    border-bottom: 2px solid #295a9c88;
}

.site-header-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.site-header-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(6,13,22,0.55);
}

.header-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: pixelated;
}

.header-bg-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #295a9c;
    border: 2px dashed #295a9c44;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #060d16 0%, #0f1d2e 50%, #080f1a 100%);
}

.site-header-content {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 300px;
    background: rgba(6,13,22,0.55);
}

.header-logo-wrap {
    flex-shrink: 0;
}

.header-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px #295a9c88);
}

.header-logo-placeholder {
    width: 80px;
    height: 80px;
    border: 2px dashed #295a9c66;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #295a9c;
    text-align: center;
    padding: 4px;
}

.header-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.header-title {
    font-size: 26px;
    color: #73cdff;
    letter-spacing: 1px;
    text-shadow: 0 0 20px #295a9c, 0 0 40px #295a9c88;
}

.header-subtitle {
    font-size: 11px;
    color: #4a6a8a;
    letter-spacing: 2px;
}

/* ===== SITE FOOTER ===== */
.site-footer {
    background: #060d16;
    border-top: 2px solid #295a9c66;
    margin-top: 40px;
    padding: 32px 20px;
    position: relative;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Social links */
.footer-social {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #4a6a8a;
    font-size: 10px;
    letter-spacing: 0.5px;
    transition: color 0.2s, transform 0.15s;
}

.social-link:hover {
    color: #73cdff;
    transform: translateY(-3px);
}

.social-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

/* color por red */
.social-link[aria-label="Discord"]:hover  { color: #5865f2; }
.social-link[aria-label="YouTube"]:hover  { color: #ff0000; }
.social-link[aria-label="X (Twitter)"]:hover { color: #e2e8f0; }
.social-link[aria-label="TikTok"]:hover   { color: #69c9d0; }

/* Disclaimer */
.footer-disclaimer {
    text-align: center;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-disclaimer p {
    font-size: 10px;
    color: #2a4a6a;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

.footer-copy {
    font-size: 11px;
    color: #4a6a8a;
}

.footer-copy a {
    color: #398bbd;
    text-decoration: none;
}

.footer-copy a:hover {
    color: #73cdff;
}

/* ===== RESPONSIVE — MÓVIL ===== */
@media (max-width: 600px) {
    .app {
        padding: 12px;
        padding-bottom: 40px;
    }

    .header {
        font-size: 15px;
    }

    .card {
        padding: 12px;
    }

    .btn-row {
        flex-direction: column;
    }

    button {
        width: 100%;
        padding: 10px 14px;
        font-size: 12px;
    }

    .session-table thead th,
    .session-table td {
        font-size: 10px;
        padding: 4px 6px;
    }

    .session-wrap {
        max-height: 320px;
    }

    input:not([type="checkbox"]),
    textarea {
        font-size: 12px;
    }

    .cal-grid {
        grid-template-columns: 1fr;
    }

    .site-header-content {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding: 20px 12px;
        gap: 16px;
        background: rgba(6,13,22,0.65);
    }

    .header-title { font-size: 18px; }

    .footer-social { gap: 14px; }
}

/* ===== SITE HEADER ===== */
.site-header {
    position: relative;
    width: 100%;
    min-height: 300px;
    overflow: hidden;
    border-bottom: 2px solid #295a9c88;
}

.site-header-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.site-header-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(6,13,22,0.55);
}

.header-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: pixelated;
}

.site-header-content {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    min-height: 300px;
    background: none;
}

.header-title {
    font-size: 34px;
    color: #e8f4ff;
    letter-spacing: 1px;
    text-shadow: 0 2px 24px rgba(6,13,22,0.9);
}

.header-subtitle {
    font-size: 12px;
    color: #73cdff;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

/* herramienta.html usa header-title-wrap */
.header-title-wrap .header-title { font-size: 34px; color: #e8f4ff; letter-spacing: 1px; text-shadow: 0 2px 24px rgba(6,13,22,0.9); }
.header-title-wrap .header-subtitle { font-size: 12px; color: #73cdff; letter-spacing: 0.5px; opacity: 0.85; }

/* ===== SITE NAV ===== */
.site-nav {
    background: #060d16;
    border-bottom: 1px solid #295a9c44;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 0;
    overflow-x: hidden;
}

.site-nav a {
    display: block;
    padding: 14px 16px;
    font-size: 10px;
    color: #4a6a8a;
    text-decoration: none;
    letter-spacing: 0.5px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    font-family: 'Pokemon', monospace;
}

.site-nav a:hover,
.site-nav a.active {
    color: #73cdff;
    border-bottom-color: #73cdff;
}

/* ===== HERO (home.html) ===== */
.hero {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #080f1a;
    padding: 40px 20px;
}

.hero-img {
    max-width: 860px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #295a9c44;
    display: block;
}

/* ===== LINKS GRID (home.html) ===== */
.links-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 20px 64px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.link-card {
    background: #0f1d2e;
    border: 1px solid #295a9c55;
    border-radius: 12px;
    padding: 22px 18px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.15s, border-color 0.15s;
}

.link-card:hover {
    transform: translateY(-3px);
    border-color: #398bbd88;
}

.link-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(41,90,156,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 16px;
    color: #73cdff;
}

.link-card-title {
    font-size: 12px;
    color: #73cdff;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.link-card-desc {
    font-size: 10px;
    color: #4a6a8a;
    line-height: 1.7;
}

.link-card-arrow {
    display: inline-block;
    margin-top: 14px;
    font-size: 10px;
    color: #295a9c;
    transition: color 0.15s, transform 0.15s;
}

.link-card:hover .link-card-arrow {
    color: #73cdff;
    transform: translateX(3px);
}

/* ===== TENLINES IFRAME ===== */
.tenlines-wrap {
    flex: 1;
    width: 100%;
    background: #080f1a;
}

.tenlines-wrap iframe {
    display: block;
    width: 100%;
    height: calc(100vh - 300px - 53px);
    min-height: 600px;
    border: none;
}

/* ===== DITTO HOVER ===== */
.footer-ditto {
    position: absolute;
    left: 20px;
    bottom: 20px;
    width: 90px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    image-rendering: pixelated;
}

.footer-ditto.visible {
    opacity: 1;
}

/* ===== SOCIAL HOVER COLORS ===== */
.social-link[aria-label="Discord"]:hover  { color: #5865f2; }
.social-link[aria-label="YouTube"]:hover  { color: #ff4444; }
.social-link[aria-label="X"]:hover        { color: #e2e8f0; }
.social-link[aria-label="TikTok"]:hover   { color: #69c9d0; }
.social-link[aria-label="Ko-fi"]:hover    { color: #ff5e5b; }

/* ===== RESPONSIVE HOME/TENLINES ===== */
@media (max-width: 900px) {
    .links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .links-grid { grid-template-columns: 1fr; }
    .hero { padding: 20px 12px; }
    .tenlines-wrap iframe { height: 70vh; }
    .header-title { font-size: 22px; }
}
