:root {
    --bg: #f8f8f8;       
    --text: #1d1d1f;     
    --muted: #6e6e73;    
    --card-bg: #ffffff;  
    --border-color: #e3e3e3; 
    --points-accent: #007aff; 
    --results-accent: #00A3C9; 
    --radius-default: 12px; 
    --light-grey: #cccccc; 
    
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: var(--text);
}
  
* { box-sizing: border-box; }
  
body {
    margin: 0;
    background: var(--bg);
    line-height: 1.6;
    padding-bottom: 50px; 
}

.wrap { 
    padding: 0 20px; 
    position: relative; 
    max-width: 1200px; 
    margin: 0 auto; 
}
#logo-link {
    position: absolute;
    top: 30px; left: 0; right: auto; z-index: 100;
    display: block; padding-left: 20px; 
}
#logo-link img { 
    height: 40px; 
    width: auto; 
    border-radius: 4px; 
}

.hero { 
    text-align: center; 
    padding: 80px 20px 40px; 
}
.hero h1 { 
    font-size: 3.5rem; 
    font-weight: 900; 
    color: var(--text); 
    margin-bottom: 10px; 
}
.hero .sub { 
    font-size: 1.25rem; 
    color: var(--muted); 
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 10px; 
}


/* --- TYPING ANIMATION --- */
.typing-text {
    border-right: 2px solid var(--text);
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: 0.05em; 
    animation: 
        typing 1.8s steps(18, end) forwards, 
        blink-caret 0.75s step-end infinite;
    display: inline-block;
    max-width: 0; 
}
@keyframes typing {
    from { max-width: 0 }
    to { max-width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--text); }
}

.desktop-note {
    font-size: 0.85rem;
    color: var(--muted); 
    font-weight: 500;
    margin-top: 5px;
    /* Hidden by default (desktop view) */
    display: none; 
    text-align: center; 
}


/* --- MAIN LAYOUT: GRID --- */
.main-content-panels {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    gap: 30px;
    margin: 0 auto;
    align-items: stretch; /* Ensures the columns stretch to match height */
    margin-bottom: 25px; 
}

.calculator-form-container {
    display: flex;
    flex-direction: column;
}

.results-panel-container {
    display: flex;
    flex-direction: column;
}

/* This spans the entire width for the table */
.scenario-section {
    grid-column: 1 / 3; 
    margin-top: -5px; 
}

/* --- INPUTS & SECTIONS (Clean Cards) --- */
.card-container {
    padding: 25px; 
    margin-bottom: 0; 
    background: var(--card-bg); 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-default); 
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.05), 
        inset 0 0 0 1px rgba(255, 255, 255, 0.5); 
}

.calculator-unified-input {
    flex-grow: 1; 
    padding-bottom: 50px; 
}


.section-separator {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0; 
}

/* RIGHT COLUMN FLEX ADJUSTMENTS */

.results-panel-container .results-panel {
    padding: 18px 25px; 
    margin-bottom: 20px; 
    flex-grow: 1; 
}

#projectSelectorContainer {
     padding: 30px 25px; 
     margin-bottom: 20px; 
}

#referral-box {
    padding: 30px 25px; 
    margin-bottom: 0; 
}


.card-container h2 {
    color: var(--text); 
    font-size: 1.2rem; 
    font-weight: 700;
    margin-top: 0; 
    margin-bottom: 15px; 
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color); 
}

.calculator-unified-input h2 {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    padding-bottom: 25px; 
    padding-top: 15px; 
}

.calculator-unified-input h2:first-of-type {
    padding-top: 0; 
}


.input-group {
    display: flex; 
    gap: 20px; 
    margin-bottom: 15px; 
}

