/* ========== doink.fun — Dark Meme Crypto Theme ========== */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #0a0a0f;
    --bg-card: #111118;
    --bg-card-hover: #16161f;
    --bg-input: #0d0d14;
    --border: #1a1a2e;
    --green: #00ff88;
    --green-dim: #00cc6a;
    --green-glow: rgba(0, 255, 136, 0.15);
    --yellow: #ffd700;
    --red: #ff4444;
    --text: #e0e0e0;
    --text-dim: #888;
    --text-bright: #fff;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== Header ========== */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--green);
    text-shadow: 0 0 20px var(--green-glow);
    letter-spacing: -1px;
}
.logo span { color: var(--text-dim); }

.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 24px;
}

.header-search input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.header-search input:focus { border-color: var(--green); }
.header-search input::placeholder { color: var(--text-dim); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--green);
    color: #000;
}
.btn-primary:hover { background: var(--green-dim); box-shadow: 0 0 20px var(--green-glow); }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--green); color: var(--green); }

.btn-danger {
    background: rgba(255, 68, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(255, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(255, 68, 68, 0.25); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 13px;
}
.user-info .balance {
    color: var(--green);
    font-family: var(--font-mono);
    font-weight: 700;
}

/* ========== King of the Hill Banner ========== */

.king-banner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 16px 24px;
    margin: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.king-banner:hover { border-color: var(--yellow); box-shadow: 0 0 30px rgba(255, 215, 0, 0.1); }

.king-crown { font-size: 32px; }
.king-label { color: var(--yellow); font-family: var(--font-mono); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; }
.king-name { font-size: 18px; font-weight: 700; color: var(--text-bright); }
.king-ticker { color: var(--text-dim); font-family: var(--font-mono); }
.king-mcap { color: var(--yellow); font-family: var(--font-mono); font-weight: 700; margin-left: auto; }
.king-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--yellow); }

.king-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-dim);
    font-style: italic;
}

/* ========== Sort Tabs ========== */

.sort-tabs {
    display: flex;
    gap: 4px;
    padding: 0 24px;
    margin-bottom: 16px;
}

.sort-tab {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.sort-tab:hover { color: var(--text); background: var(--bg-card); }
.sort-tab.active { color: var(--green); background: var(--bg-card); border-color: var(--green); }

/* ========== Token Grid ========== */

.token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0 24px 24px;
}

.token-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.token-card:hover {
    border-color: var(--green);
    box-shadow: 0 0 30px var(--green-glow);
    transform: translateY(-2px);
    text-decoration: none;
}

.token-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.token-card-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg);
    border: 1px solid var(--border);
}

.token-card-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-bright);
}

.token-card-ticker {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--green);
}

.token-card-creator {
    font-size: 11px;
    color: var(--text-dim);
}

.token-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.token-stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; }
.token-stat-value { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text-bright); }

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--yellow));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
}

.token-card-graduated {
    border-color: var(--yellow);
    opacity: 0.7;
}

/* ========== Token Page ========== */

.token-page {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    padding: 20px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.chart-token-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-token-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.chart-token-name { font-weight: 700; font-size: 18px; color: var(--text-bright); }
.chart-token-ticker { font-family: var(--font-mono); color: var(--green); font-size: 14px; }
.chart-token-price { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--green); }

#chart-container {
    width: 100%;
    height: 400px;
}

/* Trade history */
.trade-history {
    border-top: 1px solid var(--border);
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.trade-history h3 { font-size: 14px; color: var(--text-dim); margin-bottom: 12px; }

.trade-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.trade-type {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}
.trade-type.buy { color: var(--green); background: rgba(0, 255, 136, 0.1); }
.trade-type.sell { color: var(--red); background: rgba(255, 68, 68, 0.1); }

.trade-user { color: var(--text-dim); flex: 1; }
.trade-amount { font-family: var(--font-mono); color: var(--text-bright); }
.trade-time { color: var(--text-dim); font-size: 11px; }

/* Sidebar */
.token-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trade-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.trade-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg);
    border-radius: 8px;
    padding: 4px;
}

