body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    /* Configuración del fondo de imagen */
    background-image: url('imagen.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 40px 20px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 50px;
    font-size: 2.5rem;
}
.contracts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.contract-card {
    background: rgba(255, 255, 255, 0.92); /* Fondo blanco semi-transparente */
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}
.contract-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.plan-name {
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}
.investment-amount {
    font-size: 2.5rem;
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
}
.currency {
    font-size: 1rem;
    vertical-align: super;
}
.details {
    margin: 25px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
}
.detail-item {
    margin: 10px 0;
    color: #555;
    font-size: 1.1rem;
}
.highlight {
    color: #27ae60;
    font-weight: bold;
}
.btn-invest {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.3s;
}
.btn-invest:hover {
    opacity: 0.9;
}
/* Estilos para la tarjeta de saldo */
.balance-card {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95), rgba(52, 73, 94, 0.95));
    color: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin: 0 auto 30px auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-width: 600px;
}
.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.balance-amount {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 30px;
}
.balance-amount span {
    font-size: 1.5rem;
    font-weight: 400;
}
.balance-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.action-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 12px 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}
.action-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}
/* Estilos para el menú de navegación */
.nav-menu {
   display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.nav-btn {
    background: white;
    border: 1px solid #ddd;
    color: #555;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.nav-btn.active, .nav-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}
.nav-buttons {
    display: flex;
    gap: 15px;
}
.user-balance {
    font-size: 1.2rem;
    font-weight: bold;
    color: #27ae60;
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #ddd;
}
.section-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}
.section-content.active {
    display: block;
}
/* Estilos para el Modal de Retiro */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
}
.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}
.modal-input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Estilos para el Login */
.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2500;
}
.login-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 400px;
    text-align: center;
}
.login-card h2 {
    color: #2c3e50;
    margin-bottom: 30px;
}
/* Estilos para el QR de Yape */
.contenedor-pago {
    text-align: center;
    padding: 20px;
    border: 1px solid #742284; /* Color morado Yape */
    border-radius: 15px;
    max-width: 300px;
    margin: 20px auto;
}
.qr-imagen {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 10px;
}
.instrucciones {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
    color: #555;
}
/* Estilos para la tabla de historial */
.transaction-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-top: 10px;
}
.transaction-table th, .transaction-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}
.transaction-table th {
    color: #7f8c8d;
    font-weight: 600;
    font-size: 0.9rem;
}
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}
.status-completed { background-color: #e8f8f5; color: #27ae60; }
.status-pending { background-color: #fef9e7; color: #f39c12; }

/* --- DISEÑO RESPONSIVO (CELULARES) --- */
@media (max-width: 768px) {
    body {
        padding: 15px 10px; /* Menos espacio en los bordes */
        background-size: 100% 100vh; /* Fuerza a que se vea todo el fondo estirado */
       background-attachment: fixed;
    }
    h1 {
        font-size: 1.5rem; /* Títulos más pequeños */
        margin-bottom: 15px;
    }
    .balance-amount {
        font-size: 2rem; /* Saldo más pequeño para que quepa */
    }
    .balance-actions {
        flex-wrap: wrap; /* Botones se acomodan en dos filas si es necesario */
        gap: 10px;
    }
    .action-btn {
        flex: 1 1 40%; /* Botones ocupan el ancho disponible */
        justify-content: center;
        font-size: 0.9rem;
        padding: 10px;
    }
    .contract-card {
        padding: 10px; /* Tarjetas más compactas */
    }
    .investment-amount {
        font-size: 1.3rem; /* Monto más pequeño en celular */
    }
    .detail-item {
        font-size: 0.75rem; /* Letra de detalles más chica */
        margin: 5px 0;
    }
    .modal-content {
        width: 85%; /* Modales más pequeños */
        margin: 5% auto; /* Subir el modal para que se vea completo */
        padding: 15px;
        max-height: 85vh; /* Altura máxima para evitar desbordamiento */
        overflow-y: auto; /* Scroll si el contenido es muy largo */
    }
    .modal-content h2 {
        font-size: 1.3rem; /* Título del modal más pequeño */
    }
    .transaction-table th, .transaction-table td {
        padding: 8px 5px; /* Tabla más compacta para que no se salga */
        font-size: 0.85rem;
    }
    .btn-invest {
        padding: 8px 10px;
        font-size: 0.8rem;
        border-radius: 25px;
    }
    /* Ajustes específicos para el modal de depósito en celular */
    .contenedor-pago {
        padding: 5px;
        margin: 10px auto;
    }
    .contenedor-pago img {
        width: 100px !important; /* QR más pequeño */
    }
    #wallet-address {
        font-size: 0.7rem !important; /* Dirección más pequeña */
    }
    .wallet-container {
        padding: 5px !important; /* Contenedor de dirección más compacto */
    }
}