:root {
    --color-bg-main: #1f1e1e;       
    --color-bg-card: #1a1a1a;       
    --color-primary-orange: #cf4d1e; 
    --color-text-white: #ffffff;    
    --color-text-gray: #aaaaaa;     
    --border-radius-btn: 16px;      
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg-main);
    color: var(--color-text-white);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 110px;
}

.app-container {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    padding-bottom: 120px;
}

.centered-layout {
    justify-content: center;
    text-align: center;
}

.counter-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 10px 0;
}

.margin-top-large {
    margin-top: 2rem;
}

.app-header {
    position: relative;
    text-align: center;
    width: 100%;
    margin-bottom: 2.5rem;
}

.header-top-row {
    display: block;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.tagline {
    color: var(--color-text-gray);
    font-size: 1.1rem;
}

.btn-menu-trigger {
    position: absolute;
    top: 5px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.tab-panel-card {
    background-color: #151515;
    border: 1px solid #2b2b2b;
    border-radius: 20px;
    padding: 18px;
    text-align: left;
}

.tab-panel-card h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.tab-panel-card p {
    color: #9b9b9b;
    margin-bottom: 16px;
}

.arena-actions {
    display: flex;
    gap: 10px;
}

.settings-price-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.settings-price-row label {
    color: #cf4d1e;
    font-weight: 700;
}

.settings-price-row input {
    width: 100%;
    background: #2c2c2e;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    outline: none;
}

.settings-price-row input:focus {
    border-color: #cf4d1e;
}

.amazon-ninja-box {
    margin-top: 18px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.amazon-ninja-box-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 2px;
}

.history-divider {
    height: 1px;
    width: 100%;
    background: #333;
    margin: 18px 0;
}

.amazon-ninja-item {
    text-decoration: none;
    background: #111111;
    border: 1px solid #313131;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amazon-ninja-item h3 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
}

.amazon-ninja-item p {
    color: #999999;
    font-size: 0.88rem;
    line-height: 1.4;
    margin: 0;
}

.amazon-ninja-item span {
    color: #cf4d1e;
    font-weight: 900;
    font-size: 0.9rem;
}

.ios-tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid #333;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    z-index: 9000;
}

.tab-btn {
    border: none;
    background: transparent;
    color: #777;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    min-width: 64px;
}

.tab-btn span {
    font-size: 1.2rem;
}

.tab-btn small {
    font-size: 0.72rem;
    font-weight: 700;
}

.tab-btn.active {
    color: #cf4d1e;
}

.btn-menu-trigger:active {
    transform: scale(0.95);
}

.btn-menu-trigger:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.sushi-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: #1c1c1e;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease;
}

.sushi-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.sushi-icon-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.3));
}

