/* Shared Walls - (c) 2026 Velaria 
   License: See LICENSE.txt for modding and commercial terms.
*/


body {
    margin: 0;
    padding: 0;
    height: 100%;
}

/* PANTALLA */
#game-container {
    display: flex;
    width: 100vw;
    height: 100vh;

    overflow: hidden;
}

/* Zona principal */
#main-content {
    flex: 1;
    background-color: #1a1a1a;
    
    /* CONTROL DE SCROLL */
    height: 100vh;        /* Altura fija de la pantalla */
    overflow-y: auto;     /* Permite scroll vertical */
    overflow-x: hidden;
    
    /* FLUJO DE ELEMENTOS */
    display: flex;
    flex-direction: column; /* Alinea los hijos uno debajo del otro */
    align-items: center;    /* Los centra horizontalmente */
    gap: 20px;             /* Crea una separación automática entre bloques */
    padding: 20px 0;       /* Espacio arriba y abajo para que no toquen los bordes */
}
#story-container, #map-container {
    position: relative;     /* Asegura que sigan el flujo normal */
    flex-shrink: 0;         /* IMPORTANTE: Evita que se "aplasten" para caber */
    margin: 0 auto;         /* Centrado extra */
}
/* Barra izquierda */
#left-bar {
    width: 280px;
    background-color: #111;
    height: 100vh;
    overflow-y: auto;     /* ✅ scroll vertical */
    overflow-x: hidden;   /* ❌ sin scroll horizontal */
}

/* Nombre del juego en LEFT BAR */
#game-name {
    color: #fff;
    font-family: sans-serif;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    justify-content: center; /* centra horizontalmente */
    margin-top: 10px; /* minimargen arriba */
}


  /* Valor v al final de la página, abajo a la izquierda, sin fondo */
  #vDisplay {
    color: #666666; /* gris claro */
    font-family: monospace;
    font-size: 14px;
    padding: 4px 8px;
    background: transparent; /* fondo transparente */
  }
  
  /*TARJETA DEL PROTAGONISTA*/
#stats-card {
    background-color: #1c1c1c;
    color: #fff;
    font-family: sans-serif;
    margin: 20px 10px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}
#stats-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    text-align: center;
    color: #f5d76e; /* dorado suave */
}
.stat {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.stat:last-child {
    border-bottom: none;
}
.stat-name {
    font-weight: 500;
    color: #f0a1c2; /* rosa claro */
}
.stat-value {
    font-weight: bold;
}


/*DEVELOPER MEMORY BUTTON*/
#dev-reset-btn {
    position: fixed;       /* siempre visible */
    bottom: 20px;          /* a 20px del borde inferior */
    right: 20px;           /* a 20px del borde derecho */
    background-color: #e74c3c; /* rojo intenso */
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 1000;         /* por encima de todo */
    transition: background 0.2s;
}
#dev-reset-btn:hover {
    background-color: #c0392b; /* rojo más oscuro al pasar el mouse */
}

/*WOMAN CARDS*/
/* CONTENEDOR DE CHICAS */
#girls-container {
    margin: 10px;
}
/* TARJETA DE CHICA */
.girl-card {
    background-color: #1c1c1c;
    color: #fff;
    font-family: sans-serif;
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.08);
}
/* NOMBRE DE LA CHICA */
.girl-card h3 {
    margin: 0 0 8px 0;
    font-size: 17px;
    text-align: center;
    color: #f0a1c2; /* rosa claro */
}
/* reutilizamos .stat, .stat-name, .stat-value */
/* PORTADA DE CHICA */
/* LAYOUT INTERNO DE LA TARJETA */
.girl-inner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* RETRATO VERTICAL */
.girl-portrait {
    width: 80px;
    height: 120px;       /* ~ ratio 500x768 */
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
}

.girl-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* recorte elegante */
    display: block;
}

/* INFO DERECHA */
.girl-info {
    flex: 1;
}

/* AJUSTE DEL NOMBRE */
.girl-info h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    text-align: center;
    color: #f0a1c2;
}

/*----------------------------------------------------------------------------------------------------------------------------*/
/* CONTENEDOR DE TEXTO DE HISTORIA */
/* CONTENEDOR DE TEXTO DE HISTORIA */
#story-container {
    width: 95%;
    max-width: 900px;
    min-width: 300px;
    /* Cambiamos height fijo por min-height para que crezca si es necesario */
    min-height: 220px; 
    max-height: 90vh; /* Evita que la caja sea más alta que la pantalla */
    margin: 20px auto;
    padding: 15px; /* Un poco más de aire */
    background-color: #1c1c1c;
    color: #fff;
    font-family: sans-serif;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    position: relative;
    /* Eliminamos overflow: hidden para que el botón no se corte */
}