.input-field { 
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

label { 
    display: block; 
    margin-bottom: 5px; 
    color: var(--muted); 
    font-size: 14px; 
    font-weight: 400; 
}

/* Input and Select Styling - Base Style */
.input-field input,
.input-field select { 
    width: 100%; 
    padding: 12px 15px; 
    background: var(--bg); 
    border: 1px solid var(--border-color); 
    color: var(--text);
    border-radius: 8px; 
    font-weight: 600;
    font-size: 16px; 
    text-align: right; 
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field input:focus,
.input-field select:focus {
    border-color: var(--points-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); 
}

/* Specific style for inputs using comma formatting */
.input-field input.formatted-input {
    padding-right: 15px; 
}

/* === X ALERTS TEXT LINK (FADED BACKGROUND EFFECT) === */
#XAlertsLink {
    text-decoration: none;
    font-weight: 700; 
    font-size: 0.95rem;
    padding: 12px 0; 
    color: var(--light-grey); 
    opacity: 0.9; 
    transition: opacity 0.3s ease-in-out, color 0.3s ease-in-out;
}

#XAlertsLink:hover {
    opacity: 1.0; 
    color: var(--text); 
}


/* === CUSTOM STYLING FOR PROJECT SELECTOR === */
#projectSelectorContainer h2 {
    display: none; 
}

#projectSelectorContainer #projectSelector {
    width: 100%; 
    padding: 12px 15px; 
    background: var(--bg); 
    border: 1px solid var(--border-color); 
    color: var(--text);
    border-radius: 8px; 
    font-weight: 600;
    font-size: 16px; 
    text-align: right !important; 
    text-align-last: right !important; 
    appearance: none !important; 
    -webkit-appearance: none !important; 
    -moz-appearance: none !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%236e6e73" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    padding-right: 30px !important; 
}


/* --- RESULTS PANEL (Key Metrics) --- */
.results-panel h2 {
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.primary-metrics {
    list-style: none;
    padding: 0;
    margin-bottom: 0; 
}
.primary-metrics li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0; 
    border-bottom: 1px dotted var(--border-color);
    font-size: 17px;
}
.primary-metrics li:last-child {
    border-bottom: none;
}
.primary-metrics .metric-label {
    color: var(--text);
    font-weight: 500;
}
.primary-metrics .metric-value {
    font-weight: 700;
    color: var(--results-accent); 
    text-align: right;
    font-variant-numeric: tabular-nums; 
}

.plug-container {
    margin-top: 10px; 
    padding-top: 5px; 
    border-top: 1px solid var(--border-color);
    text-align: right;
    font-size: 0.85rem;
    color: var(--muted);
}
.plug-container a {
    color: var(--points-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.plug-container a:hover {
    color: var(--text);
}


/* --- REFERRAL BOX STYLING (Separate Card in Right Column) --- */
#referral-box {
    text-align: center;
}

#referral-box h2 {
    font-size: 1.1rem;
    border: none;
    margin-bottom: 5px; 
    padding-bottom: 0;
}

#referral-box .support-text {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px; 
    font-weight: 500;
    line-height: 1.3; 
}

#referral-box .logo-link-box {
    display: inline-block; 
    background-color: transparent; 
    border-radius: 0; 
    text-decoration: none; 
    transition: transform 0.2s; 
    box-shadow: none; 
    padding: 0; 
    line-height: 0; 
}

#referral-box .logo-link-box:hover {
    transform: translateY(-2px); 
}

#referral-box .project-logo {
    height: 64px; 
    width: auto;
    object-fit: contain; 
    margin-right: 0; 
    border-radius: 8px; 
    display: block; 
}


/* --- Scenario Table Styling (Full Width) --- */
.scenario-section {
    padding-top: 25px;
    padding-bottom: 25px;
    border-left: 4px solid var(--results-accent); 
}

.scenario-section h2 {
     color: var(--text); 
     border-bottom: 1px solid var(--border-color);
     padding-bottom: 10px;
}

#marketCapScenarioTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 1.1rem;
}

#marketCapScenarioTable th {
    color: var(--muted);
    padding: 12px 10px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 500;
    text-align: left; 
    text-transform: uppercase;
    font-size: 0.9rem;
}
/* Rule for right-aligning the airdrop value header */
#marketCapScenarioTable th.value-col-header {
    text-align: right;
}

#marketCapScenarioTable td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border-color);
}

#marketCapScenarioTable tr:last-child td {
    border-bottom: none;
}

