:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --text-primary: #ffffff;
    --text-secondary: #8b8b9e;
    --accent: #6c5ce7;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --green: #00d26a;
    --gold: #ffd700;
    --border: rgba(255, 255, 255, 0.06);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.app {
    max-width: 100%;
    padding: 0 16px 100px;
}

/* Header */
.header {
    text-align: center;
    padding: 32px 0 24px;
    position: relative;
}

.header-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse, var(--accent-glow), transparent 70%);
    pointer-events: none;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #a29bfe 50%, #6c5ce7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 6px;
}

/* Product Cards */
.products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.product-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(108, 92, 231, 0.05));
    opacity: 0;
    transition: opacity 0.2s;
}

.product-card:hover,
.product-card:active {
    background: var(--bg-card-hover);
    border-color: rgba(108, 92, 231, 0.2);
    transform: translateY(-1px);
}

.product-card:hover::before,
.product-card:active::before {
    opacity: 1;
}

.card-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    flex-shrink: 0;
}

.card-info {
    flex: 1;
}

.card-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.card-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-arrow {
    font-size: 18px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.product-card:hover .card-arrow {
    transform: translateX(3px);
    color: var(--accent);
}

/* Pages */
.page {
    animation: slideIn 0.25s ease;
}

.page.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0 20px;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.back-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 18px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.back-btn:hover {
    background: var(--bg-card-hover);
}

/* Amounts Grid */
.amounts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.amount-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    padding: 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.amount-btn:hover,
.amount-btn:active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.amount-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
}

/* Custom Input */
.custom-input {
    display: flex;
    gap: 10px;
}

.custom-input input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 15px;
    padding: 14px 16px;
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.2s;
}

.custom-input input::placeholder {
    color: var(--text-secondary);
}

.custom-input input:focus {
    border-color: var(--accent);
}

.custom-btn {
    background: var(--accent);
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.custom-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.footer b {
    color: var(--accent);
}

.footer-sub {
    margin-top: 4px;
    font-size: 11px;
    color: rgba(139, 139, 158, 0.6);
}

/* Telegram theme adaptation */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f5f5f7;
        --bg-secondary: #ffffff;
        --bg-card: #ffffff;
        --bg-card-hover: #f0f0f5;
        --text-primary: #1a1a2e;
        --text-secondary: #6b6b80;
        --border: rgba(0, 0, 0, 0.08);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 2px;
}