.trade-toggle-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    background: transparent;
    color: var(--text-dim);
    transition: all 0.2s;
}
.trade-toggle-btn.active-buy { background: var(--green); color: #000; }
.trade-toggle-btn.active-sell { background: var(--red); color: #fff; }

.trade-input-group { margin-bottom: 12px; }
.trade-input-group label { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; display: block; }

.trade-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.trade-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 12px;
    color: var(--text-bright);
    font-size: 16px;
    font-family: var(--font-mono);
    outline: none;
}

.trade-input-suffix {
    padding: 10px 12px;
    color: var(--text-dim);
    font-size: 13px;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.02);
}

.quick-amounts {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.quick-amount {
    flex: 1;
    padding: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 12px;
    font-family: var(--font-mono);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.quick-amount:hover { border-color: var(--green); color: var(--green); }

.trade-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.trade-submit.buy-btn { background: var(--green); color: #000; }
.trade-submit.buy-btn:hover { box-shadow: 0 0 20px var(--green-glow); }
.trade-submit.sell-btn { background: var(--red); color: #fff; }
.trade-submit.sell-btn:hover { box-shadow: 0 0 20px rgba(255, 68, 68, 0.3); }

.trade-balance-info {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 8px;
}
.trade-balance-info span { color: var(--green); font-family: var(--font-mono); }

/* Curve Info */
.curve-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.curve-info h3 { font-size: 14px; color: var(--text-dim); margin-bottom: 12px; }

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}
.info-row .label { color: var(--text-dim); }
.info-row .value { font-family: var(--font-mono); color: var(--text-bright); }

/* Holders */
.holders-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.holders-section h3 { font-size: 14px; color: var(--text-dim); margin-bottom: 12px; }

.holder-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
}
.holder-rank { color: var(--text-dim); font-family: var(--font-mono); width: 24px; }
.holder-name { flex: 1; }
.holder-name .creator-badge {
    font-size: 10px;
    background: rgba(255, 215, 0, 0.15);
    color: var(--yellow);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
}
.holder-amount { font-family: var(--font-mono); color: var(--text-bright); }
.holder-pct { color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; }

/* Comments */
.comments-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    grid-column: 1 / -1;
}

.comments-section h3 { font-size: 14px; color: var(--text-dim); margin-bottom: 16px; }

.comment-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.comment-form input[type="text"] {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
}
.comment-form input[type="text"]:focus { border-color: var(--green); }

.comment {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), var(--yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #000;
    flex-shrink: 0;
}

.comment-body { flex: 1; }
.comment-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.comment-meta .name { color: var(--green); font-weight: 600; }
.comment-text { font-size: 14px; line-height: 1.5; }
.comment-image { max-width: 200px; border-radius: 8px; margin-top: 8px; }

/* ========== Create Token Page ========== */

.create-page {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 24px;
}

.create-page h1 {
    font-family: var(--font-mono);
    font-size: 28px;
    color: var(--green);
    margin-bottom: 8px;
}

.create-page .subtitle {
    color: var(--text-dim);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--green); }

.form-group textarea { min-height: 100px; resize: vertical; }

.form-group .hint { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.image-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.image-upload-area:hover { border-color: var(--green); }
.image-upload-area.has-image { border-style: solid; border-color: var(--green); }

.image-upload-area img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.image-upload-text { color: var(--text-dim); font-size: 14px; }

.optional-section {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 20px;
}

.optional-section h3 {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

/* ========== Auth Pages ========== */

.auth-page {
    max-width: 400px;
    margin: 80px auto;
    padding: 0 24px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
}

.auth-card h1 {
    font-family: var(--font-mono);
    font-size: 24px;
    color: var(--green);
    text-align: center;
    margin-bottom: 8px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 24px;
    font-size: 14px;
}

.auth-card .btn { width: 100%; justify-content: center; margin-top: 8px; }

.auth-card .switch-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-dim);
}

