/* ==========================================================================
   PORTAL BIEM III - CING33
   Diseño PWA de Alta Calidad y Rendimiento
   ========================================================================== */

:root {
    --header-bg: #000000;
    --header-text: #FFFFFF;
    --gold-accent: #EAB308;
    --body-bg: #F0F4F8;
    --card-bg: #FFFFFF;
    --card-border: #0B1B36;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --primary-blue: #0070F3;
    --excel-green: #107C41;
    --excel-hover: #0E6837;
    --hover-bg: #F8FAFC;
    --shadow-soft: 0 10px 30px -5px rgba(11, 27, 54, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(11, 27, 54, 0.16);
    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   HEADER / BARRA SUPERIOR
   ========================================================================== */

.main-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    height: 76px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 100;
    position: relative;
}

.header-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand-container:hover {
    opacity: 0.94;
    transform: translateY(-1px);
}

.shield-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.shield-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.45));
}

.brand-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.brand-main {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #FFFFFF;
}

.brand-sub {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold-accent);
    letter-spacing: 0.8px;
}

/* Botón de instalación PWA */
.btn-install-pwa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.btn-install-pwa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

/* Navegación rápida dentro de la App */
.app-nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: none;
    color: #CBD5E1;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.nav-btn.active {
    background: var(--primary-blue);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 112, 243, 0.4);
}

.nav-divider {
    width: 1px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

.nav-btn-external {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94A3B8;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn-external:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

/* ==========================================================================
   MAIN CONTAINER & MENU VIEW
   ========================================================================== */

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}

.menu-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1.5rem 2rem 1.5rem;
    animation: fadeIn 0.35s ease-out forwards;
}

.menu-card-frame {
    background-color: var(--card-bg);
    border: 3px solid var(--card-border);
    border-radius: 60px;
    width: 100%;
    max-width: 1200px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5rem;
    transition: box-shadow 0.3s ease;
}

.menu-footer-credits {
    background: rgba(11, 27, 54, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 9px 28px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    margin-top: 13rem;
    margin-bottom: 2rem;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.menu-card-frame:hover {
    box-shadow: var(--shadow-hover);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.2rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}

.app-card:hover {
    transform: translateY(-8px) scale(1.03);
}

.icon-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.8rem;
    transition: transform 0.25s ease;
}

.app-icon-img {
    width: 85px;
    height: 85px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.app-card:hover .icon-wrapper {
    transform: scale(1.08);
}

.app-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* ==========================================================================
   VIEWER VIEW (IFRAMES EMBEBIDOS)
   ========================================================================== */

.viewer-view {
    width: 100%;
    height: calc(100vh - 76px);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.25s ease-out forwards;
}

.iframe-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #FFFFFF;
}

.app-iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    background-color: #FFFFFF;
}

.app-iframe.active {
    display: block;
}

/* ==========================================================================
   VISTA FORMULARIO HOJA DE RUTA
   ========================================================================== */

.hoja-ruta-view {
    width: 100%;
    max-width: 950px;
    margin: 2rem auto;
    padding: 0 1rem;
    animation: fadeIn 0.35s ease-out forwards;
}

.form-card-container {
    background-color: #FFFFFF;
    border-radius: 24px;
    border: 2px solid #E2E8F0;
    box-shadow: var(--shadow-soft);
    padding: 2.5rem 2rem;
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #F1F5F9;
}

.form-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-header-title h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--header-bg);
}

.form-subtitle {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-top: 4px;
}

/* BARRA DE SELECCIÓN RÁPIDA DE VEHÍCULO */
.quick-select-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #EFF6FF;
    border: 1.5px solid #BFDBFE;
    padding: 10px 16px;
    border-radius: 12px;
    margin-bottom: 1.2rem;
}

.quick-select-bar label {
    font-size: 0.88rem;
    font-weight: 800;
    color: #1E40AF;
    white-space: nowrap;
}

