/* ═══════════════════════════════════════════════════════════════════════
   Sanity United — Design System
   Matching sanity.fund aesthetic: Dark theme, Cyan (#00e5ff) accents
   ═══════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────────────── */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #111111;
    --bg-input: #0d0d0d;

    --cyan: #00e5ff;
    --cyan-hover: #00b8d4;
    --cyan-dim: rgba(0, 229, 255, 0.15);
    --cyan-glow: rgba(0, 229, 255, 0.25);
    --cyan-subtle: rgba(0, 229, 255, 0.08);

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --success: #00c853;
    --success-bg: rgba(0, 200, 83, 0.1);
    --danger: #ff4444;
    --danger-bg: rgba(255, 68, 68, 0.1);
    --warning: #ffaa00;
    --warning-bg: rgba(255, 170, 0, 0.1);

    --border-color: rgba(0, 229, 255, 0.12);
    --border-hover: rgba(0, 229, 255, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-glow: 0 0 20px rgba(0, 229, 255, 0.12);
    --shadow-glow-hover: 0 0 30px rgba(0, 229, 255, 0.2);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--cyan);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--cyan-hover);
}

.hidden {
    display: none !important;
}

/* ── Container ──────────────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Typography ─────────────────────────────────────────────────────── */
.text-cyan { color: var(--cyan); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* ── Navbar ─────────────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-brand-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

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

.wallet-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-balance {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cyan);
}

.balance-token {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.wallet-address-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 13px;
    font-family: monospace;
    color: var(--text-secondary);
}

.wallet-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--cyan);
    color: #000;
}

.btn-primary:hover {
    background: var(--cyan-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
    color: #000;
}

.btn-outline {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
}

.btn-outline:hover {
    background: var(--cyan-dim);
}

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

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

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

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* ── Hero Section ───────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.hero-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--cyan);
    top: -200px;
    right: -100px;
}

.hero-glow-2 {
    width: 400px;
    height: 400px;
    background: #0066ff;
    bottom: -100px;
    left: -50px;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

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

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.hero-cta {
    padding: 16px 40px;
    font-size: 16px;
}

/* ── Sections ───────────────────────────────────────────────────────── */
.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 48px;
}

/* ── Room Cards Grid ────────────────────────────────────────────────── */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
    gap: 24px;
    justify-content: center;
}

.room-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.room-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.room-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cyan-subtle);
    border: 1px solid var(--cyan-dim);
    border-radius: var(--radius-sm);
}

.room-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.room-status.active {
    color: var(--success);
    background: var(--success-bg);
}

.room-status.closed {
    color: var(--danger);
    background: var(--danger-bg);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.room-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.room-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex: 1;
}

.room-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

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

.room-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.room-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--cyan);
}

/* ── Progress Bar ───────────────────────────────────────────────────── */
.room-progress {
    margin-bottom: 20px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--cyan-hover));
    border-radius: var(--radius-full);
    transition: width 1s ease;
    min-width: 2%;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
}

.room-progress-lg {
    margin-top: 12px;
}

/* ── Steps Grid ─────────────────────────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.step-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.step-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.step-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--cyan);
    opacity: 0.3;
    margin-bottom: 12px;
}

.step-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Room Page ──────────────────────────────────────────────────────── */
.room-page {
    padding: 30px 24px 80px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.back-link:hover {
    color: var(--cyan);
}

.room-header {
    margin-bottom: 40px;
}

.room-header-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.room-header-left {
    flex: 1;
}

.room-page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.room-page-description {
    font-size: 16px;
    color: var(--text-secondary);
}

.room-header-right {
    flex: 0 0 400px;
}

.room-meta-card {
    display: flex;
    justify-content: space-between;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

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

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 20px;
    font-weight: 700;
}

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

.room-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
}

