* {
    box-sizing: border-box;
}

:root {
    --blue: #2563eb;
    --purple: #7c3aed;
    --lime: #a3e635;
    --dark: #08111f;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.72);
    --card-border: rgba(255, 255, 255, 0.18);
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
}

.site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 10% 15%, rgba(124, 58, 237, 0.55), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.35), transparent 30%),
        radial-gradient(circle at 82% 86%, rgba(163, 230, 53, 0.28), transparent 34%),
        linear-gradient(135deg, #080b18 0%, #111827 48%, #16231d 100%);
}

.site-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black, transparent 76%);
}

.topbar {
    width: 100%;
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(14, 24, 42, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand-logo {
    max-height: 54px;
    width: auto;
    display: block;
}

.support-link {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: 0.18s ease;
}

.support-link:hover {
    background: rgba(255, 255, 255, 0.20);
    transform: translateY(-1px);
}

.page {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 58px 20px 70px;
}

.hero {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 38px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1;
    letter-spacing: -2.5px;
    font-weight: 950;
    text-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.hero p {
    width: 100%;
    max-width: 650px;
    margin: 16px auto 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 17px;
    line-height: 1.55;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    padding: 24px 18px 20px;
    border-radius: 28px;
    text-decoration: none;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.07));
    border: 1px solid var(--card-border);
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.service-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    top: -80px;
    right: -70px;
    background: rgba(37, 99, 235, 0.55);
    filter: blur(34px);
    opacity: 0.55;
}

.service-logo-area {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-logo-area img {
    width: auto;
    max-width: 155px;
    max-height: 92px;
    object-fit: contain;
    display: block;
    border-radius: 18px;
}

.service-logo-area span {
    font-size: 28px;
    font-weight: 950;
    color: #ffffff;
}

.service-action {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.78);
}

.service-netflix .service-glow {
    background: rgba(229, 9, 20, 0.70);
}

.service-disney .service-glow {
    background: rgba(37, 99, 235, 0.70);
}

.service-amazon .service-glow {
    background: rgba(245, 158, 11, 0.65);
}

.service-max .service-glow {
    background: rgba(14, 165, 233, 0.70);
}

.service-universal .service-glow {
    background: rgba(250, 204, 21, 0.60);
}

.service-chatgpt .service-glow {
    background: rgba(16, 185, 129, 0.68);
}

.service-win-play .service-glow {
    background: rgba(139, 92, 246, 0.72);
}

.help-card {
    max-width: 620px;
    margin: 34px auto 0;
    padding: 16px 18px;
    border-radius: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
    font-size: 14px;
}

.empty-state {
    max-width: 560px;
    margin: 30px auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    border-radius: 18px;
    text-align: center;
}

@media (max-width: 960px) {
    .services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .topbar {
        padding: 12px 16px;
    }

    .brand-logo {
        max-height: 42px;
    }

    .support-link {
        padding: 9px 12px;
        font-size: 13px;
    }

    .page {
        padding: 40px 14px 54px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 15px;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .service-card {
        min-height: 148px;
        padding: 20px 12px 18px;
        border-radius: 22px;
    }

    .service-logo-area {
        height: 66px;
    }

    .service-logo-area img {
        max-width: 132px;
        max-height: 58px;
    }

    .service-action {
        margin-top: 14px;
    }
}

@media (max-width: 380px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.page-narrow {
    max-width: 620px;
}

.consult-card {
    width: 100%;
    padding: 28px;
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
}

.back-link {
    display: inline-flex;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.back-link:hover {
    color: #ffffff;
}

.selected-service {
    text-align: center;
    margin-bottom: 26px;
}

.selected-service img {
    max-width: 170px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 16px;
    border-radius: 18px;
}

.selected-service h1 {
    margin: 0;
    font-size: 38px;
    font-weight: 950;
    letter-spacing: -1.4px;
}

.selected-service p {
    margin: 10px auto 0;
    max-width: 440px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 15px;
    line-height: 1.5;
}

.consult-form {
    margin-top: 24px;
}

.consult-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.88);
}

.consult-form input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    outline: none;
    background: rgba(255, 255, 255, 0.94);
    color: #111827;
    font-size: 16px;
    font-weight: 700;
}

.consult-form input:focus {
    border-color: rgba(96, 165, 250, 0.95);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.24);
}

