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

html, body {
    height: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

:root {
    --bg-primary: #0a0f0a;
    --bg-secondary: #0d1a0d;
    --bg-tertiary: #122912;
    --text-primary: #ffffff;
    --text-secondary: #98b298;
    --text-tertiary: #5e755e;
    --accent: #00e676;
    --accent-hover: #00c853;
    --neon-gold: #00e676;
    --neon-gold-light: #33ff99;
    --border: rgba(0, 230, 118, 0.15);
    --border-hover: rgba(0, 230, 118, 0.3);
    --green: #00ff88;
    --red: #ff4d4d;
    --orange: #F3841E;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    background: url('tervix.png') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    pointer-events: none;
    z-index: -2;
}

#networkCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

#app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* ========== HEADER ========== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(6px, 1.5vw, 12px) clamp(10px, 3vw, 24px);
    background: rgba(10, 15, 14, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid rgba(0, 230, 118, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    overflow: visible;
    flex-shrink: 0;
    gap: clamp(4px, 1.5vw, 12px);
    min-height: clamp(40px, 8vw, 56px);
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 8px);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: clamp(14px, 3vw, 20px);
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.5);
    white-space: nowrap;
}

.logo img {
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
    border-radius: 50%;
}

.nav {
    display: flex;
    gap: clamp(2px, 0.8vw, 8px);
    flex-shrink: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: clamp(5px, 1.2vw, 8px) clamp(8px, 2vw, 12px);
    border-radius: clamp(8px, 2vw, 12px);
    font-weight: 500;
    font-size: clamp(12px, 2.5vw, 14px);
    transition: all 0.2s;
    white-space: nowrap;
}

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

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.header-right {
    display: flex;
    gap: clamp(4px, 1.2vw, 8px);
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.network-btn {
    display: flex;
    align-items: center;
    gap: clamp(3px, 0.8vw, 6px);
    padding: clamp(5px, 1.2vw, 8px) clamp(6px, 1.5vw, 12px);
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: clamp(8px, 2vw, 12px);
    color: var(--text-primary);
    font-size: clamp(10px, 2.5vw, 14px);
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.network-btn:hover {
    border-color: var(--neon-gold);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

.network-icon {
    width: clamp(16px, 3vw, 20px);
    height: clamp(16px, 3vw, 20px);
    border-radius: 50%;
    object-fit: cover;
}

.wallet-btn {
    padding: clamp(5px, 1.2vw, 8px) clamp(10px, 2.5vw, 16px);
    background: linear-gradient(135deg, var(--accent), var(--neon-gold));
    border: none;
    border-radius: 24px;
    color: white;
    font-size: clamp(11px, 2.5vw, 14px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.wallet-btn.connected {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 8px);
    padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 14px) clamp(4px, 1vw, 6px) clamp(4px, 1vw, 8px);
    background: rgba(18, 41, 18, 0.9);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: 24px;
}

.wallet-btn.connected:hover {
    border-color: rgba(0, 230, 118, 0.5);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

.wallet-avatar {
    width: clamp(20px, 4vw, 28px);
    height: clamp(20px, 4vw, 28px);
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wallet-btn:hover {
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.5);
}

.wallet-wrapper {
    position: relative;
}

.wallet-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: clamp(240px, 50vw, 280px);
    background: rgba(13, 26, 13, 0.98);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: clamp(10px, 3vw, 16px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    padding: clamp(10px, 2.5vw, 16px);
}

.wallet-dropdown.show {
    display: block;
}

.wallet-dropdown-top {
    margin-bottom: clamp(8px, 2vw, 14px);
}

.wallet-dropdown-connected {
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 500;
    color: #00ff88;
}

.wallet-dropdown-address {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: clamp(6px, 1.5vw, 10px) clamp(8px, 2vw, 12px);
    background: rgba(255, 255, 255, 0.03);
    border-radius: clamp(6px, 1.5vw, 10px);
    margin-bottom: clamp(8px, 2vw, 14px);
}

.wallet-dropdown-address span {
    font-size: clamp(11px, 2.5vw, 14px);
    font-family: monospace;
    color: var(--text-primary);
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.wallet-copy-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wallet-copy-btn:hover {
    color: var(--neon-gold);
    background: rgba(0, 230, 118, 0.1);
}

.wallet-dropdown-balance {
    margin-bottom: clamp(8px, 2vw, 14px);
    font-size: clamp(12px, 2.5vw, 14px);
    color: var(--text-primary);
}

.wallet-disconnect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: clamp(6px, 1.5vw, 10px);
    background: none;
    border: 1px solid rgba(255, 77, 77, 0.3);
    border-radius: clamp(6px, 1.5vw, 10px);
    color: #ff4d4d;
    font-size: clamp(11px, 2.5vw, 13px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.wallet-disconnect-btn:hover {
    background: rgba(255, 77, 77, 0.1);
    border-color: rgba(255, 77, 77, 0.5);
}

/* ========== PAGES ========== */
.page {
    display: none;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ========== PRESALE WRAPPER ========== */
.presale-wrapper {
    width: 100%;
    max-width: 520px;
    padding: clamp(12px, 3vw, 24px) clamp(10px, 3vw, 20px);
    padding-bottom: clamp(24px, 6vw, 48px);
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 20px);
}

/* ========== HERO ========== */
.presale-hero {
    text-align: center;
    padding: clamp(16px, 4vw, 32px) 0 clamp(8px, 2vw, 16px);
    position: relative;
}

.presale-hero-glow {
    display: none;
}

.presale-hero-title {
    font-size: clamp(28px, 7vw, 42px);
    font-weight: 800;
    background: linear-gradient(135deg, var(--neon-gold-light), var(--neon-gold), #e8c96a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.presale-hero-subtitle {
    color: var(--text-secondary);
    font-size: clamp(13px, 3vw, 16px);
    margin-top: clamp(6px, 1.5vw, 12px);
    position: relative;
    z-index: 1;
}

/* ========== STATS BAR ========== */
.presale-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3vw, 24px);
    padding: clamp(12px, 3vw, 20px);
    background: rgba(13, 26, 13, 0.9);
    border: 1px solid var(--border);
    border-radius: clamp(12px, 3vw, 16px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.stat-label {
    font-size: clamp(10px, 2.2vw, 12px);
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: clamp(14px, 3.5vw, 18px);
    font-weight: 700;
    color: var(--neon-gold);
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
}

/* ========== PROGRESS ========== */
.presale-progress-section {
    padding: clamp(14px, 3.5vw, 24px);
    background: rgba(13, 26, 13, 0.9);
    border: 1px solid var(--border);
    border-radius: clamp(12px, 3vw, 16px);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(10px, 2.5vw, 16px);
}

.progress-label {
    font-size: clamp(12px, 2.8vw, 14px);
    font-weight: 500;
    color: var(--text-secondary);
}

.progress-percent {
    font-size: clamp(14px, 3.5vw, 18px);
    font-weight: 700;
    color: var(--neon-gold);
}

.progress-bar-outer {
    width: 100%;
    height: clamp(8px, 2vw, 12px);
    background: rgba(18, 41, 18, 0.8);
    border-radius: 10px;
    overflow: visible;
    position: relative;
    border: 1px solid rgba(0, 230, 118, 0.1);
}

.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--neon-gold), #e8c96a);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 2px;
}

.progress-glow {
    position: absolute;
    top: -4px;
    width: 20px;
    height: calc(100% + 8px);
    background: radial-gradient(ellipse, rgba(0, 230, 118, 0.6), transparent);
    border-radius: 50%;
    pointer-events: none;
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.progress-caps {
    display: flex;
    justify-content: space-between;
    margin-top: clamp(8px, 2vw, 12px);
    font-size: clamp(10px, 2.2vw, 12px);
    color: var(--text-tertiary);
}

/* ========== PRESALE CARD ========== */
.presale-card {
    background: #0d1a0d;
    border-radius: clamp(14px, 3.5vw, 20px);
    border: 1px solid rgba(0, 230, 118, 0.2);
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.05), 0 0 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.presale-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(12px, 3vw, 20px) clamp(14px, 3.5vw, 24px);
    border-bottom: 1px solid rgba(0, 230, 118, 0.1);
}

.presale-card-title {
    font-size: clamp(15px, 3.5vw, 18px);
    font-weight: 700;
}

.presale-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: clamp(4px, 1vw, 8px) clamp(8px, 2vw, 14px);
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: 20px;
    font-size: clamp(11px, 2.5vw, 13px);
    font-weight: 600;
    color: var(--neon-gold);
}

.presale-timer svg {
    stroke: var(--neon-gold);
}

/* ========== TOKEN INFO CARD ========== */
.token-info-card {
    margin: clamp(10px, 2.5vw, 16px) clamp(10px, 2.5vw, 16px) 0;
    padding: clamp(10px, 2.5vw, 16px);
    background: rgba(18, 41, 18, 0.6);
    border-radius: clamp(10px, 2.5vw, 14px);
    border: 1px solid rgba(0, 230, 118, 0.08);
}

.token-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(4px, 1vw, 8px) 0;
}

.token-info-row:not(:last-child) {
    border-bottom: 1px solid rgba(0, 230, 118, 0.06);
}

.token-info-label {
    font-size: clamp(11px, 2.5vw, 13px);
    color: var(--text-secondary);
}

.token-info-value {
    font-size: clamp(12px, 2.8vw, 14px);
    font-weight: 600;
    color: var(--neon-gold);
}

/* ========== PRESALE INPUT ========== */
.presale-input-card {
    margin: clamp(8px, 2vw, 12px) clamp(10px, 2.5vw, 16px);
    background: #122912;
    border-radius: clamp(10px, 2.5vw, 16px);
    padding: clamp(12px, 3vw, 18px);
    border: 1px solid rgba(0, 230, 118, 0.1);
    transition: border-color 0.2s;
}

.presale-input-card:focus-within {
    border-color: rgba(0, 230, 118, 0.3);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.05);
}

.presale-input-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: clamp(6px, 1.5vw, 12px);
}

.presale-label {
    color: var(--text-secondary);
    font-size: clamp(11px, 2.5vw, 14px);
}

.presale-balance {
    color: var(--neon-gold);
    font-size: clamp(11px, 2.5vw, 14px);
    cursor: pointer;
    transition: all 0.2s;
}

.presale-balance:hover {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.5);
}