.quick-select-bar select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #93C5FD;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: #FFFFFF;
    color: #1E293B;
    cursor: pointer;
}

.form-section {
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.8rem;
    background-color: #F8FAFC;
}

.form-section legend {
    font-weight: 700;
    font-size: 1rem;
    color: var(--header-bg);
    padding: 0 10px;
}

.sub-legend {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 1rem 0 0.6rem 0;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}

.form-group input, .form-group textarea {
    padding: 10px 14px;
    border: 1.5px solid #CBD5E1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    background-color: #FFFFFF;
    color: var(--text-primary);
    text-transform: uppercase;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.15);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
}

.btn-send-email {
    background: linear-gradient(135deg, #1E40AF, #2563EB);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-send-email:hover {
    background: linear-gradient(135deg, #1D4ED8, #1E40AF);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-excel {
    background: linear-gradient(135deg, #107C41, #0E6837);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(16, 124, 65, 0.3);
}

/* AREA DE RENDERIZADO PDF OFICIAL */
.pdf-render-area {
    padding: 20px;
    background-color: #FFFFFF;
    font-family: var(--font-family);
    color: #000;
    text-transform: uppercase;
}

.pdf-header-table {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.pdf-brand-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdf-shield {
    height: 55px;
}

.pdf-title-cell {
    text-align: right;
}

.pdf-title-cell h2 {
    font-size: 1.4rem;
    margin: 0;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.pdf-table td {
    border: 1px solid #000;
    padding: 8px 10px;
    font-size: 0.88rem;
}

.table-section-title {
    background-color: #F1F5F9;
    text-align: center;
}

.pdf-footer-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.pdf-sig-box {
    text-align: right;
    border: 1px solid #000;
    padding: 15px;
    min-width: 200px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.99);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MÓVIL Y TABLET)
   ========================================================================== */

@media (max-width: 1050px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
    }
}

@media (max-width: 650px) {
    /* Header y Navegación Móvil */
    .main-header {
        height: auto;
        min-height: 62px;
        padding: 0.5rem 0.75rem;
    }

    .header-content {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .brand-container {
        gap: 8px;
        flex-shrink: 0;
    }

    .shield-img {
        height: 38px;
    }

    .brand-main {
        font-size: 1.05rem;
    }

    .brand-sub {
        font-size: 0.75rem;
    }

    .btn-install-pwa {
        padding: 5px 10px;
        font-size: 0.75rem;
        border-radius: 14px;
    }

    .app-nav-bar {
        gap: 4px;
        padding: 4px 6px;
        border-radius: 10px;
        max-width: calc(100vw - 120px);
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-shrink: 1;
    }

    .app-nav-bar::-webkit-scrollbar {
        display: none;
    }

    .nav-btn {
        padding: 5px 9px;
        font-size: 0.75rem;
        gap: 5px;
        flex-shrink: 0;
    }

    .nav-btn svg {
        width: 15px;
        height: 15px;
    }

    .nav-btn-external {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    /* Vista Menú Principal Móvil (2x2 Grid de 4 tarjetas) */
    .menu-view {
        padding: 1.25rem 0.75rem 1.25rem 0.75rem;
        min-height: auto;
        justify-content: flex-start;
    }

    .menu-card-frame {
        border-radius: 24px;
        padding: 1.25rem 0.75rem;
        border-width: 2px;
        margin-top: 4rem;
    }
    
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        max-width: 100%;
    }

    .app-card {
        padding: 0.85rem 0.4rem;
        border-radius: 16px;
    }

    .icon-wrapper {
        width: 54px;
        height: 54px;
        margin-bottom: 0.6rem;
    }

    .icon-wrapper svg {
        width: 48px;
        height: 48px;
    }

    .app-icon-img {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .app-title {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .menu-footer-credits {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.72rem;
        padding: 8px 18px;
        border-radius: 20px;
        margin-top: 11rem;
        margin-bottom: 2rem;
        max-width: 95%;
    }

    .credits-line-1, .credits-line-2 {
        white-space: nowrap;
    }

    .form-grid-2, .form-grid-3, .form-grid-4 {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   ADAPTACIÓN MÓVIL EN MODO HORIZONTAL (LANDSCAPE / PANTALLAS BAJAS)
   ========================================================================== */

@media (orientation: landscape) and (max-height: 580px), (max-height: 520px) {
    /* 1. Header super compacto */
    .main-header {
        height: 48px;
        min-height: 48px;
        padding: 0.25rem 1rem;
    }

    .brand-container {
        gap: 6px;
    }

    .shield-img {
        height: 32px;
    }

    .brand-main {
        font-size: 0.95rem;
    }

    .brand-sub {
        font-size: 0.7rem;
    }

    .btn-install-pwa {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .app-nav-bar {
        padding: 3px 6px;
        gap: 4px;
        max-width: calc(100vw - 110px);
    }

    .nav-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
        gap: 4px;
    }

    .nav-btn svg {
        width: 14px;
        height: 14px;
    }

    .nav-btn-external {
        width: 26px;
        height: 26px;
    }

    /* 2. Menú Principal adaptado a la altura reducida */
    .menu-view {
        padding: 0.5rem 1rem 0.5rem 1rem;
        min-height: auto;
        justify-content: center;
    }

    .menu-card-frame {
        margin-top: 0.4rem;
        padding: 0.75rem 1rem;
        border-radius: 20px;
        max-width: 96vw;
        border-width: 2px;
    }

    /* Las 4 tarjetas en 1 sola fila horizontal de 4 columnas */
    .apps-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
        max-width: 100%;
    }

    .app-card {
        padding: 0.5rem 0.3rem;
        border-radius: 12px;
    }

    .icon-wrapper {
        width: 44px;
        height: 44px;
        margin-bottom: 0.35rem;
    }

    .icon-wrapper svg {
        width: 40px;
        height: 40px;
    }

    .app-icon-img {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .app-title {
        font-size: 0.68rem;
        letter-spacing: 0.3px;
        line-height: 1.15;
    }

    /* Footer de créditos muy sutil y compacto */
    .menu-footer-credits {
        margin-top: 0.5rem;
        margin-bottom: 0.4rem;
        padding: 4px 14px;
        font-size: 0.65rem;
        border-radius: 14px;
    }

    /* 3. Visor de Iframes */
    .viewer-view {
        height: calc(100vh - 48px);
    }

    /* 4. Formulario Hoja de Ruta */
    .hoja-ruta-view {
        margin: 0.5rem auto;
        padding: 0 0.5rem;
    }

    .form-card-container {
        padding: 0.85rem 1rem;
        border-radius: 16px;
    }

    .form-header {
        margin-bottom: 0.8rem;
        padding-bottom: 0.5rem;
    }

    .form-header-title h2 {
        font-size: 1.05rem;
    }

    .form-subtitle {
        font-size: 0.75rem;
    }

    .form-section {
        padding: 0.75rem;
        margin-bottom: 0.8rem;
    }

    .form-section legend {
        font-size: 0.85rem;
    }

    .form-grid-2, .form-grid-3, .form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .form-group label {
        font-size: 0.72rem;
        margin-bottom: 0.2rem;
    }

    .form-group input, .form-group select, .form-group textarea {
        padding: 0.4rem 0.6rem;
        font-size: 0.78rem;
    }

    /* 5. Modal de Easter Egg en landscape */
    .easter-egg-modal {
        padding: 4px;
    }

    .easter-egg-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        border: none;
    }

    .easter-egg-header {
        padding: 6px 12px;
    }

    .easter-egg-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .easter-egg-name {
        font-size: 0.78rem;
    }

    .btn-easter-action, .btn-easter-close {
        padding: 4px 8px;
        font-size: 0.72rem;
    }
}

/* ESTILOS PARA SEGUNDO VEHÍCULO Y SEGUNDA HOJA DE RUTA */
.toggle-container {
    background-color: #F1F5F9;
    border: 2px dashed #CBD5E1;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
    transition: all 0.2s ease;
}

.toggle-container:hover {
    border-color: #3B82F6;
    background-color: #EFF6FF;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: #1E293B;
}

.toggle-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

.section-divider-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 12px;
    margin: 1.5rem 0 1.2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section-divider-title h3 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
}

.btn-copy-personal {
    background-color: #3B82F6;
    color: #FFFFFF;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-copy-personal:hover {
    background-color: #2563EB;
}

.form-section-v2 {
    border: 2px solid #E2E8F0;
    background-color: #FAFAFA;
}

.form-section-v2 legend {
    color: #0F172A;
}

/* ==========================================================================
   EASTER EGG RETRO ARCADE (ESCUDO UME)
   ========================================================================== */

.shield-logo {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shield-logo:active,
.shield-logo.shield-tap {
    transform: scale(0.90) rotate(-4deg);
}

.shield-logo.shield-tap-final {
    animation: shieldUnlock 0.5s ease;
}

@keyframes shieldUnlock {
    0% { transform: scale(1); filter: drop-shadow(0 0 0px #DC2626); }
    50% { transform: scale(1.25) rotate(8deg); filter: drop-shadow(0 0 16px #DC2626) drop-shadow(0 0 25px #FACC15); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0px transparent); }
}

/* MODAL RETRO FULLSCREEN */
.easter-egg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    animation: easterFadeIn 0.25s ease-out;
}

@keyframes easterFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.easter-egg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 6, 7, 0.92);
    backdrop-filter: blur(8px);
}

.easter-egg-container {
    position: relative;
    width: min(920px, 98vw);
    height: min(680px, 94vh);
    background: #080607;
    border: 3px solid #DC2626;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.5), 0 20px 50px rgba(0, 0, 0, 0.9);
}

.easter-egg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(90deg, #1A0B0B 0%, #2A0F0F 50%, #1A0B0B 100%);
    border-bottom: 2px solid #DC2626;
    gap: 12px;
}

.easter-egg-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.easter-egg-badge {
    background: #DC2626;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    text-transform: uppercase;
}

.easter-egg-name {
    color: #FACC15;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.4);
}

.easter-egg-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-easter-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid #475569;
    color: #E2E8F0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-easter-action:hover {
    background: #334155;
    color: #FFFFFF;
    border-color: #94A3B8;
}

.btn-easter-close {
    background: #DC2626;
    border: 1px solid #EF4444;
    color: #FFFFFF;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.4);
}

.btn-easter-close:hover {
    background: #B91C1C;
    transform: scale(1.05);
}

.easter-egg-body {
    flex: 1;
    position: relative;
    background: #000000;
    width: 100%;
    height: 100%;
}

.easter-egg-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@media (max-width: 768px), (orientation: landscape) and (max-height: 600px), (max-height: 520px) {
    .easter-egg-modal {
        padding: 0;
        background: #080607;
    }

    .easter-egg-container {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .easter-egg-header {
        padding: 4px 10px;
        min-height: 34px;
        height: 34px;
        border-bottom: 1px solid #dc2626;
        gap: 6px;
    }

    .easter-egg-badge {
        display: none;
    }

    .easter-egg-name {
        font-size: 0.75rem;
    }

    .easter-egg-actions {
        gap: 6px;
    }

    .btn-easter-action span {
        display: none;
    }

    .btn-easter-action {
        padding: 3px 8px;
        font-size: 0.72rem;
    }

    .btn-easter-close {
        padding: 3px 10px;
        font-size: 0.75rem;
    }

    .easter-egg-body {
        height: calc(100vh - 34px);
    }
}

