/**
 * Custom Styles for Network Referral Platform
 * Mobile-first responsive design
 */

/* Root variables */
:root {
    --primary-color: #4e73df;
    --secondary-color: #224abe;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-bg: #f8f9fc;
    --dark-text: #5a5c69;
}

/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    overflow-x: hidden;
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.shadow-lg-custom {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Card animations */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
}

/* Wallet card special styling */
.wallet-card {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.wallet-balance {
    font-size: 36px;
    font-weight: bold;
    margin: 20px 0;
}

/* Button styles */
.btn {
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-lg-custom {
    padding: 15px 30px;
    font-size: 18px;
    width: 100%;
    margin-bottom: 10px;
}

/* Form styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e3e6f0;
    padding: 12px 15px;
    font-size: 16px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Bottom navigation improvements */
.bottom-nav {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-item {
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 10px;
}

.nav-item:active {
    transform: scale(0.9);
    background-color: rgba(78, 115, 223, 0.1);
}

/* Stat cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin: 15px 0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
}

.stat-card i {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    margin-bottom: 15px;
}

.stat-card.primary i {
    background: rgba(78, 115, 223, 0.1);
    color: var(--primary-color);
}

.stat-card.success i {
    background: rgba(28, 200, 138, 0.1);
    color: var(--success-color);
}

.stat-card.info i {
    background: rgba(54, 185, 204, 0.1);
    color: var(--info-color);
}

.stat-card.warning i {
    background: rgba(246, 194, 62, 0.1);
    color: var(--warning-color);
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Alert customization */
.alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Badge styles */
.badge {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
}

/* List group customization */
.list-group-item {
    border: none;
    border-radius: 10px !important;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(78, 115, 223, 0.05);
    transform: translateX(5px);
}

/* Table styles */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wallet-balance {
        font-size: 28px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-lg-custom {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card i {
        width: 50px;
        height: 50px;
    }
}

/* Print styles */
@media print {
    .bottom-nav,
    .navbar,
    .no-print {
        display: none !important;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Modal customization */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-footer {
    border-top: 2px solid #e3e6f0;
}

/* Progress bars */
.progress {
    height: 10px;
    border-radius: 10px;
    background-color: #e3e6f0;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
}

/* Avatar/Profile images */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.avatar-lg {
    width: 80px;
    height: 80px;
}

/* Tree view styling */
.tree-node {
    padding: 15px;
    margin: 10px 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tree-node:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.tree-node.active {
    border-left: 4px solid var(--success-color);
}

.tree-node.inactive {
    opacity: 0.6;
}
