/* app-cartas.css */
:root {
    --primario: #5D4037; 
    --acento: #C19A6B; 
    --fondo: #F5F5F0; 
    --blanco: #FFFFFF;
    --texto: #2D2D2D; 
    --verde-wa: #25D366; 
    --sombra: 0 10px 30px rgba(0,0,0,0.08);
}

body.dark-mode {
    --primario: #E0C097; 
    --acento: #D4A373; 
    --fondo: #121212;
    --blanco: #1E1E1E; 
    --texto: #E0E0E0; 
    --sombra: 0 10px 30px rgba(0,0,0,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Montserrat', sans-serif; background-color: var(--fondo); color: var(--texto); transition: background 0.3s, color 0.3s; overflow-x: hidden; }

/* Navbar Superior Derecha */
nav.top-nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 75px; 
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 0 5%; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
body.dark-mode nav.top-nav { background: rgba(18,18,18,0.95); box-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.nav-left { display: flex; align-items: center; gap: 15px; }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 800; color: var(--primario); text-decoration: none; text-transform: uppercase; letter-spacing: 1px; }

.nav-right { display: flex; align-items: center; gap: 15px; }
.nav-links { display: flex; gap: 20px; list-style: none; }
.nav-links a { color: var(--texto); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: 0.3s; display: flex; align-items: center; gap: 6px; }
.nav-links a:hover { color: var(--acento); }

.icon-btn { background: none; border: none; font-size: 1.3rem; color: var(--primario); cursor: pointer; transition: 0.3s; }
.icon-btn:hover { transform: scale(1.1); color: var(--acento); }

/* Menu hamburguesa para movil */
.menu-toggle { display: none; background: none; border: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.menu-toggle span { width: 25px; height: 3px; background: var(--primario); border-radius: 3px; transition: 0.3s; }

@media (max-width: 768px) {
    .nav-links {
        position: absolute; top: 75px; right: -100%; width: 250px; background: var(--blanco);
        flex-direction: column; padding: 20px; box-shadow: -5px 5px 15px rgba(0,0,0,0.1); transition: 0.4s; gap: 15px; border-radius: 0 0 0 15px;
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.1rem; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.05); width: 100%; }
    .menu-toggle { display: flex; }
    
    /* Responsive Adjustments for Mobile Cards */
    main.deck-container { padding-top: 85px; padding-bottom: 80px; justify-content: flex-start; }
    .deck-header { margin-bottom: 15px; }
    .deck-title { font-size: 2rem; }
    
    .card-scene {
        width: 100%; max-width: 380px; height: 50vh; min-height: 380px; max-height: 460px;
        margin-bottom: 25px;
    }
    .card-display { padding: 20px 15px; }
    .card-icon { font-size: 2.5rem; margin-bottom: 15px; }
    .card-text { font-size: 1.05rem; max-height: calc(100% - 90px); }
    
    .mazo-actions { width: 95%; gap: 10px; }
    .btn-card { padding: 12px 10px; font-size: 0.9rem; }
    
    .float-container { bottom: 15px; left: 15px; }
    .f-btn { width: 45px; height: 45px; font-size: 1.1rem; }
}

@media (max-height: 650px) and (max-width: 768px) {
    /* For smaller height mobile phones like iPhone SE */
    main.deck-container { padding-top: 75px; padding-bottom: 60px; }
    .card-scene { height: 45vh; min-height: 320px; margin-bottom: 15px; }
    .card-icon { font-size: 2rem; margin-bottom: 10px; }
    .card-text { font-size: 0.95rem; }
    .card-cita { margin-top: 15px; padding-top: 10px; }
}

/* Contenedor Principal */
main.deck-container {
    padding-top: 100px; min-height: 100vh; display: flex; flex-direction: column; align-items: center;
    background: radial-gradient(circle at top, rgba(193,154,107,0.1), transparent 50%);
    padding-bottom: 50px;
}

.deck-header { text-align: center; margin-bottom: 30px; padding: 0 20px; }
.deck-title { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 6vw, 2.5rem); color: var(--acento); margin-bottom: 5px; }
.deck-subtitle { font-size: 0.9rem; font-weight: 700; color: var(--primario); text-transform: uppercase; letter-spacing: 2px; }

/* La Carta - Margenes fijos e internos limpios */
.card-scene {
    width: 90%; max-width: 420px; height: 480px; /* Tamaño Fijo de la carta */
    perspective: 1000px; margin-bottom: 40px;
}

.card-display {
    width: 100%; height: 100%; background: var(--blanco); border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15); border: 2px solid rgba(193,154,107,0.3);
    padding: 30px 25px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; position: relative; transition: transform 0.4s ease, opacity 0.4s ease, border-color 0.4s;
    overflow: hidden;
}
body.dark-mode .card-display { box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.card-display.changing { transform: scale(0.92); opacity: 0; }

.card-icon { font-size: 3rem; color: var(--acento); margin-bottom: 25px; opacity: 0.9; }

/* Texto Responsivo y con Scroll Interno si es muy largo */
.card-content { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; }
.card-text { 
    font-size: clamp(1rem, 4.5vw, 1.25rem); font-weight: 600; line-height: 1.6; color: var(--texto);
    max-height: 250px; overflow-y: auto; padding-right: 5px; white-space: pre-wrap; font-family: 'Playfair Display', serif;
}

/* Custom Scrollbar para el card-text */
.card-text::-webkit-scrollbar { width: 4px; }
.card-text::-webkit-scrollbar-thumb { background: var(--acento); border-radius: 10px; }

.card-cita {
    font-family: 'Montserrat', sans-serif; font-size: 0.85rem; font-weight: 700; color: var(--acento);
    margin-top: 25px; text-transform: uppercase; opacity: 0.9; border-top: 1px solid rgba(193,154,107,0.2); padding-top: 15px; letter-spacing: 1.5px;
}

/* Botones Inferiores */
.mazo-actions { display: flex; gap: 15px; width: 90%; max-width: 420px; justify-content: center; }
.btn-card {
    flex: 1; padding: 15px 10px; border-radius: 50px; border: none; font-weight: 700; font-size: 0.95rem;
    cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: 0.3s;
}
.btn-share { background: transparent; color: var(--acento); border: 2px solid var(--acento); }
.btn-share:hover { background: var(--acento); color: var(--blanco); }
.btn-next { background: var(--primario); color: white; box-shadow: 0 4px 15px rgba(93, 64, 55, 0.4); }
.btn-next:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(93, 64, 55, 0.6); }

/* Flotante Donar */
.float-container { position: fixed; bottom: 20px; left: 20px; z-index: 999; }
.f-btn { 
    width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--acento), var(--primario)); color: white;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 5px 15px rgba(0,0,0,0.3); text-decoration: none; transition: 0.3s;
}
.f-btn:hover { transform: scale(1.1); }
