
.app-container {
    min-height: 100vh;
    background: var(--bg-secondary);
    padding-bottom: 90px;
    position: relative;
    overflow-x: hidden;
}

.background-effects {
    display: none;
}

.brand-hero-zone {
    position: relative;
    background: var(--hz-brand-hero);
    padding-bottom: 20px;
    overflow: hidden;
}

.brand-hero-zone::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.brand-hero-zone::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -60px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.app-header {
    position: relative;
    z-index: 100;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
}

.header-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 18px 20px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-section {
    width: 100%;
    text-align: center;
}

.brand-title {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    font-family: var(--font-family);
    line-height: 1.2;
}

.brand-tagline {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
}

.brand-sep {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1;
}

.brand-name {
    font-size: 24px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 0.04em;
}

.balance-display {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    width: fit-content;
    max-width: 100%;
}

.balance-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: 100%;
    margin-bottom: 2px;
}

.balance-value {
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
    font-family: var(--font-family);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.balance-currency {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.service-button {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    padding: 0;
    backdrop-filter: blur(8px);
}

.service-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: none;
    transform: none;
}

.service-button svg {
    width: 20px;
    height: 20px;
    color: #FFFFFF;
    transition: color 0.2s ease;
}

.service-button:hover svg {
    color: #FFFFFF;
    transform: none;
}

.main-content {
    position: relative;
    z-index: 10;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 20px 0;
    background: var(--bg-page);
    border-radius: 28px 28px 0 0;
    margin-top: -16px;
    box-shadow: 0 -8px 32px rgba(26, 26, 46, 0.1);
}

.hero-section {
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    padding: 0 16px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-banner {
    position: relative;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    border: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(92, 10, 20, 0.08) 0%,
        transparent 35%,
        rgba(92, 10, 20, 0.25) 75%,
        rgba(92, 10, 20, 0.55) 100%
    );
    pointer-events: none;
    z-index: 3;
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    box-shadow:
        inset 0 0 30px rgba(255, 255, 255, 0.08),
        inset 0 -20px 40px rgba(92, 10, 20, 0.35);
    pointer-events: none;
    z-index: 4;
}

.banner-wrapper {
    position: absolute;
    inset: 0;
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    background: #1a1020;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: saturate(1.05);
}

.banner-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(92, 10, 20, 0.35) 0%,
        rgba(139, 21, 56, 0.2) 45%,
        transparent 100%
    );
    z-index: 2;
}

.default-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--gradient-dark);
    position: relative;
}

.banner-content {
    text-align: center;
    z-index: 2;
}

.banner-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    font-family: var(--font-family);
    letter-spacing: 0.08em;
    text-shadow: none;
}

.banner-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.banner-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.indicator.active {
    width: 24px;
    height: 6px;
    border-radius: 3px;
    background: #FFFFFF;
    box-shadow: none;
    transform: none;
}

.banner-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--gradient-dark);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--accent-gradient);
    border-radius: 16px;
    box-shadow: var(--shadow-glow-primary);
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    font-family: var(--font-family);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.title-accent {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 0;
    box-shadow: none;
}

.actions-section {
    margin-bottom: 40px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.action-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-primary);
}

.action-card:hover::after {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;
    background: rgba(139, 21, 56, 0.1);
    border: 1px solid rgba(139, 21, 56, 0.15);
    color: var(--accent-primary);
}

.recharge-card .card-icon,
.withdraw-card .card-icon,
.revenue-card .card-icon,
.service-card .card-icon {
    background: rgba(139, 21, 56, 0.1);
    color: var(--accent-primary);
}

.action-card:hover .card-icon {
    transform: none;
    box-shadow: none;
    color: #FFFFFF;
    background: var(--accent-gradient);
    border-color: transparent;
}

.recharge-card:hover .card-icon,
.withdraw-card:hover .card-icon,
.revenue-card:hover .card-icon,
.service-card:hover .card-icon {
    background: var(--accent-gradient);
    color: #FFFFFF;
    border-color: transparent;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}

.action-card:hover .card-icon svg {
    transform: none;
}

.card-content {
    text-align: center;
    flex: 1;
}

.card-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.card-description {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.card-balance {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
}

.investment-section {
    margin-bottom: 32px;
}

.investment-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: var(--text-muted);
}

.loading-state p {
    margin: 0;
    font-size: 14px;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    animation: slideInCard 0.4s ease forwards;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card[data-idx="0"] { animation-delay: 0s; }
.product-card[data-idx="1"] { animation-delay: 0.05s; }
.product-card[data-idx="2"] { animation-delay: 0.1s; }
.product-card[data-idx="3"] { animation-delay: 0.15s; }
.product-card[data-idx="4"] { animation-delay: 0.2s; }
.product-card[data-idx="5"] { animation-delay: 0.25s; }

@keyframes slideInCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    border-color: rgba(139, 21, 56, 0.35);
    box-shadow: 0 8px 28px rgba(139, 21, 56, 0.12);
}

.product-visual {
    position: relative;
    height: 168px;
    overflow: hidden;
    background: #FFFFFF;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-visual-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(92, 10, 20, 0.15) 0%,
        transparent 40%,
        rgba(92, 10, 20, 0.75) 100%
    );
    pointer-events: none;
}

