/**
 * GEO SURVIVOR - SHOP MENU STYLES
 * Estilos para la tienda de mejoras permanentes
 */

/* ==========================================
   PANTALLA DE TIENDA
   ========================================== */

#shop-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#shop-screen.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

#premium-shop-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 0, 30, 0.95);
    backdrop-filter: blur(12px);
    z-index: 2050;
    display: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

#premium-shop-screen.active {
    display: flex;
    animation: fadeIn 0.35s ease forwards;
}

.shop-content {
    position: relative;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    margin: auto;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 3px solid #00ffcc;
    border-radius: 20px;
    padding: 30px 20px;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 255, 204, 0.5);
}

.premium-shop-content {
    max-width: 1024px;
    background: linear-gradient(135deg, #180033 0%, #080012 100%);
    border-color: #b388ff;
    box-shadow: 0 0 60px rgba(179, 136, 255, 0.45);
}

.premium-info-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(179, 136, 255, 0.12);
    border: 1px solid rgba(179, 136, 255, 0.25);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.premium-info-banner .banner-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 12px rgba(179, 136, 255, 0.6));
}

.premium-info-banner .banner-text strong {
    display: block;
    color: #e0c8ff;
    font-size: 16px;
}

.premium-info-banner .banner-text span {
    color: #aaa;
    font-size: 13px;
}

.premium-currency-display {
    background: linear-gradient(135deg, #201040 0%, #120024 100%);
    border: 2px solid rgba(179, 136, 255, 0.5);
    border-radius: 50px;
    padding: 12px 28px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #e9d9ff;
    font-weight: bold;
    box-shadow: 0 0 25px rgba(179, 136, 255, 0.35);
}

.premium-currency-display .currency-icon {
    font-size: 24px;
}

.premium-currency-display #premium-coins-amount {
    font-size: 26px;
    min-width: 90px;
    text-align: center;
}

.premium-currency-display .currency-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #cdb7ff;
}