/* Contenedor de texto con scroll si excede la altura */
#story-text {
    font-size: 18px;
    line-height: 1.6;
    white-space: pre-line;
    max-height: 250px; /* Ajusta esto según prefieras */
    overflow-y: auto;  /* Si el texto es muy largo, sale scroll aquí, no en toda la caja */
    padding-right: 10px;
}

/* Botón centrado */
#story-next-btn {
    align-self: center; /* Centra el botón */
    margin-top: 10px;
    margin-bottom: 15px; /* Espacio para que no lo tape el resize-handle */
    padding: 8px 20px;
    font-size: 16px;
    background-color: #f5d76e;
    color: #000; /* Texto oscuro para mejor contraste con dorado */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10; /* Por encima del handle */
}
#story-next-btn:hover {
    background-color: #e0c75f;
}
/* Handle de redimensionar */
#resize-handle {
    width: 100%;
    height: 8px;
    background: #333;
    cursor: ns-resize;
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 0 0 8px 8px;
}


/*SPEAKER IN-BOX*/
/* SPEAKER IN-BOX */
#speaker-box {
    display: flex;
    align-items: flex-start; 
    justify-content: center; /* Asegura el centrado de los elementos internos */
    gap: 16px;
    margin-bottom: 10px;
    flex: 1;
}

#speaker-portrait {
    width: 130px;
    height: 190px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #f0a1c2; /* Rosa para que combine con el tema */
    display: none; /* Por defecto oculto para que no parpadee el icono de roto al cargar */
}

#speaker-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
    min-width: 0; /* Evita que el texto rompa el layout */
}

#speaker-name {
    font-weight: bold;
    font-size: 22px;
    margin-bottom: 8px;
}

#story-text {
    font-size: 17px;
    line-height: 1.6;
    white-space: pre-line;
    text-align: center;
}





/* Estilos específicos para la tarjeta de Patreon */
.patreon-card {
    transition: background-color 0.5s ease;
    cursor: pointer;
    padding: 5px;           /* Padding muy pequeño */
    width: fit-content;    /* La tarjeta solo ocupa el tamaño de la imagen */
    margin-left: 10px;      /* Pegado al lado izquierdo (con un pequeño margen de seguridad) */
    display: block;
}

.patreon-card:hover {
    background-color: #373737; 
}

.patreon-logo {
    width: 120px;           /* Controlamos el tamaño exacto aquí */
    height: auto;           /* Mantiene la proporción */
    transition: transform 0.3s ease;
    display: block;         /* Elimina espacios fantasma debajo de la imagen */
}

.patreon-card:hover .patreon-logo {
    transform: scale(1.1);  /* Un aumento más controlado para que no se salga del borde */
    filter: brightness(1.2);
}



/*MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP MAP*/
#map-container {
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(240, 161, 194, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    width: 95%;
    max-width: 800px;
    color: white;
    font-family: 'Verdana', sans-serif;
}
#map-header {
    border-bottom: 1px solid #f0a1c2;
    margin-bottom: 12px;
    padding-bottom: 5px;
    font-size: 0.9em;
    color: #f5d76e;
}
#map-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas */
    gap: 10px;
}
.map-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 15px 5px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8em;
    transition: all 0.3s;
    text-transform: uppercase;
}
.map-btn:hover {
    background: rgba(240, 161, 194, 0.2);
    color: white;
    border-color: #f0a1c2;
}
.map-btn.active {
    background: #f0a1c2;
    color: black;
    font-weight: bold;
}
/* Estado bloqueado visualmente */
.map-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
}





/*BOTON DE VER LA TELE*/
/* Estilo base igual al de dormir, pero con color diferente */
.tv-btn {
    background-color: #1f4167; /* Un azul suave */
    border: 1px solid #2d669f;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
}

.tv-btn:hover {
    background-color: #357abd;
}

.maya-btn {
    background-color: #280879; /* Un morado suave */
    border: 1px solid #5512ff;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;

    margin-top: 0.1em;
}

.maya-btn:hover {
    background-color: #5b0e5d;
}

.work-btn {
    background-color: #004949; /* Un morado suave */
    border: 1px solid #00b4ae;
    color: rgb(255, 255, 255);
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;

    margin-top: 0.1em;
}

.work-btn:hover {
    background-color: #009c56;
}


.pc-btn {
    background-color: #5534a1; /* Púrpura vibrante */
    border: 1px solid #00b4ae;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2); /* Un poco de profundidad */
    transition: background 0.3s;
}

.pc-btn:hover {
    background-color: #4069b5;
    box-shadow: 0 6px 8px rgba(0,0,0,0.3);
}