.consult-form button {
    width: 100%;
    height: 54px;
    margin-top: 16px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    font-size: 16px;
    font-weight: 950;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.consult-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.42);
}

.consult-help {
    margin-top: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
}

@media (max-width: 720px) {
    .consult-card {
        padding: 22px 16px;
        border-radius: 22px;
    }

    .selected-service h1 {
        font-size: 30px;
    }

    .selected-service img {
        max-width: 140px;
        max-height: 82px;
    }
}

.results-page {
    max-width: 900px;
}

.results-header {
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
}

.results-title-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.results-title-row img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 18px;
}

.results-title-row h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -1px;
}

.results-title-row p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.5;
}

.email-list {
    display: grid;
    gap: 14px;
}

.email-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
    text-decoration: none;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.15), rgba(255,255,255,0.075));
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.email-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.34);
}

.email-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    font-size: 24px;
}

.email-content h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.email-content p {
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.email-content span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    font-weight: 700;
}

.empty-results {
    padding: 30px;
    border-radius: 24px;
    text-align: center;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
}

.empty-results h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.empty-results p {
    margin: 0 auto 20px;
    max-width: 480px;
    color: rgba(255, 255, 255, 0.72);
}

.empty-results a {
    display: inline-flex;
    padding: 12px 18px;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 900;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

@media (max-width: 720px) {
    .results-title-row {
        display: block;
        text-align: center;
    }

    .results-title-row img {
        margin-bottom: 12px;
    }

    .results-title-row h1 {
        font-size: 28px;
    }

    .email-card {
        align-items: flex-start;
    }
}

.read-page {
    max-width: 980px;
}

.read-header {
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
}

.read-title-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.read-title-row img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 18px;
}

.read-title-row h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: -0.8px;
    line-height: 1.12;
}

.read-title-row p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.5;
}

.mail-viewer {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow-x: auto;
}

.mail-html {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.mail-html img {
    max-width: 100%;
    height: auto;
}

.mail-html table {
    max-width: 100%;
}

.mail-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

.read-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.read-actions a {
    display: inline-flex;
    padding: 12px 18px;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 900;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

@media (max-width: 720px) {
    .read-title-row {
        display: block;
        text-align: center;
    }

    .read-title-row img {
        margin-bottom: 12px;
    }

    .read-title-row h1 {
        font-size: 22px;
    }

    .mail-viewer {
        padding: 14px;
        border-radius: 18px;
    }
}

/* =========================================================
   FIX LECTURA CORREO - CONTRASTE TARJETA SUPERIOR
   ========================================================= */

.results-header h1,
.mail-header h1,
.read-header h1,
.email-header h1,
.mail-detail-header h1,
.message-header h1,
.results-title-row h1,
.mail-title h1 {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.results-header p,
.mail-header p,
.read-header p,
.email-header p,
.mail-detail-header p,
.message-header p,
.results-title-row p,
.mail-title p {
    color: rgba(255, 255, 255, 0.88) !important;
}

.results-header strong,
.mail-header strong,
.read-header strong,
.email-header strong,
.mail-detail-header strong,
.message-header strong,
.results-title-row strong,
.mail-title strong {
    color: #ffffff !important;
}

.results-header .back-link,
.mail-header .back-link,
.read-header .back-link,
.email-header .back-link,
.mail-detail-header .back-link,
.message-header .back-link {
    color: #ffffff !important;
    opacity: 0.95;
}

/* =========================================================
   FIX DEFINITIVO - TITULO SUPERIOR EN LEER.PHP
   Corrige asuntos oscuros como Amazon
   ========================================================= */

body main.page > section:first-of-type h1,
body main.page > section:first-of-type h2,
body main.page > section:first-of-type h3 {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55) !important;
}

body main.page > section:first-of-type p,
body main.page > section:first-of-type span,
body main.page > section:first-of-type div {
    color: rgba(255, 255, 255, 0.92) !important;
}

body main.page > section:first-of-type strong {
    color: #ffffff !important;
}

body main.page > section:first-of-type a {
    color: #ffffff !important;
}