/* ==========================================
   GLOBAL RESET & VARIANT ARCHITECTURE
   ========================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', sans-serif; 
}

:root {
    --bg-dark: #0a0a0c; 
    --text-main: #ffffff; 
    --text-muted: #888892;
    --glass-bg: rgba(20, 20, 25, 0.6); 
    --glass-border: rgba(255, 255, 255, 0.08);
    --flat-grey-bg: #141416; 
    --flat-grey-panel: #1c1c1f; 
    --flat-grey-border: #2a2a2e; 
    --flat-grey-input: #232326;
    --btn-theme: linear-gradient(-45deg, #9333ea, #6b21a8, #4ade80, #9333ea);
    --btn-green: #4ade80;
    --theme-purple: #9333ea;
    --up: #4ade80; 
    --up-bg: rgba(74, 222, 128, 0.15); 
    --down: #ef4444; 
    --down-bg: rgba(239, 68, 68, 0.15);
}

body { background-color: var(--bg-dark); color: var(--text-main); overflow-x: hidden; line-height: 1.6; }
html { scroll-behavior: smooth; }
.content-wrapper { width: 86%; max-width: 1800px; margin: 0 auto; }

/* ==========================================
   BACKGROUND ENGINE & TRANSITION OVERLAYS
   ========================================== */
#three-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; pointer-events: none; }
#hex-stream-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; overflow: hidden; }