/* ESTILO BOTÓN TUTORIAL */
#tutorial-btn {
    background-color: #1c1c1c;
    border: 1px solid rgba(240, 161, 194, 0.4);
    border-radius: 8px;
    margin: 15px 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
/* Efecto Hover */
#tutorial-btn:hover {
    background-color: rgba(240, 161, 194, 0.15);
    border-color: #f0a1c2;
    box-shadow: 0 0 12px rgba(240, 161, 194, 0.2);
    transform: translateY(-2px); /* Pequeño salto hacia arriba */
}
/* Texto principal del botón */
.tut-main-text {
    color: #f0a1c2;
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}
/* Subtexto descriptivo */
.tut-sub-text {
    color: #888;
    font-size: 0.75rem;
    font-style: italic;
}















/* Botón de Guardado con gama Violeta */
#save-menu-btn {
    background-color: #1a1a1a;
    border: 1px solid rgba(167, 139, 250, 0.4);
    border-radius: 8px;
    margin: 15px 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#save-menu-btn:hover {
    background-color: rgba(167, 139, 250, 0.15);
    border-color: #a78bfa;
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.2);
    transform: translateY(-2px);
}

/* Efecto de fondo al abrir menú */
.dimmed {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Estilo de los Slots dentro del menú */
.save-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(240, 161, 194, 0.05);
    border: 1px solid rgba(240, 161, 194, 0.2);
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 8px;
}

.slot-actions {
    display: flex;
    gap: 8px;
}

