/* ============================================
   BIT Platform — Premium Fintech Design System
   ============================================ */

/* === CSS Variables === */
:root {
    --bg-primary: #060d1b;
    --bg-secondary: #0a1628;
    --bg-card: #0f1d35;
    --bg-card-hover: #132444;
    --bg-glass: rgba(15, 29, 53, 0.7);
    --bg-glass-light: rgba(30, 58, 100, 0.15);

    --text-primary: #f0f4ff;
    --text-secondary: #94a3c4;
    --text-muted: #5a6d8a;

    --accent-purple: #7c3aed;
    --accent-blue: #2563eb;
    --accent-teal: #26a17b;
    --accent-gold: #f7931a;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-amber: #f59e0b;
    --accent-pink: #ec4899;

    --gradient-main: linear-gradient(135deg, #7c3aed, #2563eb);
    --gradient-teal: linear-gradient(135deg, #26a17b, #22c55e);
    --gradient-gold: linear-gradient(135deg, #f7931a, #f59e0b);

    --border-color: rgba(94, 130, 190, 0.12);
    --border-active: rgba(124, 58, 237, 0.4);

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 48px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
    --shadow-glow-teal: 0 0 40px rgba(38, 161, 123, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --font-family: 'Cairo', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden { display: none !important; }

/* === Animated Background === */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(94, 130, 190, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(94, 130, 190, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.bg-glow-1 {
    width: 500px; height: 500px;
    background: rgba(124, 58, 237, 0.08);
    top: -200px; right: -100px;
    animation-delay: 0s;
}

.bg-glow-2 {
    width: 400px; height: 400px;
    background: rgba(37, 99, 235, 0.06);
    top: 50%; left: -150px;
    animation-delay: -7s;
}

.bg-glow-3 {
    width: 350px; height: 350px;
    background: rgba(38, 161, 123, 0.05);
    bottom: -100px; right: 20%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 30px) scale(1.02); }
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 0;
    background: rgba(6, 13, 27, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header.scrolled {
    padding: 8px 0;
    background: rgba(6, 13, 27, 0.95);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 101;
}

.logo-icon {
    display: flex;
    transition: transform 0.3s;
}

.logo:hover .logo-icon {
    transform: rotate(-5deg) scale(1.05);
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-dot {
    color: var(--accent-purple);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transition: transform var(--transition);
    border-radius: 1px;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 101;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 13, 27, 0.98);
    z-index: 99;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-nav-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

.mobile-nav-link {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color var(--transition);
}

.mobile-nav-link:hover {
    color: var(--accent-purple);
}

/* === Hero === */
.hero {
    position: relative;
    z-index: 1;
    padding: 140px 0 80px;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: var(--bg-glass-light);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--gradient-main);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 100px;
    transition: all var(--transition);
    box-shadow: 0 4px 24px rgba(124, 58, 237, 0.3);
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

.hero-cta svg {
    transition: transform 0.3s;
}

.hero-cta:hover svg {
    transform: translateX(-4px);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 48px;
    padding: 20px 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border-color);
}

/* === Section Header === */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* === Buy Section === */
.buy-section {
    position: relative;
    z-index: 1;
    padding: 60px 0 80px;
}

.buy-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}

.buy-card:hover {
    border-color: var(--border-active);
}

/* Calc Header */
.calc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.calc-header svg {
    color: var(--accent-purple);
}

.calc-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

/* Toggle */
.calc-toggle {
    display: flex;
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 20px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition);
    z-index: 1;
    text-align: center;
}

.toggle-btn.active {
    color: var(--text-primary);
}

.toggle-slider {
    position: absolute;
    top: 4px;
    right: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--bg-card-hover);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.calc-toggle[data-mode="crypto"] .toggle-slider {
    right: auto;
    left: 4px;
}

/* Input Groups */
.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

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

.calc-input {
    width: 100%;
    padding: 14px 16px;
    padding-left: 80px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    text-align: right;
}

.calc-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.calc-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Hide number input spinners */
.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.calc-input[type=number] {
    -moz-appearance: textfield;
}

.input-currency {
    position: absolute;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

.input-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.input-hint.error {
    color: var(--accent-red);
}

/* Fee Breakdown */
.fee-breakdown {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 20px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
}

.fee-label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.fee-value {
    font-weight: 600;
    color: var(--text-primary);
}

.fee-highlight {
    color: var(--accent-amber) !important;
    font-size: 0.85rem;
}

.fee-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.fee-total {
    padding-top: 12px;
}

.fee-total .fee-label {
    color: var(--text-primary);
    font-weight: 600;
}

.fee-total .fee-value {
    font-size: 1.15rem;
    font-weight: 800;
    background: var(--gradient-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Network Section */
.network-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}

.network-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.network-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.network-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(124, 58, 237, 0.2);
}

.network-card.selected {
    border-color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.08);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.network-card input {
    display: none;
}

.network-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.network-icon span {
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
}

.network-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.network-name {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.network-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 600;
}

.network-badge.recommended {
    background: rgba(38, 161, 123, 0.15);
    color: var(--accent-teal);
}

.network-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.network-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.network-check {
    color: var(--text-muted);
    transition: color var(--transition);
}

.network-card.selected .network-check {
    color: var(--accent-purple);
}

/* ERC20 Warning */
.erc20-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--accent-amber);
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

.erc20-warning svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Wallet Section */
.wallet-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}

.wallet-input-wrapper {
    position: relative;
}

.wallet-input {
    padding-left: 90px !important;
    padding-right: 16px !important;
    text-align: left !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px;
    font-family: 'Courier New', monospace;
}

.paste-btn {
    position: absolute;
    left: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--gradient-main);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.paste-btn:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.wallet-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.wallet-hint.error {
    color: var(--accent-red);
}

/* Warning Section */
.warning-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-md);
}

.warning-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.warning-checkbox-wrapper input {
    display: none;
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 2px solid var(--accent-red);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    margin-top: 2px;
}

.custom-checkbox svg {
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition);
}

.warning-checkbox-wrapper input:checked ~ .custom-checkbox {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

.warning-checkbox-wrapper input:checked ~ .custom-checkbox svg {
    opacity: 1;
    transform: scale(1);
}

.warning-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.warning-text strong {
    color: var(--accent-red);
}

/* Buy Button */
.buy-btn {
    width: 100%;
    padding: 16px;
    margin-top: 24px;
    background: var(--gradient-main);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
    position: relative;
    overflow: hidden;
}

.buy-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.buy-btn:not(:disabled):hover::before {
    transform: translateX(100%);
}

.buy-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.35);
}