.sushi-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: 0.3px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #2c2c2e;
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-ctrl {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #3a3a3c;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn-ctrl:active {
    background: var(--color-primary-orange, #cf4d1e);
    transform: scale(0.92);
}

.number {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    min-width: 28px;
    text-align: center;
}

.card-totales {
    margin-top: 1rem;
    padding: 2.5rem 1.5rem;
    background-color: #121212;
    border: 2px solid var(--color-primary-orange);
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(207, 77, 30, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.label-totales {
    color: var(--color-text-gray);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.numero-gigante {
    font-size: 5rem;
    font-weight: 900;
    color: var(--color-text-white);
    line-height: 1;
    margin: 10px 0 20px 0;
    text-shadow: 4px 4px 0px rgba(207, 77, 30, 0.3); 
    font-variant-numeric: tabular-nums;
}

.profit-section {
    width: 100%;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profit-track {
    width: 100%;
    height: 8px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.profit-bar {
    height: 100%;
    width: 0%;
    background-color: var(--color-primary-orange);
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.4s ease;
}

.profit-text {
    font-size: 12px;
    color: #777;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

.profit-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.price-display {
    font-size: 0.9rem;
    color: #888;
    background-color: #222;
    padding: 6px 14px;
    border-radius: 8px;
}

#display-precio-buffet {
    cursor: pointer;
    text-decoration: underline dotted #cf4d1e;
    transition: all 0.2s ease;
}

#display-precio-buffet:hover {
    color: #cf4d1e !important;
    text-decoration: underline solid #cf4d1e;
}

.btn-settings-icon {
    background: none;
    border: 1px solid #333;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-settings-icon:hover {
    background-color: #333;
    transform: rotate(45deg);
    border-color: var(--color-primary-orange);
}

.btn-massive-save {
    width: 100%;
    padding: 18px;
    background-color: var(--color-primary-orange);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(207, 77, 30, 0.3);
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-massive-save:active {
    transform: scale(0.98);
}

.action-buttons-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.btn-secondary-action {
    background-color: #ffffff;
    color: #000000;
    border-radius: 12px;
    padding: 14px 12px;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-secondary-action:hover {
    background-color: #f0f0f0;
    transform: scale(1.02);
}

.btn-secondary-danger {
    background-color: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    grid-column: span 2; 
}

.btn-secondary-danger:hover {
    background-color: #e74c3c;
    color: #ffffff;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 9999 !important;
}

.modal-content {
    background-color: #1a1a1a;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    text-align: center;
    max-height: 85vh; /* Evita que el modal sea más alto que la pantalla */
    overflow-y: auto; /* Si el móvil es enano, permite hacer scroll dentro del modal */
    padding-bottom: 25px;
}

.affiliates-content {
    max-width: 430px;
    padding: 22px;
}

.affiliate-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.affiliate-product {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    background: #111111;
    border: 1px solid #2d2d2d;
    border-radius: 14px;
    padding: 10px;
}

.affiliate-product img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: #1e1e1e;
}

.affiliate-product-info {
    text-align: left;
}

.affiliate-product-info h3 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.affiliate-product-info p {
    color: #8d8d8d;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.affiliate-cta {
    display: inline-block;
    color: #ffffff;
    background: #232323;
    border: 1px solid #373737;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

.modal-content h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.modal-content p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.modal-content input[type="number"] {
    width: 100%;
    background: #2c2c2e;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 10px;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    outline: none;
}

.modal-content input[type="number"]:focus {
    border-color: #cf4d1e;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.close-x {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-overlay-bottom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.modal-overlay-bottom.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-bottom-content {
    background: #000000;
    width: 100%;
    max-height: 85vh;
    border-radius: 25px 25px 0 0;
    padding: 25px 20px 40px 20px;
    border-top: 1px solid #333;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -24px 80px rgba(0,0,0,0.9);
}

.modal-overlay-bottom.hidden .modal-bottom-content {
    transform: translateY(100%);
}

.history-list-container {
    overflow-y: auto;
    flex-grow: 1;
    margin-top: 15px;
    padding-right: 5px;
}

.menu-sheet-content {
    padding-bottom: 28px;
}

.sheet-drag-handle {
    width: 40px;
    height: 5px;
    border-radius: 5px;
    background: #3a3a3c;
    margin: 0 auto 14px auto;
}

.menu-sheet-header h2 {
    font-size: 1.4rem;
}

.menu-sheet-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

.menu-sheet-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 14px;
    text-align: left;
}

.menu-sheet-block h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.menu-sheet-block p {
    font-size: 0.88rem;
    font-weight: 500;
    color: #9a9a9a;
    margin-bottom: 12px;
}

.menu-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.social-performance .sheet-btn,
.buffet-config .sheet-btn {
    background: #2c2c2e;
    border-color: #3a3a3c;
}

.sheet-btn {
    width: 100%;
    border: 1px solid #2f2f2f;
    background: #2c2c2e;
    color: #f5f5f5;
    border-radius: 12px;
    padding: 13px 12px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sheet-btn:active {
    opacity: 0.6;
}

.sheet-btn.muted {
    color: #6c6c6c;
    border-color: #232323;
    background: #0a0a0a;
    cursor: not-allowed;
}

.btn-install-sheet {
    border-color: #cf4d1e;
    color: #ffffff;
    background: linear-gradient(180deg, #cf4d1e, #a83f1a);
    margin-top: 10px;
}

.control-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.control-arrow {
    color: #cf4d1e;
    font-weight: 900;
    font-size: 1rem;
    margin-left: 8px;
}

.history-affiliate-card {
    background: linear-gradient(145deg, #0d0d0d, #171717);
    border: 1px solid #2f2f2f;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.history-affiliate-card h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.history-affiliate-card p {
    font-size: 0.82rem;
    color: #8a8a8a;
}

.history-affiliate-link {
    align-self: flex-start;
    text-decoration: none;
    color: #ffffff;
    background: #1f1f1f;
    border: 1px solid #353535;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.history-card {
    background: #2a2a2a;
    border-left: 4px solid #4CAF50;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-card.negative {
    border-left-color: #F44336;
}

.history-card-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.history-breakdown {
    color: #888;
    font-size: 0.75rem;
    line-height: 1.3;
    margin-top: 2px;
}

.history-card-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
}

.config-toggles {
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    margin-bottom: 20px;
}

.config-toggles label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    color: #eee;
    font-size: 1rem;
    border-bottom: 1px solid #2a2a2a;
    cursor:pointer;
}

.config-toggles input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #444;
    border-radius: 12px;
    cursor: pointer;
    outline: none;
}

.config-toggles input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s, background-color 0.3s;
}

.config-toggles input[type="checkbox"]:checked {
    background-color: #cf4d1e;
}

.config-toggles input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

.btn-primary-action {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
    margin-top: 10px;
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid #b91c1c;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight:bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.btn-danger-outline:hover {
    background-color: #b91c1c;
    color: white;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.btn-primario {
    background: #cf4d1e;
    color: #fff;
}

.btn-secundario {
    background: #3a3a3c;
    color: #fff;
}

.btn-modal-cancel {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

.btn-modal-confirm {
    background-color: #b91c1c;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.3);
}

.toast {
    position: fixed;
    bottom: calc(100px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 99999;
    transition: opacity 0.3s;
    border: 1px solid #444;
    text-align: center;
    width: 90%; /* Se ajusta al ancho de la pantalla */
    max-width: 350px; /* Pero no se hace gigante en tablets */
    line-height: 1.4;
}

.hidden { display: none !important; opacity: 0; pointer-events: none; }

@keyframes slideUp {
    from { transform: translate(-50%, 100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.pwa-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.pwa-modal {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 24px;
    width: 85%;
    max-width: 340px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-overlay.hidden .pwa-modal {
    transform: scale(0.95);
}

.pwa-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pwa-icon-img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.pwa-text strong {
    color: #1d1d1f;
    display: block;
    margin-bottom: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.pwa-text p {
    color: #515154;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.3;
}

.pwa-actions {
    display: flex;
    gap: 12px;
}

.btn-toast-install {
    flex: 1;
    background: #007aff;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-toast-install:active {
    background: #005bb5;
    transform: scale(0.97);
}

.btn-toast-close {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #1d1d1f;
    width: 48px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.btn-toast-close:active {
    background: rgba(0, 0, 0, 0.1);
}

.mission-title {
    font-weight: 900;
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.session-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-direction: column;
}

.session-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-stat-label {
    color: #9a9a9a;
    font-weight: 700;
    font-size: 0.9rem;
}

.session-stat-value {
    color: #ffffff;
    font-weight: 900;
    font-size: 1.05rem;
}

.growth-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
    margin-bottom: 12px;
}

.growth-action {
    background: #2c2c2e;
    color: #ffffff;
    border: 1px solid #3a3a3c;
    border-radius: 14px;
    padding: 14px 12px;
    font-weight: 800;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.growth-action:active {
    opacity: 0.6;
}

.growth-action-install {
    background: linear-gradient(180deg, #cf4d1e, #a83f1a);
    border-color: rgba(207, 77, 30, 0.8);
}

.ninja-divider {
    height: 1px;
    width: 100%;
    background: #333;
    margin: 14px 0;
}

.ninja-subtitle {
    color: #888;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-style: italic;
}

.amazon-ninja-modal {
    margin-top: 0;
}



.seo-accordion {
    width: 100%;
    margin: 30px auto 10px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.seo-accordion details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.seo-accordion details[open] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(207, 77, 30, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.seo-accordion summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    font-weight: 600;
    color: #f1f1f1;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.seo-accordion summary::-webkit-details-marker,
.seo-accordion summary::marker {
    display: none;
    content: "";
}

.seo-accordion summary::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: rotate(45deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s;
}

.seo-accordion summary:hover::after {
    border-color: var(--color-primary-orange);
}

.seo-accordion details[open] summary::after {
    transform: rotate(225deg);
    border-color: var(--color-primary-orange);
}

.seo-accordion .seo-content {
    padding: 0 20px 20px 20px;
    color: #a0a0a5;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: fadeInDown 0.3s ease-out forwards;
}

.seo-accordion .seo-content strong {
    color: #dddddd;
    font-weight: 600;
}

.amazon-card {
    background-color: var(--color-bg-card);
    border: 1px solid #333;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.amazon-label {
    color: var(--color-text-gray); 
    font-size: 0.8rem; 
    font-weight: 800;
    letter-spacing: 2px; 
    text-transform: uppercase; 
    margin-bottom: 8px; 
    text-align: left;
}

.amazon-item {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    background-color: #121212; 
    padding: 16px; 
    border-radius: 12px;
    text-decoration: none; 
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.amazon-item:hover {
    border-color: var(--color-primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(207, 77, 30, 0.15);
}

.amazon-item-info { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    text-align: left; 
}

.amazon-item-title { 
    color: var(--color-text-white); 
    font-size: 1rem; 
    font-weight: 700; 
}

.amazon-item-desc { 
    color: #777; 
    font-size: 0.8rem; 
}

.amazon-item-arrow { 
    color: var(--color-primary-orange); 
    font-size: 1.2rem; 
    font-weight: bold; 
}

.app-footer {
    padding: 40px 20px 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 40px;
}

.footer-wrap {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.instagram-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: opacity 0.3s ease;
}

.instagram-brand svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.2;
}

.instagram-brand:hover {
    opacity: 0.7;
}

.kofi-link {
    text-decoration: none;
    color: #86868b;
    font-size: 0.9rem;
    font-weight: 400;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 500px;
    transition: all 0.3s ease;
}

.kofi-link:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.footer-legal-zone {
    text-align: center;
}

.footer-legal-zone a {
    color: #666666;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal-zone a:hover {
    color: #aaaaaa;
    text-decoration: underline;
}

.footer-legal-zone p {
    color: #58585c;
    margin-top: 1rem;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#share-card-container.hidden { 
    display: block; 
    position: fixed; 
    top: 0; 
    left: -9999px; 
    z-index: -1; 
}

#instagram-share-card {
    width: 1080px; 
    height: 1080px;
    background: radial-gradient(circle at 50% 0%, #3a1e05 0%, #0a0a0a 60%);
    color: #fff; 
    padding: 80px; 
    box-sizing: border-box;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    position: relative; 
    overflow: hidden;
}

.bg-pattern {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.03; background-image: radial-gradient(#fff 2px, transparent 2px);
    background-size: 40px 40px; z-index: 1;
}

.card-content { 
    z-index: 2; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    justify-content: space-between; 
}

.card-header { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 25px; 
}

.card-header img { 
    width: 100px; 
    height: 100px; 
    border-radius: 24px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.card-header h2 { 
    font-size: 4rem; 
    font-weight: 900; 
    margin: 0; 
    letter-spacing: -1px;
}

.card-heroes { 
    display: flex; 
    justify-content: space-between; 
    gap: 40px; 
    margin-top: 20px; 
}

.hero-box {
    background: rgba(255, 255, 255, 0.04); 
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    padding: 60px 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.hero-icon { 
    width: 140px; 
    height: auto; 
    margin-bottom: 30px; 
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
}

.hero-number { 
    font-size: 11rem; 
    font-weight: 900; 
    line-height: 1; 
    margin-bottom: 10px; 
    letter-spacing: -4px;
}

.hero-label { 
    font-size: 2.2rem; 
    color: #aaa; 
    text-transform: uppercase; 
    font-weight: 700;
    letter-spacing: 3px; 
}

.card-footer {
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.4); 
    padding: 40px 50px; 
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-left {
    display: flex;
    flex-direction: column;
}

.profit-title, .rank-title { 
    font-size: 1.6rem; 
    color: #888; 
    text-transform: uppercase; 
    font-weight: 700; 
    margin-bottom: 5px; 
    display: block; 
    letter-spacing: 2px;
}

.profit-value { 
    font-size: 5rem; 
    font-weight: 900; 
    color: #4CD964; 
    line-height: 1; 
}

.footer-right {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.rank-value { 
    font-size: 3rem; 
    font-weight: 800; 
    color: #E67E22; 
}

.watermark-url { 
    text-align: center; 
    margin-top: 25px; 
    font-size: 1.5rem; 
    color: #888; 
    letter-spacing: 1px;
    font-weight: 500;
}

.watermark-url strong {
    color: #fff;
    font-weight: 800;
}

.amazon-ninja-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.amazon-list-cell {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    background: #1c1c1e;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, background 0.2s ease;
}

.amazon-list-cell:active {
    transform: scale(0.98);
    background: #2c2c2e;
}

.cell-icon {
    font-size: 1.5rem;
}

.cell-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.cell-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.cell-desc {
    color: #888;
    font-size: 0.8rem;
}

.cell-chevron {
    color: var(--color-primary-orange);
    font-weight: 600;
    font-size: 1.5rem;
    margin-left: auto;
    padding-left: 10px;
}

@media (max-width: 400px) {
    .app-container { padding: 1.5rem 1rem; }
    .numero-gigante { font-size: 4rem; }
    .btn-secondary-action { font-size: 0.85rem; padding: 12px 8px; }
    h1 { font-size: 2.1rem; }
    .number { font-size: 1.8rem; }
    .sushi-card { padding: 1.2rem; }
    .controls { gap: 1rem; }
    .menu-row { flex-direction: column; }
}

@media (max-width: 350px) {
    h1 { font-size: 1.8rem; }
    .numero-gigante { font-size: 3.5rem; }
    .btn-ctrl { width: 45px; height: 45px; font-size: 1.5rem; }
    .sushi-icon-img { width: 60px; height: 60px; }
}

@media (height < 700px) {
    .app-header { margin-bottom: 1.5rem; }
    .margin-top-large { margin-top: 1rem; }
    .app-footer { margin-top: 30px; padding-top: 40px; }
}

@keyframes flashDopamina {
    0% { background-color: rgba(207, 77, 30, 0.8); transform: scale(1.02); }
    100% { background-color: rgba(0, 0, 0, 0.2); transform: scale(1); }
}

.jugador-actualizado {
    animation: flashDopamina 1s ease-out;
}

.jugador-fila {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.ios-tab-bar button svg {
    margin-bottom: 4px;
    color: #888;
    transition: color 0.2s ease, transform 0.2s ease;
}

.ios-tab-bar button.active svg {
    color: var(--color-primary-orange, #cf4d1e);
    transform: scale(1.1);
}

/* --- TARJETA DE INVITACIÓN --- */
.mesa-info-card {
    background: #1c1c1e;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px; 
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mesa-label {
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
}

.mesa-codigo {
    font-size: 3rem; 
    font-weight: 900;
    color: var(--color-primary-orange, #cf4d1e);
    line-height: 1;
    letter-spacing: 4px;
    margin-bottom: 5px;
    text-shadow: 0px 4px 10px rgba(207, 77, 30, 0.2);
}

.btn-share-mesa {
    background: #007aff; 
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform 0.1s ease, background 0.2s ease;
}

.btn-share-mesa:active {
    transform: scale(0.96);
    background: #005bb5;
}

/* --- TARJETA DE RANKING --- */
.ranking-card {
    background: #1c1c1e;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 200px; /* Un poco menos alto por defecto */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ranking-header {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.ranking-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- BOTÓN DE SALIDA --- */
.btn-leave-mesa {
    background: transparent;
    color: #666;
    border: none;
    padding: 10px;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    width: 100%;
    margin-top: 30px;
    transition: color 0.2s ease;
}

.btn-leave-mesa:hover {
    color: #ff3b30;
}

.beta-glass-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  opacity: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 9999;
  width: 90%;
  max-width: 400px;
  font-family: system-ui, -apple-system, sans-serif;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.beta-glass-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.beta-glass-banner.hiding {
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
  pointer-events: none;
}

.beta-content {
  flex: 1;
}

.beta-content p {
  margin: 0;
  font-size: 13px;
  color: #1d1d1f;
  line-height: 1.4;
}

.beta-content a {
  color: #007aff;
  text-decoration: none;
  font-weight: 600;
}

.beta-close {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1d1d1f;
  transition: transform 0.2s ease, background 0.2s ease;
}

.beta-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}
/* Ocultar la barra de scroll en los modales pero permitir deslizar */
.modal-content::-webkit-scrollbar {
    display: none;
}
.modal-content {
    -ms-overflow-style: none;  /* IE y Edge */
    scrollbar-width: none;  /* Firefox */
}