.presale-input-row {
    display: flex;
    gap: clamp(6px, 1.5vw, 10px);
    align-items: center;
}

.presale-input-row input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: clamp(22px, 6vw, 36px);
    font-weight: 600;
    outline: none;
    min-width: 0;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    caret-color: var(--neon-gold);
}

.presale-input-row input::-webkit-outer-spin-button,
.presale-input-row input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.presale-input-row input::placeholder {
    color: var(--text-tertiary);
}

.presale-token-badge {
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 1vw, 8px);
    padding: clamp(6px, 1.5vw, 10px) clamp(10px, 2.5vw, 16px);
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: clamp(13px, 3vw, 16px);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.presale-token-badge-icon {
    width: clamp(20px, 4.5vw, 26px);
    height: clamp(20px, 4.5vw, 26px);
    border-radius: 50%;
    object-fit: cover;
}

.receive-badge {
    background: rgba(0, 230, 118, 0.08);
    border-color: rgba(0, 230, 118, 0.2);
}

.presale-token-badge-circle {
    width: clamp(20px, 4.5vw, 26px);
    height: clamp(20px, 4.5vw, 26px);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--neon-gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(10px, 2.2vw, 12px);
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.presale-usd {
    color: var(--text-secondary);
    font-size: clamp(11px, 2.5vw, 13px);
    margin-top: clamp(4px, 1vw, 8px);
}

/* ========== ARROW ========== */
.presale-arrow-container {
    display: flex;
    justify-content: center;
    margin: clamp(-6px, -1.5vw, -10px) 0;
    position: relative;
    z-index: 10;
}

.presale-arrow-icon {
    width: clamp(32px, 7vw, 40px);
    height: clamp(32px, 7vw, 40px);
    background: rgba(18, 41, 18, 0.9);
    border: clamp(3px, 0.6vw, 4px) solid rgba(10, 10, 18, 0.9);
    border-radius: clamp(8px, 2vw, 12px);
    color: var(--neon-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

/* ========== INFO ========== */
.presale-info {
    margin: 0 clamp(10px, 2.5vw, 16px);
    padding: clamp(8px, 2vw, 12px) clamp(10px, 2.5vw, 16px);
    background: rgba(18, 41, 18, 0.6);
    border-radius: clamp(8px, 2vw, 12px);
    border: 1px solid rgba(0, 230, 118, 0.1);
    margin-top: clamp(4px, 1vw, 8px);
}

.info-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: clamp(11px, 2.5vw, 13px);
    margin-bottom: clamp(4px, 1vw, 8px);
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row span:last-child {
    color: var(--neon-gold);
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

/* ========== BUY BUTTON ========== */
.presale-buy-btn {
    width: calc(100% - clamp(20px, 5vw, 32px));
    margin: clamp(12px, 3vw, 20px);
    padding: clamp(14px, 3.5vw, 18px);
    background: linear-gradient(135deg, var(--accent), var(--neon-gold));
    border: none;
    border-radius: clamp(12px, 3vw, 16px);
    color: white;
    font-size: clamp(14px, 3.5vw, 17px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.3);
    letter-spacing: 0.3px;
}

.presale-buy-btn:hover:not(:disabled) {
    box-shadow: 0 0 45px rgba(0, 230, 118, 0.5);
    transform: translateY(-2px);
}

.presale-buy-btn:active:not(:disabled) {
    transform: translateY(0);
}

.presale-buy-btn:disabled {
    background: rgba(18, 41, 18, 0.5);
    color: var(--text-tertiary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ========== CLAIM / REFUND ========== */
.claim-card {
    border-color: rgba(0, 255, 136, 0.2);
}

.refund-card {
    border-color: rgba(255, 77, 77, 0.2);
}

.claim-info, .refund-info {
    padding: clamp(12px, 3vw, 20px) clamp(14px, 3.5vw, 24px);
}

.claim-row {
    display: flex;
    justify-content: space-between;
    padding: clamp(6px, 1.5vw, 10px) 0;
    font-size: clamp(12px, 2.8vw, 14px);
}

.claim-row span:first-child {
    color: var(--text-secondary);
}

.claim-row span:last-child {
    font-weight: 600;
    color: var(--neon-gold);
}

.claim-status {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: clamp(10px, 2.2vw, 12px) !important;
}

.claim-status.active {
    color: var(--green) !important;
    background: rgba(0, 255, 136, 0.1);
}

.claim-status.pending {
    color: var(--orange) !important;
    background: rgba(243, 132, 30, 0.1);
}

.refund-message {
    color: var(--text-secondary);
    font-size: clamp(12px, 2.8vw, 14px);
    margin-bottom: clamp(8px, 2vw, 12px);
    line-height: 1.5;
}

.claim-btn {
    background: linear-gradient(135deg, #00cc6a, #00ff88) !important;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3) !important;
}

.claim-btn:hover:not(:disabled) {
    box-shadow: 0 0 45px rgba(0, 255, 136, 0.5) !important;
}

.refund-btn {
    background: linear-gradient(135deg, #cc3333, #ff4d4d) !important;
    box-shadow: 0 0 30px rgba(255, 77, 77, 0.3) !important;
}

.refund-btn:hover:not(:disabled) {
    box-shadow: 0 0 45px rgba(255, 77, 77, 0.5) !important;
}

/* ========== HOW IT WORKS ========== */
.presale-how {
    background: rgba(13, 26, 13, 0.9);
    border: 1px solid var(--border);
    border-radius: clamp(14px, 3.5vw, 20px);
    padding: clamp(16px, 4vw, 28px);
}

.presale-how-title {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: 700;
    margin-bottom: clamp(16px, 4vw, 24px);
    text-align: center;
}

.presale-how-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 2.5vw, 16px);
}

.how-step {
    display: flex;
    gap: clamp(8px, 2vw, 12px);
    padding: clamp(10px, 2.5vw, 16px);
    background: rgba(18, 41, 18, 0.5);
    border-radius: clamp(10px, 2.5vw, 14px);
    border: 1px solid rgba(0, 230, 118, 0.06);
    transition: all 0.2s;
}

.how-step:hover {
    border-color: rgba(0, 230, 118, 0.2);
    background: rgba(18, 41, 18, 0.8);
}

.how-step-num {
    width: clamp(28px, 6vw, 36px);
    height: clamp(28px, 6vw, 36px);
    background: linear-gradient(135deg, var(--accent), var(--neon-gold));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(13px, 3vw, 16px);
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.how-step-content h4 {
    font-size: clamp(12px, 2.8vw, 14px);
    font-weight: 600;
    margin-bottom: 2px;
}

.how-step-content p {
    font-size: clamp(10px, 2.2vw, 12px);
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ========== FOOTER ========== */
.footer {
    text-align: center;
    padding: clamp(8px, 2vw, 16px) clamp(8px, 2vw, 16px);
    flex-shrink: 0;
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: clamp(10px, 2.2vw, 13px);
    color: var(--text-tertiary);
    flex-wrap: wrap;
}

.footer-brand strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========== MODALS ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: clamp(8px, 2vw, 16px);
}

.modal-content {
    background: rgba(13, 26, 13, 0.95);
    border-radius: clamp(12px, 3vw, 20px);
    width: 100%;
    max-width: min(420px, 92vw);
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid rgba(0, 230, 118, 0.3);
    box-shadow: 0 0 50px rgba(0, 230, 118, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.confirm-modal {
    max-width: min(380px, 92vw);
}

.confirm-modal-content {
    padding: clamp(20px, 5vw, 32px) clamp(12px, 3vw, 24px);
    text-align: center;
}

.confirm-icon {
    margin-bottom: clamp(8px, 2vw, 16px);
}

.confirm-title {
    font-size: clamp(16px, 4vw, 18px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: clamp(4px, 1vw, 8px);
}

.confirm-message {
    font-size: clamp(12px, 2.8vw, 14px);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: clamp(16px, 4vw, 24px);
}

.confirm-actions {
    display: flex;
    gap: clamp(6px, 1.5vw, 12px);
}

.confirm-btn {
    flex: 1;
    padding: clamp(10px, 2.5vw, 14px);
    border-radius: clamp(8px, 2vw, 12px);
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.confirm-btn.cancel {
    background: rgba(18, 41, 18, 0.8);
    border: 1px solid rgba(0, 230, 118, 0.2);
    color: var(--text-primary);
}

.confirm-btn.cancel:hover {
    border-color: var(--neon-gold);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

.confirm-btn.proceed {
    background: linear-gradient(135deg, var(--accent), var(--neon-gold));
    color: white;
}

.confirm-btn.proceed:hover {
    box-shadow: 0 0 25px rgba(0, 230, 118, 0.5);
}

/* ========== TX MODAL ========== */
.tx-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vw, 16px);
}

.tx-modal {
    background: #1a2e1a;
    border: 1px solid rgba(0, 230, 118, 0.15);
    border-radius: clamp(12px, 3vw, 20px);
    padding: clamp(24px, 6vw, 40px) clamp(20px, 5vw, 32px) clamp(20px, 5vw, 32px);
    width: min(340px, 88vw);
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tx-modal-close {
    position: absolute;
    top: clamp(8px, 2vw, 12px);
    right: clamp(10px, 2.5vw, 14px);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: clamp(18px, 4vw, 22px);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tx-modal-close:hover { color: var(--text-primary); }

.tx-modal-icon {
    width: clamp(52px, 13vw, 72px);
    height: clamp(52px, 13vw, 72px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(12px, 3vw, 20px);
    background: rgba(0, 230, 118, 0.08);
    border: 3px solid rgba(0, 230, 118, 0.15);
}

.tx-modal-icon.success {
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.25);
}

.tx-spinner {
    width: clamp(24px, 6vw, 32px);
    height: clamp(24px, 6vw, 32px);
    border: 3px solid rgba(0, 230, 118, 0.15);
    border-top-color: #00e676;
    border-radius: 50%;
    animation: txSpin 0.8s linear infinite;
}

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

.tx-modal-icon.success .tx-spinner { display: none; }

.tx-modal-icon .tx-check {
    display: none;
    font-size: clamp(24px, 6vw, 32px);
    color: #00ff88;
}

.tx-modal-icon.success .tx-check { display: block; }

.tx-modal-title {
    font-size: clamp(16px, 4vw, 18px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: clamp(4px, 1vw, 8px);
}

.tx-modal-desc {
    font-size: clamp(12px, 2.8vw, 14px);
    color: var(--text-secondary);
    margin-bottom: clamp(12px, 3vw, 20px);
    line-height: 1.5;
}

.tx-modal-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: clamp(6px, 1.5vw, 10px) clamp(10px, 2.5vw, 16px);
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: clamp(8px, 2vw, 12px);
    color: var(--neon-gold);
    font-size: clamp(11px, 2.5vw, 13px);
    font-weight: 500;
    text-decoration: none;
    margin-bottom: clamp(10px, 2.5vw, 16px);
    transition: all 0.2s;
}

.tx-modal-link:hover { background: rgba(0, 230, 118, 0.2); }

.tx-modal-done {
    width: 100%;
    padding: clamp(10px, 2.5vw, 14px);
    background: #00e676;
    border: none;
    border-radius: clamp(10px, 2.5vw, 14px);
    color: white;
    font-size: clamp(13px, 3vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tx-modal-done:hover { opacity: 0.9; }

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    top: clamp(60px, 12vw, 80px);
    right: clamp(8px, 2vw, 20px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(400px, 85vw);
    width: 100%;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: clamp(8px, 2vw, 12px);
    padding: clamp(10px, 2.5vw, 16px);
    background: rgba(13, 26, 13, 0.95);
    border-radius: clamp(10px, 2.5vw, 16px);
    border: 1px solid rgba(0, 230, 118, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.1), 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: toastSlideIn 0.3s ease-out;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast:hover {
    border-color: rgba(0, 230, 118, 0.4);
    box-shadow: 0 0 40px rgba(0, 230, 118, 0.2), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.toast.removing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast-icon {
    width: clamp(18px, 4vw, 24px);
    height: clamp(18px, 4vw, 24px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: clamp(11px, 2.5vw, 14px);
}

.toast-icon.success { background: rgba(0, 255, 136, 0.15); color: #00ff88; box-shadow: 0 0 10px rgba(0, 255, 136, 0.2); }
.toast-icon.error { background: rgba(255, 80, 80, 0.15); color: #ff5050; box-shadow: 0 0 10px rgba(255, 80, 80, 0.2); }
.toast-icon.warning { background: rgba(243, 132, 30, 0.15); color: #F3841E; box-shadow: 0 0 10px rgba(243, 132, 30, 0.2); }
.toast-icon.info { background: rgba(0, 230, 118, 0.15); color: var(--neon-gold); box-shadow: 0 0 10px rgba(0, 230, 118, 0.2); }

.toast-content { flex: 1; min-width: 0; }

.toast-title {
    font-size: clamp(12px, 2.8vw, 14px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toast-message {
    font-size: clamp(11px, 2.5vw, 13px);
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 2px;
    font-size: clamp(13px, 3vw, 16px);
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover { color: var(--accent); }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--neon-gold));
    border-radius: 0 0 clamp(10px, 2.5vw, 16px) clamp(10px, 2.5vw, 16px);
    animation: toastProgress linear forwards;
}

@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(0, 230, 118, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ========== SAFE AREA ========== */
@supports (padding-top: env(safe-area-inset-top)) {
    .header {
        padding-top: calc(clamp(6px, 1.5vw, 12px) + env(safe-area-inset-top));
        padding-left: calc(clamp(10px, 3vw, 24px) + env(safe-area-inset-left));
        padding-right: calc(clamp(10px, 3vw, 24px) + env(safe-area-inset-right));
    }
    .footer {
        padding-bottom: calc(clamp(6px, 1.5vw, 12px) + env(safe-area-inset-bottom));
    }
    #app {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .toast-container {
        top: calc(clamp(60px, 12vw, 80px) + env(safe-area-inset-top));
        right: calc(clamp(8px, 2vw, 20px) + env(safe-area-inset-right));
    }
}

/* ========== LANDSCAPE ========== */
@media (orientation: landscape) and (max-height: 500px) {
    .header { padding: 4px clamp(8px, 2vw, 16px); min-height: 36px; }
    .presale-wrapper { padding-top: 8px; }
    .presale-hero { padding: 8px 0; }
}

/* ========== TOUCH DEVICE ========== */
@media (hover: none) and (pointer: coarse) {
    .close-btn { min-width: 36px; min-height: 36px; }
}

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

.presale-hero { animation: fadeInUp 0.6s ease-out; }
.presale-stats-bar { animation: fadeInUp 0.6s ease-out 0.1s both; }
.presale-progress-section { animation: fadeInUp 0.6s ease-out 0.2s both; }
.presale-card { animation: fadeInUp 0.6s ease-out 0.3s both; }
.presale-how { animation: fadeInUp 0.6s ease-out 0.4s both; }
