* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4c9aff;
    --primary-dark: #2e7ee6;
    --secondary: #f0f8ff;
    --accent: #00d4ff;
    --success: #00b894;
    --danger: #ff4757;
    --warning: #ffa502;
    --dark: #0a0a0a;
    --dark-light: #1a1a1a;
    --dark-medium: #2a2a2a;
    --gray: #666666;
    --gray-light: #888888;
    --gray-dark: #333333;
    --white: #ffffff;
    --text-light: #cccccc;
    --border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 16px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.wallet-display {
    background: linear-gradient(135deg, var(--success), #00cc74);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.3);
}

.wallet-icon {
    font-size: 20px;
    color: white;
}

.wallet-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.wallet-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-widget {
    background: linear-gradient(135deg, var(--warning), #fab1a0);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(253, 203, 110, 0.4);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    color: var(--text-light);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 32px 0 24px 0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateX(-4px);
}

/* Add Money Section */
.add-money-section {
    background: linear-gradient(145deg, var(--dark-light), var(--dark-medium));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.add-money-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success), var(--accent));
}

.add-money-section h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.add-money-section p {
    color: var(--gray-light);
    margin-bottom: 32px;
    font-size: 16px;
}

.money-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.money-option {
    background: var(--dark);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.money-option:hover {
    border-color: var(--success);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 184, 148, 0.15);
}

.money-option.selected {
    border-color: var(--success);
    background: rgba(0, 184, 148, 0.1);
    box-shadow: 0 8px 24px rgba(0, 184, 148, 0.2);
}

.money-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 8px;
}

.money-bonus {
    color: var(--warning);
    font-size: 13px;
    font-weight: 600;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    background: var(--dark-light);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.nav-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab.active,
.nav-tab:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    transform: translateY(-2px);
}

/* Filters */
.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 12px 16px;
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 154, 255, 0.1);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.product-card {
    background: linear-gradient(145deg, var(--dark-light), var(--dark-medium));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(76, 154, 255, 0.15);
    border-color: rgba(76, 154, 255, 0.3);
}

.product-header {
    text-align: center;
    margin-bottom: 24px;
}

.product-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 32px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.product-image .fallback-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    color: white;
}

.product-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.product-description {
    color: var(--gray-light);
    font-size: 15px;
    line-height: 1.6;
}

.product-features {
    margin: 24px 0;
}

.features-title {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
    font-size: 16px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: var(--text-light);
    font-size: 14px;
}

.feature-item i {
    color: var(--success);
    margin-right: 12px;
    width: 16px;
}

.subscription-options {
    margin: 24px 0;
}

.subscription-title {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
    font-size: 16px;
}

.subscription-grid {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.subscription-option {
    background: var(--dark);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 110px;
    max-width: 140px;
}

.subscription-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.subscription-option.selected {
    border-color: var(--success);
    background: rgba(0, 184, 148, 0.1);
}

.subscription-period {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 6px;
    font-size: 15px;
}

.subscription-price {
    color: var(--success);
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 4px;
}

.subscription-savings {
    color: var(--warning);
    font-size: 12px;
    margin-top: 2px;
    font-weight: 500;
    line-height: 1.2;
}

.product-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.btn-add-cart {
    flex: 1;
    background: linear-gradient(135deg, var(--success), #00cc74);
    color: white;
    font-size: 16px;
    padding: 14px 24px;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 184, 148, 0.3);
}

.btn-add-cart:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(76, 154, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--dark-light);
    color: var(--white);
    border-color: var(--primary);
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.cart-modal.active {
    display: flex;
}

.cart-content {
    background: var(--dark-light);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.cart-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--dark-medium);
}

.cart-header h3 {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--danger);
    color: white;
}

.cart-items {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 16px;
    background: var(--dark);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-right: 16px;
    overflow: hidden;
    position: relative;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.cart-item-image .fallback-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: white;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
    font-size: 16px;
}

.cart-item-subscription {
    color: var(--gray-light);
    font-size: 13px;
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--success);
    font-weight: 700;
    font-size: 18px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.quantity-btn:hover {
    transform: scale(1.1);
}

.quantity-display {
    padding: 6px 12px;
    background: var(--dark-medium);
    border-radius: 8px;
    color: var(--white);
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.remove-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    transform: scale(1.1);
}

.cart-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    background: var(--dark-medium);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.cart-total-amount {
    color: var(--success);
    font-size: 24px;
}

.cart-actions {
    display: flex;
    gap: 16px;
}

.cart-empty {
    text-align: center;
    padding: 40px 24px;
    color: var(--gray-light);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    nav {
        flex-direction: column;
        gap: 16px;
    }

    .header-right {
        flex-direction: column;
        gap: 12px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .money-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .subscription-grid {
        grid-template-columns: 1fr;
    }

    .cart-content {
        width: 95%;
        margin: 20px;
    }

    .filters {
        flex-direction: column;
    }
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}
