/* ============================================
   EXOXO SHOP - ESTILOS PROFESIONALES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('mi.gif.gif') no-repeat center center fixed;
    background-size: cover;
    color: #ffffff;
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
header {
    background: rgba(255, 107, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    text-align: center;
    border-bottom: 2px solid #ff8c00;
    box-shadow: 0 5px 30px rgba(255, 107, 0, 0.2);
}

.logo {
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto 1rem auto;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    text-align: center;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: #ddd;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.feature {
    background: rgba(255, 140, 0, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* ============================================
   PANEL DE AUTENTICACION
   ============================================ */
.auth-panel {
    max-width: 380px;
    margin: 0 auto 1rem auto;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 140, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-header h3 {
    font-size: 1.2rem;
    color: #ff8c00;
}

.auth-header p {
    font-size: 0.7rem;
    color: #aaa;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.auth-tab {
    flex: 1;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid #ff8c00;
    color: #ff8c00;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    color: white;
    border-color: transparent;
}

/* Formularios */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 0.8rem;
}

.auth-form.active {
    display: flex;
}

.input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(255, 140, 0, 0.3);
    overflow: hidden;
}

.input-icon {
    padding: 0 0.8rem;
    font-size: 1rem;
    color: #ff8c00;
}

.auth-input {
    flex: 1;
    padding: 0.8rem 0.8rem 0.8rem 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Botones de autenticacion */
.auth-btn {
    padding: 0.8rem;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn {
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    color: white;
}

.register-btn {
    background: linear-gradient(135deg, #6c63ff, #8b7fff);
    color: white;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.65rem;
    color: #aaa;
}

/* ============================================
   PANEL DE USUARIO (logueado)
   ============================================ */
.user-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    padding: 0.5rem 1.5rem;
    margin-top: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-email {
    font-size: 0.75rem;
    color: #ff8c00;
}

.user-balance {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.balance-label {
    font-size: 0.7rem;
    color: #aaa;
}

.balance-amount {
    font-size: 1rem;
    font-weight: bold;
    color: #10b981;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.recharge-btn {
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #10b981, #34d399);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn {
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #ef4444, #f87171);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recharge-btn:hover, .logout-btn:hover {
    transform: translateY(-2px);
}

/* ============================================
   CREDIT BANNER
   ============================================ */
.credit-banner {
    margin: 1rem 0;
}

.credit-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(0, 0, 0, 0.5));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 1rem;
    text-align: center;
}

.credit-card strong {
    font-size: 1.8rem;
    display: block;
    margin: 0.3rem 0;
    color: #10b981;
}

.credit-hint {
    font-size: 0.65rem;
    color: #aaa;
}

/* ============================================
   PRODUCTOS
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.product-card {
    background: rgba(26, 26, 62, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #ff8c00;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.product-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 1rem;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.product-card h2 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.product-card p {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 1rem;
    min-height: 55px;
}

.price {
    font-size: 1.6rem;
    font-weight: bold;
    margin: 0.5rem 0;
    color: #10b981;
}

.buy-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(45deg, #6c63ff, #ff6b6b);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

/* ============================================
   MODALES
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a3e, #2a2a5e);
    margin: 10% auto;
    padding: 1.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
    border: 1px solid #ff8c00;
}

.close {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #ff6b6b;
}

.close:hover {
    color: #ff4444;
}

/* Botones dentro de modales */
.generate-btn, #confirmPurchase {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.generate-btn:hover, #confirmPurchase:hover {
    transform: translateY(-2px);
}

.payment-address, .payment-link {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.8rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    word-break: break-all;
}

.payment-address code, .payment-link code {
    font-size: 0.7rem;
    color: #ff8c00;
}

.copy-btn {
    padding: 0.3rem 0.8rem;
    background: #6c63ff;
    border: none;
    border-radius: 30px;
    color: white;
    cursor: pointer;
    font-size: 0.7rem;
}

.copy-btn:hover {
    transform: translateY(-1px);
}

.payment-amount {
    margin: 1rem 0;
}

.payment-amount label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    color: #aaa;
}

.payment-amount input {
    width: 100%;
    padding: 0.7rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,140,0,0.3);
    border-radius: 50px;
    color: white;
}

.payment-method {
    background: rgba(16, 185, 129, 0.1);
    padding: 0.8rem;
    border-radius: 12px;
    margin: 1rem 0;
}

.credit-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.credit-info strong {
    color: #10b981;
}

#transactionStatus, #purchaseStatus {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 12px;
    text-align: center;
    font-size: 0.8rem;
    display: none;
}

.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #10b981;
}

.error {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.loading {
    display: block;
    background: rgba(255, 107, 0, 0.2);
    border: 1px solid #ff8c00;
    color: #ff8c00;
}

.info {
    display: block;
    background: rgba(108, 99, 255, 0.2);
    border: 1px solid #6c63ff;
    color: #6c63ff;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: 1.5rem;
    color: #aaa;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 107, 0, 0.2);
    font-size: 0.7rem;
}

/* ============================================
   BOTÓN DE SOPORTE
   ============================================ */
.support-btn {
    position: fixed;
    bottom: 100px;
    left: 20px;
    background: linear-gradient(135deg, #6c63ff, #8b7fff);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.support-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}

/* Botón de confirmación manual */
.manual-confirm-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
}

.manual-confirm-btn:hover {
    transform: translateY(-2px);
}

/* Modal de email */
#emailModal input:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 5px rgba(255, 140, 0, 0.5);
}

#emailModal .modal-content {
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación del botón de soporte */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(108, 99, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(108, 99, 255, 0);
    }
}

.support-btn {
    animation: pulse 2s infinite;
}

/* QR */
#qrcode canvas {
    width: 200px !important;
    height: 200px !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    .auth-panel {
        max-width: 95%;
        margin: 0.5rem auto;
    }
    
    .user-panel {
        flex-direction: column;
        border-radius: 20px;
        padding: 1rem;
    }
    
    .user-actions {
        width: 100%;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 25% auto;
        padding: 1rem;
        width: 95%;
    }
    
    .support-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}