.view-container { display: none; }
.view-container.active { display: block; animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.loader-spinner { display: inline-block; width: 30px; height: 30px; border: 3px solid rgba(255,255,255,0.1); border-radius: 50%; border-top-color: var(--theme-purple); animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.loader-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; background: var(--bg-dark); z-index: 9999; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.loader-overlay.active { display: flex; opacity: 1; }
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 30px; }

.block-loader { position: relative; width: 78px; height: 78px; transform: rotateX(-35deg) rotateY(45deg); transform-style: preserve-3d; }
.block-item { position: absolute; width: 24px; height: 24px; background: #a855f7; transform-style: preserve-3d; animation: blockBuild 3s ease-in-out infinite; }
.block-item::before { content: ''; position: absolute; top: 100%; left: 0; width: 24px; height: 24px; background: #7e22ce; transform-origin: top; transform: rotateX(-90deg); }
.block-item::after { content: ''; position: absolute; top: 0; left: 100%; width: 24px; height: 24px; background: #581c87; transform-origin: left; transform: rotateY(90deg); }
.b1 { top: 0; left: 0; animation-delay: 0s; } .b2 { top: 0; left: 26px; animation-delay: 0.15s; } .b3 { top: 0; left: 52px; animation-delay: 0.3s; }
.b4 { top: 26px; left: 0; animation-delay: 0.15s; } .b5 { top: 26px; left: 26px; animation-delay: 0.3s; } .b6 { top: 26px; left: 52px; animation-delay: 0.45s; }
.b7 { top: 52px; left: 0; animation-delay: 0.3s; } .b8 { top: 52px; left: 26px; animation-delay: 0.45s; } .b9 { top: 52px; left: 52px; animation-delay: 0.6s; }
@keyframes blockBuild { 0% { transform: translateZ(120px); opacity: 0; } 20%, 80% { transform: translateZ(0px); opacity: 1; } 100% { transform: translateZ(-120px); opacity: 0; } }

/* ==========================================
   PERSISTENT FIXED HEADER LAYOUT
   ========================================== */
.top-header { position: fixed; top: 0; left: 0; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 15px 2%; z-index: 1000; background: rgba(10, 10, 12, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); }
#main-content { padding-top: 80px; } 
.logo-container img { height: 44px; display: block; }

.nav-links { position: fixed; top: 0; left: 50%; transform: translateX(-50%); height: 75px; display: flex; align-items: center; gap: 30px; z-index: 1001; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 600; transition: color 0.2s; display: flex; align-items: center; gap: 8px;}
.nav-links a svg { display: none; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

.flat-btn { background: transparent; color: var(--text-main); border: 1px solid var(--text-main); padding: 12px 24px; font-weight: 600; font-size: 13px; cursor: pointer; transition: transform 0.2s, opacity 0.2s; border-radius: 8px; text-align: center; }
.flat-btn.primary, .theme-gradient-btn, .execution-btn { background: var(--btn-theme); background-size: 300% 300%; animation: btnFlow 12s ease infinite; color: #fff; border: none; font-weight: 700; box-shadow: 0 4px 15px rgba(147, 51, 234, 0.2); }
.flat-btn.primary:hover, .theme-gradient-btn:hover, .execution-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(74, 222, 128, 0.3); }

@keyframes btnFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* ==========================================
   HERO DISPLAY (SPLIT LAYER CONFIG)
   ========================================== */
.hero-section { padding: 40px 0 60px 0; } 
.hero-layout { display: flex; align-items: center; gap: 50px; }
.hero-text-summary { flex: 0.8; padding-right: 20px; }
.hero-title { font-size: 42px; font-weight: 900; line-height: 1.1; margin-bottom: 16px; color: #fff; letter-spacing: -1px; }
.hero-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 30px; line-height: 1.6; }

.hero-visuals { flex: 1.2; display: flex; flex-direction: column; align-items: center; width: 100%; overflow: hidden; }
.hero-image-scroller { position: relative; width: 100%; height: auto; aspect-ratio: 6 / 1; border-radius: 20px; overflow: hidden; border: 1px solid var(--glass-border); background: var(--bg-dark); }
.scroller-track { display: flex; width: 300%; height: 100%; transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
.scroller-slide { width: 33.3333%; height: 100%; }
.ad-banner-img { width: 100%; height: 100%; object-fit: cover; display: block; } 

.slider-dots { display: flex; gap: 8px; margin-top: 16px; justify-content: center; width: 100%; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); cursor: pointer; transition: 0.3s; }
.dot.active { background: var(--btn-green); width: 24px; border-radius: 4px; }

/* ==========================================
   TERMINAL INTERFACES & MARKET GRIDS
   ========================================== */
.terminal-preview-section { padding: 20px 0 40px 0; }
.section-heading { font-size: 32px; font-weight: 800; letter-spacing: -1px; }

.token-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.token-card { background: var(--flat-grey-panel); border: 1px solid var(--flat-grey-border); border-radius: 12px; padding: 20px; transition: 0.2s; position: relative; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.token-card:hover { border-color: rgba(255,255,255,0.3); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.token-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px;}
.token-card-left { display: flex; gap: 15px; align-items: center; }
.token-logo-wrap { width:48px; height:48px; min-width:48px; border-radius:10px; background:#1a1a20; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.token-logo-wrap img { width:100%; height:100%; object-fit:cover; }
.token-card-title { font-weight: 800; font-size: 15px; line-height: 1.2; display: flex; flex-direction: column; align-items: flex-start;}
.token-card-badge { display: inline-block; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-top: 5px; font-weight: 600;}
.token-card-change { font-size: 11px; font-family: 'JetBrains Mono', monospace; font-weight: 700; padding: 4px 8px; border-radius: 4px; }
.token-card-change.up { background: var(--up-bg); color: var(--up); }
.token-card-change.down { background: var(--down-bg); color: var(--down); }
.token-card-stats { margin-bottom: 15px; }
.stat-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; color: var(--text-muted); }
.stat-row .val { color: var(--text-main); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.token-progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; margin-bottom: 6px;}
.token-progress-fill { height: 100%; background: var(--up); border-radius: 3px;}
.token-progress-text { text-align: right; font-size: 10px; color: var(--up); font-family: 'JetBrains Mono', monospace; }

/* ==========================================
   DYNAMIC LIQUIDITY PANELS & MATRIX DATA
   ========================================== */
.gradient-text { background: linear-gradient(135deg, #9333ea, #4ade80); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.liquidity-row { cursor: pointer; transition: background-color 0.2s; }
.liquidity-row:hover { background-color: rgba(255,255,255,0.03); }
.double-logo { display: inline-block; position: relative; width: 44px; height: 28px; vertical-align: middle; }
.double-logo img { width: 28px; height: 28px; border-radius: 50%; position: absolute; top: 0; background: #1a1a20; border: 2px solid var(--flat-grey-panel); object-fit: cover; }
.double-logo img:first-child { left: 0; z-index: 2; }
.double-logo img:last-child { left: 16px; z-index: 1; }

.glass-table-wrapper { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; backdrop-filter: blur(10px); margin-bottom: 30px; }
.preview-table { width: 100%; border-collapse: collapse; text-align: left; min-width: 700px; }
.preview-table th { padding: 20px; font-size: 12px; color: var(--text-muted); text-transform: uppercase; border-bottom: 1px solid var(--glass-border); }
.preview-table td { padding: 16px 20px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.02); vertical-align: middle;}
.val-mono { font-family: 'JetBrains Mono', monospace; font-size: 13px;}
.text-up { color: var(--up); } .text-down { color: var(--down); }

/* ==========================================
   PANEL MODULES & ATOMIC INPUTS
   ========================================== */
.flat-grey-panel { width: 100%; background-color: var(--flat-grey-panel); border: 1px solid var(--flat-grey-border); padding: 50px; border-radius: 16px;}
.form-group { margin-bottom: 25px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.flat-input { width: 100%; background: var(--flat-grey-input); color: var(--text-main); border: 1px solid var(--flat-grey-border); padding: 14px; font-size: 14px; outline: none; border-radius: 8px;}

/* ==========================================
   LAUNCHPAD ARCHITECT
   ========================================== */
.launch-fullscreen-wrapper { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.launch-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; background: var(--flat-grey-panel); padding: 50px; border-radius: 16px; border: 1px solid var(--flat-grey-border); max-width: 1200px; width: 100%; box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.panel-header h2 { font-size: 28px; font-weight: 900; }
.panel-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.warning-banner { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #ff8a8a; padding: 12px; font-size: 12px; border-radius: 8px; margin-bottom: 30px; font-weight: 600;}

.upload-preview { width: 100%; height: 200px; background: var(--flat-grey-input); border: 2px dashed var(--flat-grey-border); border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; margin-bottom: 25px; transition: 0.2s; overflow: hidden; }
.upload-preview:hover { border-color: var(--btn-green); background: rgba(74, 222, 128, 0.05); }
.upload-preview span { color: var(--text-muted); font-size: 14px; font-weight: 600; pointer-events: none; z-index: 2; position: absolute;}

.toggles-wrapper { display: flex; flex-direction: column; gap: 15px; margin-bottom: 30px; }
.flat-toggle-card { display: flex; justify-content: space-between; align-items: center; background: var(--flat-grey-input); padding: 15px 20px; border-radius: 8px; border: 1px solid var(--flat-grey-border); }
.toggle-info strong { display: block; font-size: 14px; margin-bottom: 4px; color: var(--text-main); }
.toggle-info p { font-size: 12px; color: var(--text-muted); margin: 0; }
.tag-coming-soon { background: rgba(255, 255, 255, 0.15); color: #ffffff; font-size: 9px; padding: 3px 6px; border-radius: 4px; margin-left: 8px; vertical-align: middle; font-weight: 700; border: 1px solid rgba(255, 255, 255, 0.3); }

.flat-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.flat-switch input { opacity: 0; width: 0; height: 0; }
.flat-switch .switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--bg-dark); transition: .4s; border-radius: 24px; border: 1px solid var(--flat-grey-border); }
.flat-switch .switch-slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: var(--text-muted); transition: .4s; border-radius: 50%; }
.flat-switch input:checked + .switch-slider { background: var(--btn-theme); background-size: 300% 300%; animation: btnFlow 12s ease infinite; border-color: transparent; }
.flat-switch input:checked + .switch-slider:before { transform: translateX(20px); background-color: #fff; }

.launch-btn { margin-top: 15px; font-size: 18px; padding: 20px; }

/* Tag Button Interactions */
.detail-tab { display: flex; align-items: center; gap: 8px; background: transparent; border: none; color: var(--text-muted); padding: 10px 20px; font-size: 14px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.detail-tab:hover { background: rgba(255,255,255,0.03); }
.tag-btn { border: 1px solid var(--flat-grey-border); }
.tag-btn.hidden { display: none !important; }

/* Interactive Tag Input Field */
.tag-input-container { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 14px; min-height: 46px; background: var(--flat-grey-input); border: 1px solid var(--flat-grey-border); border-radius: 8px; transition: border-color 0.2s; }
.tag-input-container:focus-within { border-color: var(--btn-green); }
.tag-input-container input { background: transparent; border: none; color: #fff; outline: none; font-size: 13px; flex: 1; min-width: 80px; }

.tag-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(147, 51, 234, 0.15); color: #d8b4fe; border: 1px solid rgba(147, 51, 234, 0.3); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.tag-chip .remove-tag { cursor: pointer; font-weight: bold; font-size: 14px; line-height: 1; opacity: 0.7; transition: opacity 0.2s; }
.tag-chip .remove-tag:hover { opacity: 1; }

/* ==========================================
   FOOTER SCROLLER & DISCLAIMER
   ========================================== */
.main-footer { margin-top: 20px; padding-bottom: 40px; }

.partner-scroller { 
    overflow: hidden; 
    white-space: nowrap; 
    width: 100%; 
    border-top: 1px solid var(--glass-border); 
    border-bottom: 1px solid var(--glass-border);
    padding: 30px 0; 
    background: #0d0d10; 
    margin-bottom: 40px;
}
.partner-track { display: inline-block; animation: scrollMarquee 25s linear infinite; }
.partner-item { 
    display: inline-flex; 
    align-items: center; 
    gap: 12px; 
    margin: 0 40px; 
    font-weight: 700; 
    color: var(--text-muted); 
    font-size: 14px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    transition: 0.3s;
}
.partner-item img, .partner-item svg { height: 26px; filter: grayscale(100%) opacity(0.5); transition: 0.3s; }
.partner-item:hover img, .partner-item:hover svg { filter: grayscale(0%) opacity(1); }
.partner-item:hover { color: #fff; }

@keyframes scrollMarquee { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(-50%); } 
}

/* ==========================================
   MODAL PLATFORMS
   ========================================== */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.9); z-index: 2000; display: none; justify-content: center; align-items: center; padding: 20px;}
.modal-overlay.active { display: flex; }
.modal-content { width: 100%; max-width: 1600px; height: 95vh; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 8px; display: flex; flex-direction: column; backdrop-filter: blur(20px);}
.modal-header { padding: 15px 20px; border-bottom: 1px solid var(--glass-border); display: flex; justify-content: space-between; align-items: center; }
.close-btn { background: transparent; border: none; color: #fff; font-size: 28px; cursor: pointer; line-height: 1;}
.iframe-container { flex: 1; width: 100%; height: 100%; }
.iframe-container iframe { width: 100%; height: 100%; border: none; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }

/* DexScreener embeds — tall enough for ~70 rows */
.dex-embed-wrapper {
    padding: 0;
    overflow: hidden;
    height: calc(52px * 70);
    min-height: 600px;
}
.dex-embed-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: transparent;
}

/* ==========================================
   RESPONSIVE OVERRIDES
   ========================================== */
@media (max-width: 992px) {
    .hero-search-bar { max-width: 500px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .top-header { position: fixed; } 
    #main-content { padding-bottom: 0px; } 

    .nav-links { position: fixed; top: auto; bottom: 0; left: 0; width: 100%; height: auto; transform: none; background: rgba(10, 10, 12, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--glass-border); padding: 12px 5% calc(12px + env(safe-area-inset-bottom, 15px)); display: flex; justify-content: space-between; gap: 0; z-index: 2000; }
    .nav-links a { flex-direction: column; font-size: 10px; gap: 4px;}
    .nav-links a svg { display: block; }
    
    .hero-layout { display: block; }
    .hero-section { padding: 20px 0 10px 0; } 
    .hero-text-summary { display: none; } 
    .hero-visuals { flex: 1; width: 100%; }
    .hero-image-scroller { aspect-ratio: 6 / 1; border-radius: 12px; margin-top: 10px; } 

    .terminal-preview-section { padding: 10px 0 25px 0; }
    
    .token-grid { grid-template-columns: 1fr; gap: 10px; } 
    .token-card { padding: 12px; display: grid; grid-template-columns: 44px 1fr auto; grid-template-rows: auto auto auto; grid-template-areas: "logo title change" "logo stats stats" "logo progress progress"; gap: 4px 12px; align-items: center; border-radius: 8px; }
    .token-card-header, .token-card-left { display: contents; }
    .token-logo-wrap { grid-area: logo; width: 44px; height: 44px; min-width: 44px; border-radius: 8px; align-self: start; }
    .token-card-title { grid-area: title; flex-direction: row; gap: 8px; align-items: center; margin-bottom: 0;} 
    .token-card-title span { font-size: 13px; }
    .token-card-badge { margin-top: 0; font-size: 8px; padding: 2px 4px; }
    .token-card-change { grid-area: change; align-self: start; font-size: 10px; padding: 2px 6px; }
    .token-card-stats { grid-area: stats; margin-bottom: 0; }
    .stat-row { margin-bottom: 2px; font-size: 10px; }
    .stat-row .val { font-size: 10px; }
    .token-progress-container { grid-area: progress; display: flex; align-items: center; gap: 8px; margin-top: 4px; margin-bottom: 0;}
    .token-progress-bar { flex: 1; margin-bottom: 0; height: 4px; }
    .token-progress-text { font-size: 9px; display: inline-block; margin-bottom: 0; }

    .modal-content { height: 95vh; margin-top: 10px;}
    .content-wrapper { width: 92%; } 
    .launch-grid { grid-template-columns: 1fr; gap: 30px; padding: 25px; margin-bottom: 40px; }
    .upload-preview { height: 160px; }
    .social-links-grid { grid-template-columns: 1fr !important; gap: 0 !important; }
    .flat-toggle-card { align-items: flex-start; gap: 12px; padding: 12px 15px;}
    .flat-switch { align-self: flex-end; margin-top: -24px; }
    
    .main-footer { margin-top: 0px; padding-bottom: 100px; }
    .partner-scroller { padding: 15px 0; margin-bottom: 20px; }
    .partner-item { margin: 0 20px; font-size: 12px; }
    .partner-item img, .partner-item svg { height: 20px; }
}