.error-msg {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: var(--red);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

/* ========== Responsive ========== */

@media (max-width: 900px) {
    .token-page {
        grid-template-columns: 1fr;
    }

    .header-search {
        display: none;
    }

    .token-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 600px) {
    .header { padding: 12px 16px; }
    .king-banner { margin: 12px 16px; }
    .sort-tabs { padding: 0 16px; }
    .token-grid { padding: 0 16px 16px; gap: 12px; }

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

/* ========== Scrollbar ========== */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ========== Animations ========== */

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

.token-card { animation: fadeIn 0.3s ease; }

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 var(--green-glow); }
    50% { box-shadow: 0 0 20px var(--green-glow); }
}

.live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-green 2s infinite;
    display: inline-block;
}

/* ========== Empty State ========== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.empty-state .emoji { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; margin-bottom: 8px; }

/* ========== Notifications ========== */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--green);
    border-radius: 8px;
    padding: 12px 20px;
    color: var(--text-bright);
    font-size: 14px;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 0 20px var(--green-glow);
}

.toast.error { border-color: var(--red); box-shadow: 0 0 20px rgba(255, 68, 68, 0.2); }

/* Toast Container — stacking */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    z-index: 1000;
    pointer-events: none;
}
.toast-container .toast {
    position: relative;
    bottom: auto;
    right: auto;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease, toastFadeOut 0.4s ease 2.6s forwards;
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastFadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ========== Form Helpers ========== */

.form-row { display: flex; gap: 16px; }
@media (max-width: 600px) { .form-row { flex-direction: column; } }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}

/* ========== Preview Section (Create Page) ========== */

.preview-section {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}
.preview-section h3 { font-size: 14px; color: var(--text-dim); margin-bottom: 12px; }

.preview-card {
    pointer-events: none;
    opacity: 0.85;
}

/* ========== Profile Page ========== */

.profile-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), var(--yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #000;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.profile-info { flex: 1; }

.profile-name {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 4px;
}

.profile-bio {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.profile-stats { display: flex; gap: 24px; }

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.profile-stat-value { font-family: var(--font-mono); font-weight: 700; font-size: 18px; color: var(--green); }
.profile-stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; }

.profile-actions { display: flex; gap: 8px; }

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}
.profile-tab {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.profile-tab:hover { color: var(--text); background: var(--bg-card); }
.profile-tab.active { color: var(--green); background: var(--bg-card); border-color: var(--green); }

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

/* Holdings */
.holding-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}
.holding-row:hover { border-color: var(--green); text-decoration: none; }

.holding-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg); }
.holding-info { flex: 1; }
.holding-name { font-weight: 600; color: var(--text-bright); font-size: 14px; }
.holding-ticker { color: var(--green); font-family: var(--font-mono); font-size: 12px; }
.holding-amount { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.holding-value { text-align: right; }
.holding-value-atm { font-family: var(--font-mono); font-weight: 700; color: var(--green); font-size: 14px; }
.holding-price { font-size: 11px; color: var(--text-dim); }

/* Trade History Row (profile) */
.trade-history-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}
.trade-token-name { flex: 1; color: var(--text-bright); }
.trade-tokens { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; }

/* ========== Modal ========== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    margin: 0 16px;
    animation: fadeIn 0.2s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; color: var(--text-bright); }
.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 20px; }

/* ========== Drag Over (create page) ========== */

.drag-over {
    border-color: var(--green) !important;
    background: var(--green-glow);
}

/* ========== Token Card Extras ========== */

.token-card-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.token-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-dim);
}

.token-card-footer .reply-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
}

.user-name-link {
    color: var(--text-dim);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.user-name-link:hover { color: var(--green); text-decoration: none; }

/* ========== Skeleton Loading ========== */

@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 6px;
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.skeleton-card .skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card .skeleton-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-full { width: 100%; }
.skeleton-line.h-6 { height: 6px; }
.skeleton-line.h-20 { height: 20px; }

/* ========== Button States ========== */

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    left: 50%;
    top: 50%;
    margin-left: -8px;
    margin-top: -8px;
}
.btn-primary.loading::after { border-color: rgba(0, 0, 0, 0.2); border-top-color: #000; }

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

/* ========== Input Focus Glow ========== */

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px var(--green-glow);
}
.header-search input:focus {
    box-shadow: 0 0 0 3px var(--green-glow);
}
.comment-form input[type="text"]:focus {
    box-shadow: 0 0 0 3px var(--green-glow);
}
.trade-input-wrapper:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-glow);
}