.buy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.buy-btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Security Badge */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* === How Section === */
.how-section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

.steps-grid {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
}

.step-card {
    flex: 1;
    max-width: 280px;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition);
    position: relative;
}

.step-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}

.step-number {
    position: absolute;
    top: -16px;
    right: 24px;
    width: 36px;
    height: 36px;
    background: var(--gradient-main);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.step-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.step-connector {
    display: flex;
    align-items: center;
    padding: 0 8px;
}

/* === Features === */
.features-section {
    position: relative;
    z-index: 1;
    padding: 40px 0 80px;
}

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

.feature-card {
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === FAQ === */
.faq-section {
    position: relative;
    z-index: 1;
    padding: 40px 0 80px;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition);
}

.faq-item[open] {
    border-color: var(--border-active);
}

.faq-question {
    padding: 18px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: color var(--transition);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--accent-purple);
}

.faq-icon {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.faq-item[open] .faq-icon {
    transform: rotate(45deg);
    color: var(--accent-purple);
}

.faq-answer {
    padding: 0 20px 18px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.8;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Footer === */
.footer {
    position: relative;
    z-index: 1;
    padding: 40px 0 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.footer-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 12px;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent-purple);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-powered a {
    color: var(--accent-purple);
    transition: color var(--transition);
}

.footer-powered a:hover {
    color: var(--accent-blue);
}

/* === Modals === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

/* Transak Modal */
.modal-container {
    width: 100%;
    max-width: 480px;
    height: 85vh;
    max-height: 700px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background var(--transition);
    color: var(--text-secondary);
}

.modal-close:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow: hidden;
}

/* Warning Modal */
.warning-modal-container {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

.warning-modal-icon {
    margin-bottom: 20px;
}

.warning-modal-container h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.warning-modal-text {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.warning-modal-text p {
    margin-bottom: 12px;
}

.warning-highlight {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    padding: 14px;
    color: var(--accent-red);
    font-size: 0.88rem;
    line-height: 1.8;
}

.warning-modal-actions {
    display: flex;
    gap: 12px;
}

.warning-cancel-btn {
    flex: 1;
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.warning-cancel-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.warning-confirm-btn {
    flex: 1;
    padding: 14px;
    background: var(--gradient-main);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

.warning-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: var(--accent-teal); }
.toast.error { border-color: var(--accent-red); }
.toast.warning { border-color: var(--accent-amber); }

/* === Animations === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .step-connector {
        transform: rotate(90deg);
        padding: 4px 0;
    }

    .step-card {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 12px;
        padding: 16px 20px;
    }

    .stat-divider {
        width: 80%;
        height: 1px;
    }

    .buy-card {
        padding: 24px 18px;
    }

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

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .warning-modal-actions {
        flex-direction: column;
    }

    .modal-container {
        height: 90vh;
        max-height: none;
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 400px) {
    .container {
        padding: 0 14px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .buy-card {
        padding: 20px 14px;
    }

    .calc-input {
        font-size: 1rem;
    }
}

/* === PWA Standalone === */
@media (display-mode: standalone) {
    .header {
        padding-top: env(safe-area-inset-top);
    }
}