.product-title {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.15;
    letter-spacing: 0.02em;
    z-index: 2;
    font-family: var(--font-family);
}

.product-body {
    padding: 18px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-total-block {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.total-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding-bottom: 6px;
}

.total-amount {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
}

.total-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-family);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.product-metrics {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    min-width: 0;
}

.metric-divider {
    width: 1px;
    align-self: stretch;
    background: var(--border-color);
    flex-shrink: 0;
    margin: 4px 0;
}

.metric-period {
    align-items: center;
}

.metric-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.metric-unit {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

.metric-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 6px;
}

.metric-price .metric-label,
.metric-daily .metric-label {
    order: -1;
    margin-top: 0;
    margin-bottom: 4px;
}

.metric-price .metric-value,
.metric-daily .metric-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.metric-price .metric-value small,
.metric-daily .metric-value small {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 1px;
}

.total-value small {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 1px;
}

.invest-button {
    width: 100%;
    padding: 14px 20px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-inverse);
    text-transform: none;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-glow-primary);
    position: relative;
    overflow: hidden;
}

.invest-button::before {
    display: none;
}

.invest-button:hover {
    transform: none;
    background: var(--accent-secondary);
    box-shadow: var(--shadow-glow-secondary);
}

.invest-button:active {
    transform: none;
}

.pulse-ring {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast-notification {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 16px 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-medium);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
    font-weight: 500;
    backdrop-filter: blur(12px);
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.success {
    background: rgba(42, 157, 143, 0.1);
    color: var(--success);
    border-color: rgba(42, 157, 143, 0.35);
    box-shadow: none;
}

.toast-notification.error {
    background: rgba(230, 57, 70, 0.08);
    color: var(--danger);
    border-color: rgba(230, 57, 70, 0.35);
    box-shadow: none;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 46, 0.5);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.balance-selection-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.balance-modal-overlay {
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.balance-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-medium);
    animation: modalSlideUp 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.balance-modal-content::before {
    display: none;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(16px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.balance-modal-title {
    font-family: var(--font-family);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
    text-transform: none;
}

.balance-modal-amount {
    font-family: var(--font-family);
    font-size: 28px;
    font-weight: 300;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 0.06em;
}

.balance-modal-tip {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border-left: 2px solid var(--accent-primary);
    line-height: 1.6;
}

.balance-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.balance-option {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    text-align: left;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.balance-option::before {
    display: none;
}

.balance-option:not(.disabled):hover {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
    transform: none;
    box-shadow: none;
}

.balance-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

.balance-option.selected {
    background: rgba(230, 57, 70, 0.06);
    border-color: var(--accent-primary);
    box-shadow: none;
}

.balance-option.selected::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.option-label {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.option-tag {
    font-size: 10px;
    color: var(--text-inverse);
    background: var(--warning);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.option-balance {
    font-family: var(--font-family);
    font-size: 22px;
    font-weight: 300;
    color: var(--accent-primary);
    letter-spacing: 0.06em;
}

.option-insufficient {
    font-size: 13px;
    color: var(--danger);
    margin-top: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.option-insufficient::before {
    content: '';
}

.balance-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.balance-modal-confirm {
    width: 100%;
    padding: 14px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    font-family: var(--font-family);
    text-transform: none;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-glow-primary);
}

.balance-modal-confirm:hover:not(:disabled) {
    transform: none;
    background: var(--accent-secondary);
    box-shadow: none;
}

.balance-modal-confirm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.balance-modal-cancel {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-family: var(--font-family);
}

.balance-modal-cancel:hover {
    background: transparent;
    border-color: var(--text-muted);
    transform: none;
    box-shadow: none;
}

@media (max-width: 480px) {
    .header-container {
        padding: 14px 16px 6px;
    }

    .brand-name {
        font-size: 22px;
    }

    .brand-tagline {
        font-size: 10px;
    }

    .main-content {
        padding: 20px 16px 0;
        border-radius: 24px 24px 0 0;
        margin-top: -14px;
    }

    .hero-section {
        padding: 0 12px;
    }

    .hero-banner {
        border-radius: 20px;
    }

    .hero-banner::after {
        border-radius: 20px;
    }

    .banner-title {
        font-size: 28px;
    }

    .actions-grid {
        gap: 10px;
    }

    .action-card {
        padding: 16px 12px;
    }

    .card-icon {
        width: 44px;
        height: 44px;
    }

    .card-title {
        font-size: 14px;
    }

    .product-visual {
        height: 150px;
    }

    .product-title {
        font-size: 19px;
    }

    .total-value {
        font-size: 30px;
    }

    .metric-num {
        font-size: 24px;
    }

    .metric-daily .metric-value {
        font-size: 15px;
    }

    .balance-modal-content {
        padding: 24px;
        max-width: 100%;
        margin: 16px;
    }

    .balance-modal-amount {
        font-size: 24px;
    }

    .option-balance {
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .brand-name {
        font-size: 20px;
    }

    .banner-title {
        font-size: 24px;
    }

    .product-visual {
        height: 140px;
    }

    .product-title {
        font-size: 17px;
    }

    .total-value {
        font-size: 26px;
    }
}