.premium-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.premium-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.premium-package-card {
    background: linear-gradient(135deg, #1c0a30 0%, #0f021b 100%);
    border: 2px solid rgba(179, 136, 255, 0.2);
    border-radius: 18px;
    padding: 22px 20px;
    text-align: left;
    color: #f5f5ff;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.premium-package-card .package-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.premium-package-card .package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.premium-package-card .package-title {
    font-size: 16px;
    font-weight: bold;
}

.premium-package-card .package-badge {
    background: linear-gradient(135deg, #b388ff 0%, #7c3aed 100%);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #140020;
}

.premium-package-card .package-amount {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.premium-package-card .package-bonus {
    color: #9c7cff;
    font-size: 14px;
    margin-bottom: 10px;
}

.premium-package-card .package-price {
    font-size: 16px;
    font-weight: bold;
    color: #d8c4ff;
    margin-bottom: 6px;
}

.premium-package-card .package-description {
    font-size: 13px;
    color: #b7a7d9;
}

.premium-package-card::after {
    content: '';
    position: absolute;
    inset: -120px;
    background: radial-gradient(circle, rgba(179, 136, 255, 0.18) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.premium-package-card:hover,
.premium-package-card.selected {
    transform: translateY(-6px);
    border-color: rgba(179, 136, 255, 0.6);
    box-shadow: 0 16px 35px rgba(179, 136, 255, 0.35);
}

.premium-package-card:hover::after,
.premium-package-card.selected::after {
    opacity: 1;
}

.premium-package-card.highlight {
    border-color: rgba(255, 190, 92, 0.7);
    box-shadow: 0 18px 40px rgba(255, 190, 92, 0.35);
}

.premium-sidebar {
    background: linear-gradient(180deg, rgba(52, 26, 91, 0.95) 0%, rgba(24, 8, 52, 0.95) 100%);
    border: 2px solid rgba(179, 136, 255, 0.35);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: #f0e8ff;
}

.premium-sidebar .btn {
    width: 100%;
}

.premium-sidebar .btn + .btn {
    margin-top: 10px;
}

.package-summary h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #d8c4ff;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: #cbb8f5;
}

.summary-total-gems {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(179, 136, 255, 0.12);
    border: 1px solid rgba(179, 136, 255, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    color: #e4d6ff;
}

.summary-total-gems strong {
    font-size: 20px;
}

.confirmation-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 18px;
}

.confirmation-actions .btn {
    flex: 1;
}

.hidden {
    display: none !important;
}

.shop-content h2 {
    text-align: center;
    color: #00ffcc;
    font-size: 28px;
    margin: 0 0 20px 0;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.8);
}

/* ==========================================
   TABS DE LA TIENDA
   ========================================== */

.shop-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.shop-tab {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 16px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-tab:hover:not(:disabled) {
    border-color: #00ffcc;
    color: #00ffcc;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

.shop-tab.active {
    background: linear-gradient(135deg, #00ffcc 0%, #00aa99 100%);
    border-color: #00ffcc;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.6);
}

.shop-tab:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==========================================
   CONTENEDOR DE ITEMS
   ========================================== */

.shop-items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 15px 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   CARD DE ARMA
   ========================================== */

.shop-weapon-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 3px solid rgba(0, 255, 204, 0.2);
    border-radius: 20px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Efecto de brillo de fondo */
.shop-weapon-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 204, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Línea superior animada */
.shop-weapon-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #00ffcc 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-weapon-card:hover {
    border-color: #00ffcc;
    box-shadow: 0 0 40px rgba(0, 255, 204, 0.5), 
                inset 0 0 20px rgba(0, 255, 204, 0.1);
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(135deg, #1f2a2a 0%, #132020 100%);
}

.shop-weapon-card:hover::before {
    opacity: 1;
}

.shop-weapon-card:hover::after {
    opacity: 1;
}

.shop-weapon-card.max-level {
    border-color: rgba(255, 170, 0, 0.5);
}

.shop-weapon-card.max-level:hover {
    border-color: #ffaa00;
    box-shadow: 0 0 40px rgba(255, 170, 0, 0.4),
                inset 0 0 20px rgba(255, 170, 0, 0.1);
}

.shop-weapon-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Icono del arma */
.weapon-icon-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 204, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(0, 255, 204, 0.3);
}

.weapon-icon {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 204, 0.5));
    transition: transform 0.3s ease;
}

.shop-weapon-card:hover .weapon-icon {
    transform: scale(1.1);
}

.weapon-icon-fallback {
    font-size: 40px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 204, 0.5));
}

/* Información del arma */
.weapon-info {
    text-align: center;
    width: 100%;
}

.weapon-name {
    font-size: 18px;
    font-weight: bold;
    color: #00ffcc;
    margin: 0 0 10px 0;
}

.weapon-level-bar {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 8px;
}

.level-star {
    font-size: 16px;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.level-star.filled {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(255, 170, 0, 0.8));
}

.weapon-level-text {
    font-size: 14px;
    color: #888;
    margin-bottom: 5px;
}

.weapon-bonus {
    font-size: 16px;
    font-weight: bold;
    color: #ffaa00;
    margin-top: 5px;
}

.weapon-next-bonus {
    font-size: 12px;
    color: #00ffcc;
    margin-top: 5px;
    padding: 5px;
    background: rgba(0, 255, 204, 0.1);
    border-radius: 5px;
}

/* Botón de compra */
.weapon-buy-button {
    width: 100%;
    background: linear-gradient(135deg, #00ffcc 0%, #00aa99 100%);
    border: 2px solid #00ffcc;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4),
                inset 0 -2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Efecto de pulso en botón */
.weapon-buy-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.weapon-buy-button:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.weapon-buy-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #00ffee 0%, #00ccbb 100%);
    box-shadow: 0 0 35px rgba(0, 255, 204, 0.7),
                inset 0 0 10px rgba(255, 255, 255, 0.3);
    transform: scale(1.08) translateY(-2px);
    border-color: #00ffee;
}

.weapon-buy-button:active:not(:disabled) {
    transform: scale(1.02) translateY(0);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4),
                inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.weapon-buy-button.max {
    background: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%);
    border-color: #ffaa00;
    cursor: default;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.4),
                inset 0 -2px 5px rgba(0, 0, 0, 0.2);
    color: #1a1a1a;
}

.weapon-buy-button.max:hover {
    transform: none;
}

.weapon-buy-button.not-enough {
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    border-color: #444;
    color: #666;
    box-shadow: 0 0 10px rgba(100, 100, 100, 0.2);
    cursor: not-allowed;
}

.weapon-buy-button.not-enough:hover {
    transform: none;
}

