:root {
    --bg-color: var(--tg-theme-bg-color, #121212);
    --text-color: var(--tg-theme-text-color, #ffffff);
    --hint-color: var(--tg-theme-hint-color, #a0a0a0);
    --button-color: var(--tg-theme-button-color, #c8a2c8);
    --button-text-color: var(--tg-theme-button-text-color, #121212);
    --secondary-bg-color: var(--tg-theme-secondary-bg-color, #1e1e1e);
    --accent-color: var(--tg-theme-link-color, #e0b0ff);

    --nav-height: 70px;
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Outfit", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overscroll-behavior-y: none;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-family: "Syne", sans-serif;
    margin: 0;
    font-weight: 700;
}

.app-container {
    position: relative;
    height: calc(100vh - var(--nav-height) - var(--safe-area-bottom));
    overflow: hidden;
    padding-bottom: 0;
}

#tab-profile.active {
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

.app-header {
    padding: 20px 20px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    position: sticky;
    top: 0;
    background: linear-gradient(
        180deg,
        rgba(18, 18, 18, 0.96) 0%,
        rgba(18, 18, 18, 0.78) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10;
    margin: 0 -20px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
    margin-bottom: 20px;
}

.header-copy {
    min-width: 0;
    flex: 1;
}

.header-eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(224, 176, 255, 0.85);
    font-weight: 700;
}

.app-header h1 {
    font-size: 34px;
    letter-spacing: -1.2px;
    margin-bottom: 6px;
    background: linear-gradient(
        135deg,
        var(--text-color) 0%,
        var(--hint-color) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-subtitle {
    margin: 0;
    max-width: 240px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--hint-color);
}

.header-balance-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.balance-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.balance {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(224, 176, 255, 0.12);
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(224, 176, 255, 0.16);
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 24px rgba(224, 176, 255, 0.08);
}

.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.view {
    display: none;
    padding: 0 20px;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.view.active {
    display: block;
}

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

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

.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding-bottom: 20px;
}

.category-card {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.055) 0%,
        rgba(255, 255, 255, 0.025) 58%,
        rgba(224, 176, 255, 0.045) 100%
    );
    border-radius: 24px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at top right,
        rgba(224, 176, 255, 0.14),
        transparent 40%
    );
    pointer-events: none;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.02) 100%
    );
    pointer-events: none;
}

.category-card:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(224, 176, 255, 0.2);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.cat-thumb {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    object-fit: cover;
    background: linear-gradient(
        135deg,
        rgba(224, 176, 255, 0.22) 0%,
        rgba(200, 162, 200, 0.1) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 18px rgba(0, 0, 0, 0.16);
    flex-shrink: 0;
}

.cat-info {
    flex-grow: 1;
    min-width: 0;
}

.cat-name {
    font-family: "Syne", sans-serif;
    font-size: 22px;
    line-height: 1.02;
    margin-bottom: 8px;
    letter-spacing: -0.45px;
}

.cat-stats {
    font-size: 13px;
    color: var(--hint-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.4;
}

.cat-stats:empty::before {
    content: "No media available yet";
    color: rgba(255, 255, 255, 0.35);
}

.cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.cat-tag-muted {
    color: rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.025);
}

.cat-tag-accent {
    color: var(--accent-color);
    background: rgba(224, 176, 255, 0.12);
    border-color: rgba(224, 176, 255, 0.18);
}

.cat-chevron {
    color: var(--hint-color);
    font-size: 22px;
    opacity: 0.8;
    transform: translateX(2px);
}

.back-btn {
    background: none;
    border: none;
    color: var(--hint-color);
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    padding: 12px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.category-header h2 {
    font-size: 36px;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.media-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.type-btn {
    flex: 1;
    background: var(--secondary-bg-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    padding: 16px;
    border-radius: 16px;
    font-family: "Outfit", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.type-btn.active {
    background: var(--button-color);
    color: var(--button-text-color);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(200, 162, 200, 0.2);
}

.type-icon {
    font-size: 24px;
}

.stats-card {
    display: flex;
    background: var(--secondary-bg-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat:last-child {
    border-right: none;
}

.stat-value {
    font-family: "Syne", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 12px;
    color: var(--hint-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.buy-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    background: var(--button-color);
    color: var(--button-text-color);
    font-family: "Outfit", sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition:
        opacity 0.2s,
        transform 0.2s;
}

.buy-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--secondary-bg-color);
    color: var(--hint-color);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.mt-4 {
    margin-top: 24px;
}

.media-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--secondary-bg-color);
    cursor: pointer;
}

.media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
}

.play-icon::after {
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent white;
    margin-left: 4px;
}

.download-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.download-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.profile-card {
    padding: 30px 22px 24px;
    text-align: center;
    margin: 0 20px 14px;
}

.profile-label {
    color: var(--hint-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.profile-balance {
    font-size: 56px;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 0.95;
    letter-spacing: -1.6px;
    text-shadow: 0 8px 24px rgba(224, 176, 255, 0.14);
}

.bundles-card {
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px 40px 0 0;
    padding: 26px 24px 20px;
    border-top: none;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bundles-title {
    font-family: "Syne", sans-serif;
    font-size: 18px;
    color: var(--text-color);
    margin: 0 0 18px 0;
    letter-spacing: -0.3px;
}

.placeholder-content {
    text-align: center;
    padding: 56px 24px 40px;
    color: var(--hint-color);
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-area-bottom));
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    padding-bottom: var(--safe-area-bottom);
    border-top: none;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--hint-color);
    cursor: pointer;
    transition: color 0.2s;
    font-family: "Outfit", sans-serif;
    gap: 4px;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-icon {
    font-size: 22px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active .nav-icon {
    transform: translateY(-2px) scale(1.1);
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img,
.lightbox video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox video {
    outline: none;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.status {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    min-height: 16px;
}
.status.error {
    color: #ff6b6b;
}
.status.success {
    color: #51cf66;
}

/* Additional Library Styles */
.library-group {
    margin-bottom: 28px;
}

.library-group:last-child {
    margin-bottom: 0;
}

.library-group-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 28px 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    gap: 12px;
}

.library-group-header h3 {
    font-size: 21px;
    margin: 0;
    letter-spacing: -0.4px;
}

.library-group-count {
    color: var(--hint-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.library-container {
    padding: 0 20px 12px;
}

.load-more-container {
    text-align: center;
    margin: 32px 0 24px;
}

/* ============================================================================
   PAYMENT & TOP-UP STYLES
   ============================================================================ */

.payment-tabs-nav {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 4px;
}

.payment-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--hint-color);
    padding: 12px 8px;
    border-radius: 12px;
    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.payment-tab-btn.active {
    background: var(--secondary-bg-color);
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-tab-content {
    animation: fadeIn 0.3s ease;
}

.section {
    padding: 0 20px;
}

.section-title {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 4px;
    flex: 1;
    align-content: start;
}

.package-card {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.045) 100%
    );
    border-radius: 18px;
    padding: 14px;
    cursor: pointer;
    transition:
        transform 0.2s,
        background 0.2s,
        border-color 0.2s,
        box-shadow 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 92px;
}

.package-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.package-card:active {
    transform: translateY(0);
}

.package-credits {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    font-family: "Syne", sans-serif;
    letter-spacing: -0.3px;
    line-height: 1.05;
}

.package-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.package-price {
    font-size: 16px;
    color: var(--accent-color);
    font-weight: 700;
}

.package-discount {
    display: inline-flex;
    align-items: center;
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 12px;
    white-space: nowrap;
}



.qr-container {
    margin: 16px 0;
}

.qr-container img {
    max-width: 200px;
    border-radius: 12px;
    background: white;
    padding: 8px;
}

.address-container {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 16px 0;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
}

.address-container code {
    flex: 1;
    font-size: 12px;
    word-break: break-all;
    color: var(--hint-color);
}

.copy-btn {
    padding: 8px 12px;
    background: var(--button-color);
    color: var(--button-text-color);
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.payment-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffc107;
    animation: pulse 2s infinite;
}

.payment-status.completed .status-dot {
    background: #4caf50;
    animation: none;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}



.ton-status-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* TonConnectUI Modal Overlay — Ensure it renders above payment modal */
[id^="tc-widget-root"] {
    z-index: 10000;
}

/* ── Bundles Card Wallet Button ── */

.bundles-wallet-container {
    margin-bottom: 16px;
}

.bundles-wallet-btn {
    width: 100%;
    padding: 14px 20px;
    background: #0098EA;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.bundles-wallet-btn:hover {
    background: #0088d4;
}

.bundles-wallet-btn:active {
    transform: scale(0.98);
}

.bundles-wallet-btn .wallet-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

/* Disconnect button (when wallet is connected) */
.bundles-wallet-btn.disconnect {
    width: auto;
    background: rgba(35, 46, 60, 0.85); /* Darker than --secondary-bg-color */
    color: var(--text-color);
    border: 3px solid rgba(255, 255, 255, 0.12); /* Lighter border */
}

.bundles-wallet-btn.disconnect:hover {
    background: rgba(130, 30, 30, 0.15);
}

.bundles-wallet-btn.disconnect .wallet-icon {
    opacity: 0.9;
}

/* Crypto Tab Inline Styles */
.crypto-package-card {
    cursor: pointer;
}

.crypto-payment-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.crypto-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--secondary-bg-color);
}

.back-btn-inline {
    align-self: flex-start;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.back-btn-inline:hover {
    color: var(--button-color);
}

.crypto-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.crypto-price {
    font-size: 16px;
    color: var(--hint-color);
}

.crypto-currency-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crypto-currency-section h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hint-color);
}

.crypto-currency-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.crypto-currency-btn {
    padding: 12px;
    background: var(--secondary-bg-color);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    font-family: "Outfit", sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.crypto-currency-btn:hover {
    border-color: var(--accent-color);
    background: var(--button-color);
}

.crypto-inline-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--secondary-bg-color);
    border-radius: 16px;
}

.crypto-inline-details h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hint-color);
}

.crypto-amount-text {
    margin: 0;
    font-size: 14px;
    text-align: center;
}

/* TON Tab Inline Styles */
.ton-tab-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ton-wallet-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--secondary-bg-color);
    border-radius: 16px;
}

.ton-balance-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ton-balance-label {
    font-size: 14px;
    color: var(--hint-color);
}

.ton-balance-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}

.ton-balance-usd {
    font-size: 14px;
    color: var(--hint-color);
}

.ton-deposit-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ton-input-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.ton-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ton-amount-input {
    width: 100%;
    padding: 16px;
    padding-right: 60px;
    background: var(--secondary-bg-color);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    font-family: "Outfit", sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ton-amount-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.ton-amount-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ton-currency-suffix {
    position: absolute;
    right: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--hint-color);
    pointer-events: none;
}

.ton-min-note {
    font-size: 12px;
    color: var(--hint-color);
    margin-top: -8px;
}

.ton-quote-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--secondary-bg-color);
    border-radius: 12px;
}

.ton-quote-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.ton-quote-credits {
    color: var(--accent-color);
    font-size: 16px;
}

.ton-quote-rate {
    color: var(--hint-color);
    font-size: 12px;
}

.ton-deposit-btn {
    width: 100%;
    padding: 16px;
    background: var(--button-color);
    color: var(--button-text-color);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: "Outfit", sans-serif;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ton-deposit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ton-inline-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 14px;
    color: var(--hint-color);
}

.ton-inline-status.completed {
    color: #4caf50;
}

.ton-inline-status.error {
    color: #f44336;
}