.cap-col {
    font-weight: 600;
}
.value-col {
    font-weight: 800;
    color: var(--results-accent);
    text-align: right;
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

/* --- MEDIA QUERY for smaller screens (mobile/tablet) --- */
@media (max-width: 1000px) {
    .main-content-panels {
        grid-template-columns: 1fr; 
        gap: 20px;
    }

    .calculator-form-container,
    .results-panel-container,
    .scenario-section {
        grid-column: 1 / 2;
        grid-row: auto;
    }
    
    /* Reset flex properties for mobile/single column layout */
    .calculator-form-container {
        display: block;
    }
    .calculator-unified-input {
        flex-grow: 0; 
        padding-bottom: 25px; /* Reset padding to default on mobile */
    }

    /* Reset flex properties and padding on mobile */
    .results-panel-container {
        display: block;
    }
    .results-panel-container .results-panel {
        flex-grow: 0;
        margin-bottom: 20px; 
        padding: 25px; 
    }
    .results-panel-container #projectSelectorContainer {
         margin-bottom: 20px; 
         padding: 25px; 
    }
    /* Ensure final card has margin on mobile */
    #referral-box {
        margin-bottom: 20px;
        padding: 25px; 
    }
    
    .hero h1 { font-size: 2.5rem; } /* Tablet size */
    .hero .sub { font-size: 1rem; }
    
    .desktop-note {
        display: block !important; 
        margin-bottom: 10px;
    }
    
    .typing-text {
        max-width: 100% !important; /* Force text to appear immediately */
        border-right: none !important; /* Remove the blinking cursor */
        animation: none !important; /* Stop the animation */
    }
}

/* --- FIX: Specific Media Query for Small Phones (< 600px) to prevent headline cutoff --- */
@media (max-width: 600px) {
    .hero h1 { 
        font-size: 1.75rem; /* Reduced size to ensure the full headline fits */
        line-height: 1.2;
    }
}

/* ---------------------------------------------------------------------- */
/* --- GATING MODAL (Sleek/Frosted Light Mode) ---- */
/* ---------------------------------------------------------------------- */

/* Full-screen backdrop using deep blur and light transparency */
.gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6); 
    backdrop-filter: blur(15px) brightness(1.1);
    -webkit-backdrop-filter: blur(15px) brightness(1.1);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The actual modal card */
.gate-content {
    background: var(--card-bg); 
    border: 1px solid rgba(0, 0, 0, 0.08); 
    border-radius: 20px; 
    padding: 35px 45px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05); 
    color: var(--text);
    animation: fadeIn 0.4s ease-out; 
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gate-content h2 {
    color: var(--text);
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.8rem;
    font-weight: 900;
    border-bottom: none;
}

.gate-content p {
    color: var(--muted);
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.4;
}

.social-ctas {
    margin-bottom: 25px;
}

/* Base style for CTA buttons */
.cta-button {
    text-decoration: none;
    padding: 14px 25px; 
    border-radius: 10px; 
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
    transition: all 0.2s;
    border: none;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit; 
    letter-spacing: 0.5px;
}

/* Twitter button styling */
.twitter-button {
    background: #1da1f2; 
    color: white;
    box-shadow: 0 8px 15px rgba(29, 161, 242, 0.3); 
}

.cta-button:hover {
    transform: translateY(-2px);
    opacity: 1;
    box-shadow: 0 10px 20px rgba(29, 161, 242, 0.4); 
}

/* Unlock button when disabled (Subtle grey) */
.unlock-button {
    width: 100%;
    background: var(--bg); 
    color: var(--muted);
    padding: 15px 25px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: not-allowed;
    margin-top: 15px;
    transition: all 0.3s;
    opacity: 0.6;
}

/* Style for when the unlock button is enabled (Cyan/Blue accent) */
.unlock-button:not(:disabled) {
    background: var(--points-accent); 
    color: white;
    cursor: pointer;
    opacity: 1;
    border-color: var(--points-accent);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.unlock-button:not(:disabled):hover {
    background: #006ce6; 
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 122, 255, 0.4);
}