.weapon-buy-button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.buy-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.buy-cost {
    font-size: 18px;
    font-weight: 900;
}

/* ==========================================
   NOTIFICACIONES
   ========================================== */

.shop-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 2px solid #00ffcc;
    border-radius: 15px;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.5);
}

.shop-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.shop-notification.error {
    border-color: #ff4444;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
}

.notification-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 5px rgba(0, 255, 204, 0.8));
}

.notification-text {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

/* ==========================================
   ESTILOS PARA PAGO EN LINEA
   ========================================== */

/* Badge de oferta/descuento */
.shop-offer-badge {
    position: absolute;
    top: -15px;
    right: -15px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff4400 100%);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.6);
    animation: rotate-badge 20s linear infinite;
}

@keyframes rotate-badge {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Contenedor de métodos de pago (futuro) */
.payment-methods-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 255, 204, 0.05);
    border: 2px dashed rgba(0, 255, 204, 0.2);
    border-radius: 15px;
}

/* Botón de método de pago individual */
.payment-method-btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 2px solid rgba(0, 255, 204, 0.2);
    border-radius: 12px;
    padding: 12px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #888;
    font-weight: bold;
    font-size: 13px;
}

.payment-method-btn small {
    font-size: 11px;
    color: #777;
    font-weight: normal;
}

.payment-method-btn:hover:not(:disabled) {
    border-color: #00ffcc;
    color: #00ffcc;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
    transform: translateY(-3px);
}

.payment-method-btn.active {
    background: linear-gradient(135deg, #00ffcc 0%, #00aa99 100%);
    border-color: #00ffcc;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.6);
}

.payment-method-btn.active small {
    color: #000;
}

.payment-method-icon {
    font-size: 24px;
}

/* Información de seguridad */
.payment-security-info {
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 12px;
    color: #888;
    text-align: center;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.payment-security-info::before {
    content: '🔒';
    font-size: 16px;
}

/* Modal de confirmación de compra */
.purchase-confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.purchase-confirmation-modal.active {
    display: flex;
}

.confirmation-dialog {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 3px solid #00ffcc;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 95%;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 204, 0.5);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirmation-dialog h3 {
    color: #00ffcc;
    font-size: 22px;
    margin: 0 0 15px 0;
}

.confirmation-dialog .item-summary {
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    color: #fff;
}

.confirmation-dialog .item-summary-text {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.confirmation-dialog .item-summary-price {
    font-size: 20px;
    color: #00ffcc;
    font-weight: bold;
}

.confirmation-dialog .button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.confirmation-dialog .confirm-btn,
.confirmation-dialog .cancel-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirmation-dialog .confirm-btn {
    background: linear-gradient(135deg, #00ffcc 0%, #00aa99 100%);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

.confirmation-dialog .confirm-btn:hover {
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.6);
    transform: scale(1.05);
}

.confirmation-dialog .cancel-btn {
    background: #333;
    color: #888;
    border: 2px solid #555;
}

.confirmation-dialog .cancel-btn:hover {
    border-color: #888;
    color: #aaa;
}

/* Estado de carga en botón de compra */
.weapon-buy-button.loading {
    position: relative;
    color: transparent;
}

.weapon-buy-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Indicador de estado (success, error, pending) */
.purchase-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    margin-top: 10px;
}

.purchase-status-indicator.success {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.purchase-status-indicator.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.purchase-status-indicator.pending {
    background: rgba(255, 170, 0, 0.1);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */

@media (max-width: 768px) {
    .shop-content {
        padding: 20px 15px;
        max-height: 95vh;
    }
    
    .shop-content h2 {
        font-size: 22px;
    }
    
    .shop-coins-display {
        padding: 10px 20px;
    }
    
    .shop-coins-display #shop-coins-amount {
        font-size: 22px;
    }
    
    .shop-items-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .premium-layout {
        grid-template-columns: 1fr;
    }

    .premium-sidebar {
        order: -1;
    }

    .premium-packages-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-weapon-card {
        padding: 15px;
    }
    
    .weapon-icon-container {
        width: 70px;
        height: 70px;
    }
    
    .weapon-icon {
        width: 50px;
        height: 50px;
    }
    
}

@media (max-width: 480px) {
    .shop-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 15px 10px;
    }
    
    .shop-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .shop-tab {
        padding: 10px 20px;
        font-size: 14px;
    }
}
