:root {
    --shadow-deep: 0 10px 30px rgba(0, 0, 0, 0.5);
    --neon-purple: #8A2BE2; /* Morado Neón */
    --hot-pink: #FF1493; /* Rosa Fuerte */
    --purple-glow: #9370DB;
    --blue-glow: #4d94ff;

    /* Variables de color para el tema de compra, adaptadas a 'Gay' */
    --primary-color: var(--neon-purple);
    --danger-color: #EF4444;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;

    /* Variables estilo Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    color: #fff;
    user-select: none;
    overflow-y: auto;
    background-color: #111827;
}

.background-container {
    position: fixed;
    top: -5%; left: -5%; width: 110%; height: 110%;
    z-index: -1;
    background-size: cover;
    animation: ken-burns 30s infinite;
    filter: blur(5px) brightness(0.5);
}

@keyframes ken-burns {
    0%, 100% { transform: scale(1) rotate(0.5deg); }
    50% { transform: scale(1.1) rotate(-0.5deg); }
}

.main {
    display: flex; justify-content: center; align-items: center;
    width: 100%; min-height: 100vh; padding: 1rem;
    box-sizing: border-box; position: relative; z-index: 2;
}

.game-container {
    display: none; flex-direction: column; justify-content: center;
    align-items: center; width: 100%; max-width: 400px;
    text-align: center; position: relative;
    padding-top: 3rem;
}

.loading-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 100; backdrop-filter: blur(8px);
}
.shuffle-animation-container {
    position: relative; width: 70vw; max-width: 300px;
    aspect-ratio: 7 / 10; margin: 1rem auto;
}
.card-shuffle {
    position: absolute; width: 100%; height: 100%; border-radius: 15px;
    box-shadow: var(--shadow-deep); background-size: cover; background-position: center;
}
.loading-container .card-1 { animation: shuffle-1 2.5s ease-in-out forwards; }
.loading-container .card-2 { animation: shuffle-2 2.5s ease-in-out forwards; }
.loading-container .card-3 { animation: shuffle-3 2.5s ease-in-out forwards; }
.shuffling-text { margin-top: 2rem; font-size: 1.5rem; color: #fff; letter-spacing: 1px; }
@keyframes shuffle-1 { 0%, 100% { transform: translate(0, 0) rotate(-8deg); } 25% { transform: translate(-40vw, -10vh) rotate(-25deg); } 50% { transform: translate(40vw, 10vh) rotate(25deg); } 75% { transform: translate(0, 0) rotate(0); } }
@keyframes shuffle-2 { 0%, 100% { transform: translate(0, 0) rotate(2deg); } 25% { transform: translate(35vw, -8vh) rotate(20deg); } 50% { transform: translate(-35vw, 8vh) rotate(-20deg); } 75% { transform: translate(0, 0) rotate(0); } }
@keyframes shuffle-3 { 0%, 100% { transform: translate(0, 0) rotate(10deg); } 25% { transform: translate(-30vw, 12vh) rotate(-15deg); } 50% { transform: translate(30vw, -12vh) rotate(15deg); } 75% { transform: translate(0, 0) rotate(0); } }
.game-board-main {
    position: relative; width: 70vw; max-width: 300px;
    aspect-ratio: 7 / 10; margin: 0.5rem auto 1rem auto; perspective: 1500px;
}
.card-inner {
    position: relative; width: 100%; height: 100%;
    transition: transform 0.8s cubic-bezier(0.6, 0.02, 0.4, 1);
    transform-style: preserve-3d;
}
.card-inner.is-flipped { transform: rotateY(180deg); }
.card-face {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; border-radius: 20px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 20px; box-sizing: border-box;
    background-size: cover; background-position: center;
    box-shadow: var(--shadow-deep);
}
.card-back { background-image: url('../images/gay/GayNew.webp'); }
.card-front { transform: rotateY(180deg); background-color: rgba(0, 0, 0, 0.3); }
.content-wrapper { background-color: rgba(0, 0, 0, 0.6); padding: 15px; border-radius: 10px; backdrop-filter: blur(4px); }
.card-icon { font-size: clamp(2rem, 8vw, 3rem); margin-bottom: 1rem; text-shadow: 0 0 10px rgba(0,0,0,0.5); }
.card-text { font-size: clamp(1rem, 4vw, 1.5rem); font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,0.7); }

.top-right-icons {
    position: fixed; top: 20px; right: 20px;
    display: flex; flex-direction: column; gap: 15px; z-index: 10;
}
.btn-icon {
    font-size: 2.5rem; color: var(--neon-purple); cursor: pointer;
    background: none; border: none; padding: 0; margin: 0;
    transition: transform 0.2s ease, color 0.3s;
}
.btn-icon:hover { transform: scale(1.15); }

.timer-section {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 5;
    white-space: nowrap;
}
.timer-section .fa-duotone { font-size: 1.4em; color: var(--primary-color); }

.section-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
    width: 70vw;
    max-width: 300px;
}
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: all 250ms ease;
    text-decoration: none;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.3); }
.btn:disabled { cursor: not-allowed; opacity: 0.6; transform: none; }
.btn-success { background-image: linear-gradient(135deg, rgba(138, 43, 226, 0.85), rgba(147, 112, 219, 0.85)); }
.btn-danger { background-image: linear-gradient(135deg, rgba(85, 85, 85, 0.85), rgba(34, 34, 34, 0.85)); }
.btn-primary { background-image: linear-gradient(135deg, var(--blue-glow), #0069d9); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 200; padding: 1rem; box-sizing: border-box; }
.modal-content { background: #1a1a1a; border: 1px solid #444; border-radius: 15px; padding: 2rem; width: 100%; max-width: 500px; text-align: center; position: relative; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); max-height: 85vh; overflow-y: auto; box-sizing: border-box; }
.btn-close-modal { position: absolute; top: 10px; right: 15px; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; z-index: 10; }
.instructions-text p { margin-bottom: 1rem; line-height: 1.6; }
.age-verification { margin: 1.5rem 0; }
#accept-instructions-button {
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}
.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.category-selection-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 700px;
    z-index: 10;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.category-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
    position: relative;
}

.category-header h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    font-weight: 700;
    margin: 0;
    text-align: center;
    width: 100%;
}

.home-btn-styled {
    position: absolute;
    left: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.home-btn-styled:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.home-btn-styled i { font-size: 1.2rem; }

.category-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.btn-category {
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    aspect-ratio: 1 / 1;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 200px;
    margin: 0 auto;
}
.btn-category::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%);
    transition: background 0.3s ease;
}
.btn-category:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
.btn-category:hover::after { background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%, rgba(0,0,0,0.4) 100%); }
.category-text-container {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.category-text-container i {
    font-size: 2.5rem;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
    color: var(--primary-color);
}
.btn-category:hover .category-text-container i {
    transform: scale(1.1) rotate(5deg);
    color: #fff;
}
.category-text-container span {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.btn-category[data-category="calentamiento"] { background-image: url('../images/gay/GayNew.webp'); }
.btn-category[data-category="sexo_intenso"] { background-image: url('../images/gay/xxx New.webp'); }
.btn-category[data-category="tabu_fetiches"] { background-image: url('../images/gay/eertrtgfd.webp'); }
.btn-category[data-category="fantasias_trios"] { background-image: url('../images/gay/xxxscscsg.webp'); }
.btn-category[data-category="locura_final"] { background-image: url('../images/gay/sasdfsdgdf.webp'); }
.btn-category[data-category="all"] { background-image: url('../images/gay/dswsfwsf.webp'); }

#purchase-modal .modal-content { background-color: var(--bg-white) !important; color: var(--text-dark) !important; border: none !important; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important; padding: 0 !important; overflow: hidden; display: block !important; }
#purchase-modal .modal-container { width: 100%; max-width: 100%; padding: 2rem; box-sizing: border-box; overflow-y: auto; max-height: 90vh; }
#purchase-modal .btn-close-modal { color: var(--text-light) !important; top: 1rem; right: 1rem; z-index: 20; }
#purchase-modal .btn-close-modal:hover { color: var(--danger-color) !important; }
#purchase-modal h2 { display: flex; align-items: center; justify-content: center; gap: 0.5rem; color: var(--text-dark) !important; font-weight: 700; font-size: 1.5rem; margin-top: 0; margin-bottom: 1.5rem; }
#purchase-modal .product-showcase { background-color: var(--bg-light) !important; border: 1px solid var(--border-color) !important; border-radius: 12px; padding: 1.2rem; margin-bottom: 1.5rem; width: 100%; box-sizing: border-box; text-align: left; }
#purchase-modal .product-header-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
#purchase-modal .product-img-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border-color); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
#purchase-modal .product-title-info { flex: 1; }
#purchase-modal .product-title-info h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.25rem 0; color: var(--text-dark) !important; }
#purchase-modal .product-desc { font-size: 0.9rem; color: var(--text-medium) !important; margin: 0; font-weight: 500; line-height: 1.4; }
#purchase-modal .product-benefits { margin-bottom: 1rem; }
#purchase-modal .product-benefits ul { list-style: none; padding: 0; margin: 0; }
#purchase-modal .product-benefits li { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; color: var(--text-medium) !important; font-size: 0.9rem; font-weight: 500; }
#purchase-modal .product-benefits .fa-duotone { color: var(--primary-color); font-size: 1.1em; }
#purchase-modal .product-pricing-highlight { display: flex; align-items: baseline; justify-content: flex-end; gap: 1rem; margin-top: 0.5rem; }
#purchase-modal .product-pricing-highlight .price-old { font-size: 1.1rem; text-decoration: line-through; color: var(--text-light) !important; font-weight: 500; }
#purchase-modal .product-pricing-highlight .price-new { font-size: 1.8rem; font-weight: 800; color: var(--danger-color) !important; line-height: 1; }
#purchase-form-inner { width: 100%; }
#purchase-modal .input-group { margin-bottom: 1rem; width: 100%; text-align: left; }
#purchase-modal .input-group label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--text-medium) !important; font-weight: 600; }
#purchase-modal .input-group input { width: 100%; padding: 0.85rem; border-radius: 8px; background: var(--bg-white) !important; border: 1px solid var(--border-color) !important; color: var(--text-dark) !important; font-size: 1rem; font-weight: 500; box-sizing: border-box; transition: all 0.2s; }
#purchase-modal .input-group input:focus { border-color: var(--primary-color) !important; box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.15); outline: none; }
#purchase-modal #upsell-container { display: flex; align-items: center; background: var(--bg-light) !important; padding: 0.8rem; border-radius: 10px; margin-bottom: 1.5rem; cursor: pointer; border: 1px solid var(--border-color) !important; transition: all 0.2s; }
#purchase-modal #upsell-container:hover { border-color: var(--primary-color) !important; background: #f3e5f5 !important; }
#purchase-modal #upsell-container input[type="checkbox"] { display: none; }
#purchase-modal #upsell-container img { width: 48px; height: 48px; margin-right: 1rem; border-radius: 6px; }
#purchase-modal #upsell-container label { display: flex; flex-direction: column; cursor: pointer; color: var(--text-medium) !important; font-size: 0.9rem; font-weight: 500; text-align: left; }
#purchase-modal #upsell-container label .font-semibold { color: var(--primary-color) !important; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 2px; }
#purchase-modal .order-summary { background: var(--bg-light) !important; padding: 1rem; border-radius: 10px; margin-top: 1rem; width: 100%; box-sizing: border-box; border: 1px solid var(--border-color) !important; }
#purchase-modal .order-summary h4 { font-size: 1rem; text-align: left; margin: 0 0 0.8rem 0; border-bottom: 1px solid var(--border-color) !important; padding-bottom: 0.5rem; color: var(--text-dark) !important; font-weight: 700; }
#purchase-modal .order-summary .flex { display: flex; justify-content: space-between; margin-bottom: 0.5rem; color: var(--text-medium) !important; font-size: 0.95rem; font-weight: 500; }
#purchase-modal .order-summary .border-t { border-top: 1px solid var(--border-color) !important; padding-top: 0.8rem; margin-top: 0.8rem; }
#purchase-modal .order-summary .text-primary { color: var(--primary-color) !important; font-size: 1.2rem; }
#purchase-modal .submit-button {
    width: 100% !important;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.5rem;
    background-image: linear-gradient(135deg, #25D366, #128C7E);
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-sizing: border-box;
}
#purchase-modal .submit-button i { font-size: 1.3em; }
#purchase-modal .submit-button:hover { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5); transform: translateY(-2px); }

.success-content .btn-primary { width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; margin-top: 1.5rem; background-image: linear-gradient(135deg, #EF4444, #B91C1C) !important; color: white !important; border: none !important; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); padding: 14px; font-size: 1.1rem; font-weight: 700; border-radius: 50px; display: flex; align-items: center; justify-content: center; gap: 0.8rem; }
.success-content .btn-primary:hover { box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5); transform: translateY(-2px); }

@media (max-width: 768px) {
    .category-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .category-header { flex-direction: column; gap: 1rem; }
    .home-btn-styled { position: static; align-self: center; }
    #category-selection-modal h2 { font-size: 1.8rem; }
}