.slot-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.btn-save { background: #4ade80; color: #064e3b; }
.btn-load { background: #f0a1c2; color: #1a1a1a; }
.btn-delete { background: #ef4444; color: white; }



















/* Indicador de dinero flotante - No afecta a la lógica */
.cash-floating-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: bold;
    pointer-events: none; /* Para que no bloquee clics */
    z-index: 10001; /* Por encima de todo */
    animation: floatUpFade 2.5s ease-out forwards;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

@keyframes floatUpFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
    20% { opacity: 1; transform: translate(-50%, -80%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -180%) scale(1); }
}


.affinity-floating-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 10001;
    animation: floatUpFade 2.5s ease-out forwards;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}














.completion-banner {
    display: none; /* Se activa por JS */
    position: fixed;
    
    /* Centrado horizontal en la parte superior */
    top: 20px; 
    left: 50%;
    transform: translateX(-50%);
    
    /* Tamaño compacto */
    width: auto;
    min-width: 200px;
    max-width: 400px;
    padding: 12px 20px;
    
    /* Estética Rojo Suave */
    background-color: #ffb0b7; /* Rojo pastel/rosado suave */
    color: #721c24;            /* Texto granate oscuro para lectura clara */
    border: 1px solid #f5c6cb; /* Borde sutil */
    border-radius: 8px;        /* Bordes suavemente redondeados */
    
    /* Otros detalles */
    text-align: center;
    font-size: 0.9em;
    font-weight: 600;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    pointer-events: none; /* Opcional: permite hacer clic a través del div si estorba */
}








.city-map-btn {
    background-color: #1a3a2a;
    border: 1px solid #4ade80;
    color: #4ade80;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
    margin-top: 0.1em;
}
.city-map-btn:hover { background-color: #2d6a4f; }

.city-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.city-location:hover { transform: scale(1.1); }

.city-loc-img {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f0a1c2;
    box-shadow: 0 0 16px rgba(0,0,0,0.9);
    transition: box-shadow 0.2s;
}
.city-location:hover .city-loc-img {
    box-shadow: 0 0 24px rgba(240,161,194,0.7);
    border-color: #f5d76e;
}
.city-loc-label {
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 6px;
    text-shadow: 1px 1px 4px black;
    text-align: center;
    white-space: nowrap;
}















/*BLACKJACK GAME*/
/* ── BLACKJACK INLINE STYLES ── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Oswald:wght@300;400;600&display=swap');

@keyframes bjDealCard {
    from { transform: translateY(-40px) scale(0.7) rotate(-8deg); opacity: 0; }
    to   { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes bjResultPop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.bj-score-badge {
    font-family: 'Oswald', sans-serif; font-size: 0.85rem; font-weight: 600;
    background: rgba(0,0,0,0.6); border: 1px solid #8a6820;
    color: #f5d76e; border-radius: 12px; padding: 3px 12px;
    min-width: 40px; text-align: center; transition: all 0.3s;
    display: inline-block;
}
.bj-score-badge.bj-bust     { border-color: #c0392b; color: #ff6b6b; }
.bj-score-badge.bj-blackjack{ border-color: #f5d76e; color: #f5d76e; box-shadow: 0 0 10px rgba(245,215,110,0.5); }

/* Cards */
.bj-card {
    width: 66px; height: 98px; border-radius: 7px; position: relative;
    flex-shrink: 0;
    animation: bjDealCard 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.bj-card-face {
    width: 100%; height: 100%;
    background: #f5ecd7; border-radius: 7px;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.7), inset 0 0 0 2px rgba(0,0,0,0.08);
    display: flex; flex-direction: column; justify-content: space-between; padding: 4px 5px;
    border: 1.5px solid #d4c4a0;
}
.bj-card-corner { line-height: 1; }
.bj-card-rank   { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 0.95rem; }
.bj-card-suit   { font-size: 0.7rem; }
.bj-card-center { font-size: 1.7rem; text-align: center; }
.bj-card-corner.bj-bottom { transform: rotate(180deg); }
.bj-card.bj-red   .bj-card-rank,
.bj-card.bj-red   .bj-card-suit,
.bj-card.bj-red   .bj-card-center { color: #c0392b; }
.bj-card.bj-black .bj-card-rank,
.bj-card.bj-black .bj-card-suit,
.bj-card.bj-black .bj-card-center { color: #1a1a1a; }

.bj-card-back {
    width: 100%; height: 100%; border-radius: 7px;
    background: #1a237e; box-shadow: 2px 3px 10px rgba(0,0,0,0.7);
    border: 3px solid #f5ecd7; overflow: hidden; position: relative;
}
.bj-card-back::before {
    content: ''; position: absolute; inset: 4px;
    border: 2px solid rgba(255,255,255,0.25); border-radius: 4px;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 2px, transparent 2px, transparent 8px),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 2px, transparent 2px, transparent 8px);
}
.bj-card-back::after {
    content: '♦'; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: rgba(255,255,255,0.15);
}

/* Chips */
.bj-chip {
    width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.75rem; color: #fff;
    border: 4px solid rgba(255,255,255,0.25);
    box-shadow: 0 4px 8px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.2);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}
.bj-chip::before {
    content: ''; position: absolute; inset: 4px;
    border-radius: 50%; border: 2px dashed rgba(255,255,255,0.3);
}
.bj-chip:hover  { transform: translateY(-4px) scale(1.1); box-shadow: 0 8px 16px rgba(0,0,0,0.6); }
.bj-chip:active { transform: translateY(-1px) scale(1.05); }

.bj-chip-red   { background: radial-gradient(circle at 35% 35%, #e53935, #8b0000); }
.bj-chip-blue  { background: radial-gradient(circle at 35% 35%, #1976d2, #0d47a1); }
.bj-chip-green { background: radial-gradient(circle at 35% 35%, #388e3c, #1b5e20); }
.bj-chip-brown { background: radial-gradient(circle at 35% 35%, #6d4c41, #3e2723); }
.bj-chip-black { background: radial-gradient(circle at 35% 35%, #455a64, #212121); }

/* Action buttons */
.bj-action-btn {
    font-family: 'Oswald', sans-serif; font-size: 0.75rem;
    font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
    border: none; border-radius: 6px; cursor: pointer;
    padding: 10px 20px; transition: all 0.2s; position: relative; overflow: hidden;
}
.bj-action-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,0.12), transparent); }
.bj-action-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.bj-action-btn:not(:disabled):hover  { transform: translateY(-2px); }
.bj-action-btn:not(:disabled):active { transform: translateY(0); }

.bj-btn-gold   { background: linear-gradient(135deg, #c9a84c, #8a6820); color: #1a1a1a; box-shadow: 0 4px 14px rgba(201,168,76,0.4); font-size: 0.85rem; padding: 12px 28px; }
.bj-btn-green  { background: linear-gradient(135deg, #2e7d32, #1b5e20); color: #fff; box-shadow: 0 4px 12px rgba(46,125,50,0.4); }
.bj-btn-red    { background: linear-gradient(135deg, #c0392b, #7f0000); color: #fff; box-shadow: 0 4px 12px rgba(192,57,43,0.4); }
.bj-btn-purple { background: linear-gradient(135deg, #7b1fa2, #4a148c); color: #fff; box-shadow: 0 4px 12px rgba(123,31,162,0.4); }
.bj-btn-dim    { background: rgba(0,0,0,0.5); color: #a89070; border: 1px solid rgba(255,255,255,0.15); font-size: 0.65rem; padding: 7px 12px; }

/* Bet circle active */
#bj-bet-circle.bj-has-bet {
    border: 3px solid #c9a84c !important;
    box-shadow: 0 0 20px rgba(201,168,76,0.3);
}








