:root {
    --brand-primary: #e60012;
    --brand-dark: #b3000e;
    --text-muted: #6b7280;
    --card-shadow: 0 8px 25px rgba(179, 0, 14, 0.08);
    --success-color: #10b981;
    --failed-color: #ef4444;
    --pending-color: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e7e9ef 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
    z-index: 0;
}

.main-container {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-bottom: 100px;
}

/* Header */
.page-header {
    background: transparent;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1000;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-circle {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: var(--brand-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .main {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.logo-text .sub {
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.action-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Content */
.content-wrapper {
    padding: 20px;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.card.text-center {
    text-align: center;
    padding: 40px 20px;
}

.card.text-center .fas {
    font-size: 64px;
    margin-bottom: 20px;
    color: #d1d5db;
}

.card.text-center p {
    margin-bottom: 15px;
}

.card.text-center .text-gray-500 {
    color: #6b7280;
    font-weight: 600;
    font-size: 18px;
}

.card.text-center .text-gray-400 {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 25px !important;
}

.inline-block.bg-red-600 {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.3);
    border: none;
    cursor: pointer;
}

.inline-block.bg-red-600:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 0, 18, 0.4);
}

.inline-block.bg-red-600:active {
    transform: translateY(-1px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-dark));
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-dark));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Action Buttons Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.action-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.action-label {
    font-size: 12px;
    color: #4b5563;
    font-weight: 600;
    text-align: center;
}

/* Banner Card */
.banner-card {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(230, 0, 18, 0.25);
    position: relative;
    overflow: hidden;
    color: white;
}

.banner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.banner-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.banner-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Section Title */
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--brand-primary);
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

/* Plan Card */
.plan-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.plan-header {
    padding: 20px;
    background: linear-gradient(135deg, rgba(230, 0, 18, 0.05), rgba(230, 0, 18, 0.02));
    border-bottom: 1px solid rgba(230, 0, 18, 0.1);
}

.plan-name {
    font-size: 20px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 5px;
}

.plan-duration {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-image {
    height: 140px;
    overflow: hidden;
}

.plan-details {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.plan-income {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.plan-income:last-child {
    margin-bottom: 0;
}

.income-label {
    color: #6b7280;
    font-weight: 500;
}

.income-value {
    font-weight: 700;
    color: #1f2937;
}

.plan-price {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(230, 0, 18, 0.03), rgba(230, 0, 18, 0.01));
}

.price-label {
    color: #6b7280;
    font-weight: 500;
}

.price-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--brand-primary);
}

/* Plan Button */
.plan-button {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
}

.plan-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.plan-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 0, 18, 0.4);
}

.plan-button:hover::before {
    left: 100%;
}

.plan-button:active {
    transform: translateY(-1px);
}

/* Team Level Card */
.level-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.level-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.level-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-header.level-1 {
    background: linear-gradient(135deg, rgba(230, 0, 18, 0.08), rgba(230, 0, 18, 0.04));
}

.level-header.level-2 {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(249, 115, 22, 0.04));
}

.level-header.level-3 {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(14, 165, 233, 0.04));
}

.level-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
}

.level-title.level-1 { color: #dc2626; }
.level-title.level-2 { color: #ea580c; }
.level-title.level-3 { color: #0284c7; }

.level-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.level-badge.level-1 {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.level-badge.level-2 {
    background: rgba(234, 88, 12, 0.15);
    color: #ea580c;
}

.level-badge.level-3 {
    background: rgba(2, 132, 199, 0.15);
    color: #0284c7;
}

.level-stats {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    border-top: 1px solid #f3f4f6;
}

.level-stat {
    text-align: center;
}

.level-stat-value {
    font-weight: 800;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 4px;
    word-break: break-word;
}

.level-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-input, .form-select {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
    border-color: var(--brand-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 0, 18, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Transaction Item */
.transaction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.transaction-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.icon-deposit {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.icon-withdrawal {
    background: linear-gradient(135deg, var(--failed-color), #dc2626);
}

.icon-bonus {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.icon-commission {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.transaction-details {
    flex-grow: 1;
}

.transaction-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.transaction-date {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.days-remaining {
    font-weight: 600;
    color: var(--brand-primary);
}

.days-expired {
    font-weight: 600;
    color: var(--failed-color);
}

.transaction-amount {
    font-weight: 800;
    font-size: 16px;
    text-align: right;
}

.amount-positive {
    color: var(--success-color);
}

.amount-negative {
    color: var(--failed-color);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.status-success { 
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-pending { 
    background: rgba(245, 158, 11, 0.1);
    color: var(--pending-color);
}

.status-failed { 
    background: rgba(239, 68, 68, 0.1);
    color: var(--failed-color);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    height: 72px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(230, 0, 18, 0.1);
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    padding: 0 10px;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
    padding: 8px;
    border-radius: 12px;
}

.nav-item:hover {
    background: rgba(230, 0, 18, 0.05);
}

.nav-item.active {
    color: var(--brand-primary);
    background: rgba(230, 0, 18, 0.08);
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.active-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-dark));
    border-radius: 3px 3px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item.active .active-indicator {
    opacity: 1;
}

/* Alert */
.alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #14532d;
}

/* Responsive */
@media (max-width: 480px) {
    .content-wrapper {
        padding: 16px;
    }
    
    .card {
        padding: 18px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .action-grid {
        gap: 10px;
    }
    
    .action-icon {
        width: 50px;
        height: 50px;
    }
    
    .plans-grid {
        gap: 12px;
    }
    
    .plan-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}