/* ── Form Styles ────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

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

.required {
    color: var(--danger);
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-dim);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input-error {
    border-color: var(--danger) !important;
}

.form-error {
    display: block;
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

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

.input-prefix {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-weight: 600;
    z-index: 1;
    pointer-events: none;
}

.input-has-prefix {
    padding-left: 30px;
}

/* ── Already Invested Badge ─────────────────────────────────────────── */
.already-invested-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--cyan-subtle);
    border: 1px solid var(--cyan-dim);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--cyan);
    margin-bottom: 20px;
}

/* ── Investment History Items ───────────────────────────────────────── */
.investment-item {
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    transition: var(--transition);
}

.investment-item:hover {
    border-color: var(--border-hover);
}

.investment-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.investment-id {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-review {
    color: var(--warning);
    background: var(--warning-bg);
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.status-approved {
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid rgba(0, 200, 83, 0.2);
}

.status-declined {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.investment-item-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inv-detail {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.inv-label {
    color: var(--text-muted);
}

.inv-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* ── Wallet Info Card ───────────────────────────────────────────────── */
.wallet-info-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.wallet-info-label {
    color: var(--text-muted);
}

.wallet-info-value {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

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

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-glow-hover);
    animation: slideUp 0.3s ease;
}

.modal-sm {
    max-width: 380px;
}

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

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: var(--transition);
}

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

.modal-body {
    padding: 24px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.modal-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--warning-bg);
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-radius: var(--radius-sm);
    margin-top: 16px;
    font-size: 13px;
    color: var(--warning);
}

.info-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Wallet Options ─────────────────────────────────────────────────── */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
}

.wallet-option:hover {
    border-color: var(--cyan);
    background: var(--cyan-subtle);
    transform: translateX(4px);
}

.wallet-option-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.wallet-option-name {
    flex: 1;
}

.wallet-option-tag {
    font-size: 11px;
    color: var(--cyan);
    background: var(--cyan-dim);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.wallet-option-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ── Insufficient Tokens ────────────────────────────────────────────── */
.insufficient-icon {
    font-size: 48px;
}

.token-balance-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-top: 16px;
    font-size: 14px;
}

