/* ============================================
   NodusSwap — Professional Light Theme
   ============================================ */

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

:root {
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f5f6fc;
    --bg-hover: #edeff8;
    --bg-modal: #ffffff;

    --primary: #fb118e; /* Uniswap Pink */
    --primary-hover: #e3007b;
    --primary-light: #f9eef6;

    --text-1: #000000;
    --text-2: #222222;
    --text-3: #5f667b;

    --border: #f0f1f5;
    --border-dark: #e8e9ef;
    --success: #199c77;
    --danger: #e93c68;
    --warning: #f3ba2f;

    --radius: 20px;
    --radius-sm: 16px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-1);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== BACKGROUND BLOBS ===== */
.bg-blobs {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-body);
}
.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.6;
    border-radius: 50%;
    z-index: 0;
}
.blob-1 { top: -20%; left: -10%; width: 50vw; height: 50vw; background: #ffe4f3; }
.blob-2 { bottom: -10%; right: -10%; width: 40vw; height: 40vw; background: #e0f2fe; }
.blob-3 { top: 30%; left: 60%; width: 30vw; height: 30vw; background: #f3e8ff; }


/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: transparent;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-1);
    font-weight: 700;
    font-size: 20px;
}

.logo-svg {
    width: 32px;
    height: 32px;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-3);
    font-size: 16px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 12px;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover { color: var(--text-2); background: rgba(0,0,0,0.04); }

.nav-link.active {
    color: var(--text-1);
    background: rgba(0,0,0,0.04);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-1);
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid var(--border-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
}

.net-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.btn-wrap {
    padding: 8px 16px;
    background: #ffffff;
    color: var(--text-1);
    border: 1px solid var(--border-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-wrap:hover { background: #f9f9f9; }

.btn-wallet {
    padding: 10px 20px;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: 20px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-wallet:hover { background: #f0e1ea; }

.btn-wallet.connected {
    background: #ffffff;
    color: var(--text-1);
    border: 1px solid var(--border-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* ===== PAGES ===== */
.page { display: none; padding: 60px 16px 120px; }
.page.active { display: block; }

.swap-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* ===== CARD ===== */
.card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0px 8px 32px rgba(0,0,0,0.04);
    overflow: hidden;
}

.card-wide { max-width: 600px; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 8px;
}

.card-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.card-sub {
    font-size: 14px;
    color: var(--text-3);
    font-weight: 500;
}

.card-desc {
    font-size: 15px;
    color: var(--text-3);
    margin-bottom: 24px;
    line-height: 1.5;
}

.card-body { 
    padding: 16px; 
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ===== INPUT PANEL ===== */
.input-panel {
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 16px;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.input-panel:hover { background: var(--bg-hover); }
.input-panel:focus-within { border-color: rgba(251, 17, 142, 0.2); }

.input-panel-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

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

.input-balance {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
}

.input-panel-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.token-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-1);
    font-family: var(--font);
    font-size: 36px;
    font-weight: 500;
    min-width: 0;
    height: 48px;
    padding: 0;
}

.token-amount-input::placeholder { color: var(--text-3); opacity: 0.3; }
.token-amount-input::-webkit-inner-spin-button,
.token-amount-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.token-amount-input[type=number] { -moz-appearance: textfield; }

.usd-value {
    font-size: 14px;
    color: var(--text-3);
    margin-top: 4px;
    height: 18px;
}

.token-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 8px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border-radius: 20px;
    color: var(--text-1);
    font-family: var(--font);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    height: 40px;
}

.token-picker:hover { background: #f7f8fa; }

/* Eğer seçili token yoksa pembe dikkat çekici yapabiliriz, şu an varsayılan */
.token-picker.empty {
    background: var(--primary);
    color: #fff;
    border: none;
}

/* ===== SWAP ARROW ===== */
.swap-arrow-wrap {
    position: relative;
    height: 4px; /* Gap görevi görüyor */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.swap-arrow {
    position: absolute;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 4px solid var(--bg-card);
    border-radius: 14px;
    color: var(--text-3);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.swap-arrow:hover { background: var(--bg-hover); transform: rotate(180deg); }

/* ===== PLUS ICON (Liquidity) ===== */
.plus-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 16px;
    font-size: 24px;
    color: var(--text-3);
    font-weight: 400;
    margin: 8px 0;
}

/* ===== SWAP INFO ===== */
.swap-info {
    margin-top: 8px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
}

/* ===== ACTION BUTTON ===== */
.btn-action {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.btn-action.active {
    background: var(--primary);
    color: #ffffff;
}

.btn-action.active:hover { opacity: 0.9; }

.btn-action:disabled {
    background: var(--bg-hover);
    color: var(--text-3);
    cursor: not-allowed;
    opacity: 1;
}

/* ===== BADGE ===== */
.badge-free {
    padding: 6px 12px;
    background: #e6f6f2;
    color: var(--success);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ===== FORM GRID ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 8px;
}

.field input {
    width: 100%;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-family: var(--font);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.field input::placeholder { color: var(--text-3); opacity: 0.7; }
.field input:focus { border-color: rgba(251, 17, 142, 0.2); background: var(--bg-card); }

/* ===== CREATED TOKEN LIST ===== */
.created-list {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.created-list h3 {
    font-size: 16px;
    color: var(--text-1);
    margin-bottom: 16px;
    font-weight: 600;
}

.created-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.ci-left { display: flex; flex-direction: column; }

.ci-name {
    font-size: 15px;
    font-weight: 600;
}

.ci-addr {
    font-size: 12px;
    color: var(--text-3);
    font-family: 'Courier New', monospace;
    margin-top: 4px;
    word-break: break-all;
}

.ci-supply {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    margin-left: 10px;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.3); /* Softer backdrop for light mode */
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-overlay.open { display: flex; }

.modal {
    width: 420px;
    max-height: 80vh;
    background: var(--bg-modal);
    border: 1px solid var(--border-dark);
    box-shadow: 0 12px 48px rgba(0,0,0,0.08);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-3);
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s;
}

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

.modal-search {
    padding: 0 24px 16px;
}

.modal-search input {
    width: 100%;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-family: var(--font);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-search input:focus { border-color: rgba(251, 17, 142, 0.2); }
.modal-search input::placeholder { color: var(--text-3); opacity: 0.7; }

.modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 16px;
}

.modal-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-item:hover { background: var(--bg-hover); }

.mi-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
    flex-shrink: 0;
}

.mi-info { display: flex; flex-direction: column; }

.mi-symbol {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
}

.mi-name {
    font-size: 13px;
    color: var(--text-3);
}

/* ===== TOASTS ===== */
.toasts {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    min-width: 320px;
    max-width: 400px;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

.toast-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.toast-msg { font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--text-1); }

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0d2d8; border-radius: 3px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 16px;
        right: 16px;
        background: var(--bg-card);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-sm);
        box-shadow: 0 8px 32px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 12px;
        z-index: 100;
    }
    
    .nav-links.active-menu {
        display: flex !important;
    }
    
    .nav-link {
        font-size: 18px;
        padding: 12px 16px;
    }

    .header-inner { padding: 16px; justify-content: flex-end; }
    .card { border-radius: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .token-amount-input { font-size: 28px; }
    .btn-wrap { display: none !important; } /* Hide wrap on very small if needed */
    
    /* Manage Token & Created items mobile tweaks */
    .created-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .ci-supply { margin-left: 0; }
    
    /* Form input button combinations stack on mobile */
    .flex-mobile-stack { flex-direction: column !important; align-items: stretch !important; }
    .flex-mobile-stack .btn-action { width: 100% !important; margin-top: 8px !important; }
}

/* ===== LAUNCHPAD ===== */
.presale-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 30px;
    overflow: hidden;
}
.presale-banner {
    width: 100%;
    height: 180px;
    background-color: var(--bg-input);
    background-size: cover;
    background-position: center;
    position: relative;
}
.presale-logo-wrapper {
    position: relative;
    height: 60px;
    display: flex;
    justify-content: center;
}
.presale-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    background-color: var(--bg-input);
    position: absolute;
    top: -50px;
    object-fit: cover;
}
.presale-body {
    padding: 20px;
    text-align: center;
}
.presale-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}
.presale-header h3 {
    margin: 10px 0 5px 0;
    font-size: 24px;
    color: var(--text-1);
}
.presale-about {
    text-align: left;
    background: var(--bg-input);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
    white-space: pre-wrap;
}
.presale-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
}
.status-active { background: rgba(49,208,170,0.2); color: #31d0aa; }
.status-ended { background: rgba(255,255,255,0.1); color: var(--text-2); }
.status-finalized { background: rgba(144,19,254,0.2); color: #9013fe; }

.presale-stats {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}
.presale-progress-bg {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}
.presale-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #b062ff, #9013fe);
    width: 0%;
}
.presale-action {
    display: flex;
    gap: 10px;
}
.presale-action input {
    flex: 1;
}