/* ========== Mobile Search Toggle ========== */

.mobile-search-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}
.mobile-search-toggle:hover { border-color: var(--green); color: var(--green); }

@media (max-width: 900px) {
    .mobile-search-toggle { display: inline-flex; }
    .header-search.mobile-open {
        display: block !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-width: 100%;
        margin: 0;
        padding: 12px 16px;
        background: rgba(10, 10, 15, 0.98);
        border-bottom: 1px solid var(--border);
        z-index: 99;
    }
}

/* ========== Trade Estimate Row ========== */

.trade-estimate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.trade-estimate .estimate-value {
    font-family: var(--font-mono);
    color: var(--text-bright);
    font-weight: 600;
}

/* ========== Section Tabs (Token page Thread/Trades) ========== */

.section-tabs {
    display: flex;
    gap: 4px;
    padding: 16px 16px 0;
    border-bottom: 1px solid var(--border);
}

.section-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -1px;
}
.section-tab:hover { color: var(--text); }
.section-tab.active { color: var(--green); border-bottom-color: var(--green); }

/* ========== Comment Actions (likes) ========== */

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 0;
    transition: color 0.2s;
}
.comment-action-btn:hover { color: var(--text); }
.comment-action-btn.liked { color: var(--red); }

/* ========== Share / Watchlist Buttons ========== */

.share-btn,
.watchlist-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.share-btn:hover,
.watchlist-btn:hover { border-color: var(--green); color: var(--green); }
.watchlist-btn.active { color: var(--yellow); border-color: var(--yellow); }

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

/* ========== Password Toggle ========== */

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-wrapper input {
    width: 100%;
    padding-right: 42px;
}
.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}
.password-toggle:hover { color: var(--text); }

/* ========== Confirm Modal Details ========== */

.confirm-details {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}
.confirm-row .label { color: var(--text-dim); }
.confirm-row .value { font-family: var(--font-mono); color: var(--text-bright); }

.confirm-actions {
    display: flex;
    gap: 8px;
}
.confirm-actions .btn { flex: 1; justify-content: center; }

/* ========== Activity Feed Sidebar ========== */

.homepage-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    padding: 0 24px 24px;
}

.homepage-layout .token-grid {
    padding: 0;
}

.activity-feed {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.activity-feed h3 {
    font-size: 13px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 12px;
    animation: fadeIn 0.3s ease;
}

.activity-item:last-child { border-bottom: none; }

.activity-item .activity-icon {
    font-size: 14px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.activity-item .activity-text {
    flex: 1;
    color: var(--text-dim);
    line-height: 1.4;
}

.activity-item .activity-text .activity-user {
    color: var(--text-bright);
    font-weight: 600;
}

.activity-item .activity-text .activity-token {
    color: var(--green);
    font-weight: 600;
}

.activity-item .activity-text .activity-amount {
    font-family: var(--font-mono);
    color: var(--text-bright);
}

.activity-item .activity-time {
    color: var(--text-dim);
    font-size: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ========== Ticker Availability Hint ========== */

.ticker-hint {
    font-size: 11px;
    margin-top: 4px;
    transition: color 0.2s;
}
.ticker-hint.available { color: var(--green); }
.ticker-hint.taken { color: var(--red); }
.ticker-hint.checking { color: var(--text-dim); }

/* ========== Responsive Profile ========== */

@media (max-width: 600px) {
    .profile-header { flex-direction: column; text-align: center; }
    .profile-stats { justify-content: center; }
    .profile-actions { justify-content: center; }
    .profile-tabs { overflow-x: auto; }
    .trade-history-row { flex-wrap: wrap; }
}

@media (max-width: 900px) {
    .homepage-layout {
        grid-template-columns: 1fr;
    }
    .activity-feed {
        position: static;
        max-height: none;
    }
}

@media (max-width: 600px) {
    .homepage-layout {
        padding: 0 16px 16px;
    }
}