/* ── Spinner ────────────────────────────────────────────────────────── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

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

/* ── Empty State ────────────────────────────────────────────────────── */
.empty-state, .empty-state-sm {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-sm {
    padding: 30px 20px;
}

.empty-state h3, .empty-state-sm h3 {
    font-size: 18px;
    margin-top: 16px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p, .empty-state-sm p {
    font-size: 14px;
    margin-top: 8px;
}

/* ── Alerts ─────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid rgba(0, 200, 83, 0.2);
    color: var(--success);
}

.alert-error {
    background: var(--danger-bg);
    border: 1px solid rgba(255, 68, 68, 0.2);
    color: var(--danger);
}

/* ── Toast ──────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

.toast-error {
    border-color: rgba(255, 68, 68, 0.3);
}

.toast-success {
    border-color: rgba(0, 200, 83, 0.3);
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 48px 24px;
    text-align: center;
}

.footer-container {
    max-width: 600px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.footer-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
}

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

.footer-copyright {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Main Content ───────────────────────────────────────────────────── */
.main-content {
    min-height: calc(100vh - 64px - 200px);
    padding-top: 8px;
}

/* ── Animations ─────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ── Logo Styles ────────────────────────────────────────────────────── */
.nav-logo-img {
    width: 180px;
    height: auto;
    object-fit: contain;
    display: block;
}

.footer-logo-img {
    width: 160px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ── Mobile / Desktop Text Toggle ──────────────────────────────────── */
.btn-text-short {
    display: none;
}

/* ── Mobile Wallet Indicator ───────────────────────────────────────── */
.wallet-status-mobile {
    display: none;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .hero-section {
        padding: 60px 0 50px;
    }

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

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

    .stat-value {
        font-size: 22px;
    }

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

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

    .room-header-content {
        flex-direction: column;
    }

    .room-header-right {
        flex: 1;
        width: 100%;
    }

    .room-meta-card {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px;
    }

    .meta-value {
        font-size: 16px;
    }

    .meta-divider {
        display: none;
    }

    .meta-item {
        flex: 1;
        min-width: 80px;
    }

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

    /* Hide desktop wallet status, show mobile version */
    .wallet-status {
        display: none !important;
    }

    .wallet-status-mobile.visible {
        display: flex;
        align-items: center;
        gap: 6px;
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-full);
        padding: 5px 10px;
        font-size: 11px;
        font-family: monospace;
        color: var(--text-secondary);
    }

    .wallet-status-mobile .wallet-dot {
        width: 6px;
        height: 6px;
    }

    /* Mobile button text */
    .btn-text-full {
        display: none;
    }

    .btn-text-short {
        display: inline;
    }

    .nav-brand-text {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .nav-logo-img {
        width: 160px;
    }

    .container {
        padding: 0 16px;
    }

    .room-page {
        padding: 20px 16px 60px;
    }

    .room-page-title {
        font-size: 24px;
    }

    .card-body {
        padding: 16px;
    }

    .card-header {
        padding: 14px 16px;
    }

    .footer-container {
        padding: 30px 16px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 12px;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: 14px;
    }

    .hero-cta {
        width: 100%;
        padding: 14px 20px;
    }

    .room-card {
        padding: 20px;
    }

    .room-title {
        font-size: 18px;
    }

    .room-stat-value {
        font-size: 16px;
    }

    .step-card {
        padding: 24px 16px;
    }

    .modal {
        margin: 16px;
        max-width: calc(100% - 32px);
    }

    .nav-container {
        height: 56px;
    }

    .already-invested-badge {
        font-size: 12px;
        padding: 10px 12px;
    }

    .form-summary {
        flex-direction: column;
        gap: 10px;
    }

    .form-summary-item span:last-child {
        font-size: 16px;
    }

    .investment-item-body {
        gap: 6px;
    }

    .inv-detail {
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   Investment Calculator — Slider, Token Conversion, Two-Step Flow
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Token Price Banner ────────────────────────────────────────────── */
.token-price-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(0, 102, 255, 0.06));
    border: 1px solid var(--cyan-dim);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.token-price-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-price-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--cyan);
}

.token-price-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

/* ── Slider Calculator ─────────────────────────────────────────────── */
.calculator-section {
    margin-bottom: 24px;
}

.slider-value-display {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.slider-currency {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-muted);
}

.slider-amount-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    font-family: var(--font);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    outline: none;
    padding: 4px 0;
    transition: var(--transition);
    -moz-appearance: textfield;
}

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

.slider-amount-input:focus {
    border-bottom-color: var(--cyan);
}

/* ── Range Slider ──────────────────────────────────────────────────── */
.investment-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
    margin-bottom: 8px;
}

.investment-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--cyan);
    cursor: pointer;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    transition: var(--transition);
}

.investment-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.6);
}

.investment-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--cyan);
    cursor: pointer;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.investment-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: var(--radius-full);
}

.investment-slider::-moz-range-track {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

.slider-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Conversion Display ────────────────────────────────────────────── */
.conversion-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    text-align: center;
}

.conversion-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--cyan-subtle);
    border: 1px solid var(--cyan-dim);
    border-radius: 50%;
    animation: bounce-subtle 2s infinite;
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.conversion-result {
    width: 100%;
}

.conversion-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.conversion-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffb74d;
    line-height: 1.2;
}

.conversion-rate {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Two-Step Flow ─────────────────────────────────────────────────── */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-back-calc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back-calc:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.form-summary {
    display: flex;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.form-summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.form-summary-item span:first-child {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-summary-item span:last-child {
    font-size: 18px;
    font-weight: 700;
}

/* ── Room Grid Responsive — override for new layout ────────────────── */
@media (max-width: 900px) {
    .room-grid {
        grid-template-columns: 1fr !important;
    }

    .room-form-section {
        order: -1;
    }
}

/* ── WalletConnect Mobile Styles ──────────────────────────────────── */
.wallet-option-featured {
    border: 1px solid var(--cyan) !important;
    background: var(--cyan-subtle) !important;
}

.wallet-option-featured:hover {
    background: var(--cyan-dim) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 768px) ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .navbar {
        padding: 0 16px;
    }
    
    .nav-container {
        height: 56px;
    }
    
    .nav-brand img {
        height: 28px;
    }
    
    .hero-section {
        padding: 60px 0 50px;
    }
    
    .hero-title {
        font-size: 36px;
        letter-spacing: -0.5px;
    }
    
    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 28px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 16px;
        padding: 18px;
        margin-bottom: 28px;
    }
    
    .stat-divider {
        width: 60px;
        height: 1px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .section-subtitle {
        font-size: 14px;
        margin-bottom: 32px;
    }
    
    .rooms-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .room-card {
        padding: 22px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .step-card {
        padding: 24px 20px;
    }
    
    .footer {
        padding: 40px 0 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    /* Room page */
    .room-page {
        padding: 24px 16px 60px;
    }
    
    .room-header-content h1 {
        font-size: 28px;
    }
    
    /* Wallet balance in nav - hide on tablet */
    .wallet-balance {
        display: none;
    }
    
    /* Modal fixes */
    .modal-content {
        width: 92%;
        max-width: 400px;
        margin: 20px auto;
    }
}

/* ── Mobile (≤ 600px) ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .hero-title {
        font-size: 30px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        padding: 0 8px;
    }
    
    .hero-stats {
        gap: 12px;
        padding: 16px 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .hero-cta {
        padding: 14px 32px;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .room-title {
        font-size: 18px;
    }
    
    .room-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .room-stat-value {
        font-size: 16px;
    }
    
    .slider-amount-input {
        font-size: 28px;
    }

    .conversion-value {
        font-size: 22px;
    }

    .token-price-banner {
        flex-wrap: wrap;
    }

    .token-price-note {
        margin-left: 0;
        flex-basis: 100%;
    }
    
    /* Form fixes */
    .form-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-summary-item span:last-child {
        font-size: 16px;
    }
    
    /* Footer */
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ── Small Mobile (≤ 480px) ───────────────────────────────────────── */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .navbar {
        padding: 0 12px;
    }
    
    .nav-brand img {
        height: 24px;
    }
    
    .hero-section {
        padding: 40px 0 36px;
    }
    
    .hero-title {
        font-size: 26px;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .hero-stats {
        gap: 8px;
        padding: 14px 10px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 9px;
        letter-spacing: 0.5px;
    }
    
    .section-title {
        font-size: 22px;
        padding: 0 8px;
    }
    
    .section-subtitle {
        font-size: 13px;
        padding: 0 8px;
    }
    
    .room-card {
        padding: 18px;
    }
    
    .room-card-header {
        margin-bottom: 12px;
    }
    
    .room-icon {
        width: 36px;
        height: 36px;
    }
    
    .step-number {
        font-size: 28px;
    }
    
    .step-card h4 {
        font-size: 15px;
    }
    
    .step-card p {
        font-size: 13px;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .wallet-option {
        padding: 12px 14px;
    }
    
    .wallet-option-name {
        font-size: 14px;
    }
    
    /* Card bodies */
    .card-body {
        padding: 18px;
    }
    
    .card-header {
        padding: 16px 18px;
    }
}

/* ── Extra Small (≤ 375px) ────────────────────────────────────────── */
@media (max-width: 375px) {
    .hero-title {
        font-size: 23px;
    }
    
    .hero-subtitle {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .hero-stats {
        gap: 6px;
        padding: 12px 8px;
    }
    
    .btn-primary {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .room-title {
        font-size: 16px;
    }
    
    .room-description {
        font-size: 13px;
    }
}
