/* Clean Reset & Typography Foundations */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #000000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Sticky Navbar Layout with Drop Shadow */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
}

.logo {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.cta-btn {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cta-btn:hover {
    background-color: #222222;
}

/* Main Container Hierarchy */
.portal-container {
    width: 100%;
    max-width: 840px;
    margin-top: 60px;
    padding: 0 20px 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-title {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.sub-headline {
    font-size: 18px;
    color: #111111;
    font-weight: 400;
    margin-bottom: 48px;
}

.sub-headline strong {
    font-weight: 700;
}

/* Rigid Dynamic Animation Container */
.prompt-header-wrapper {
    width: 100%;
    max-width: 500px; 
    display: flex;
    justify-content: flex-start; 
    margin-bottom: 16px;
    padding-left: 28px; 
}

.prompt-header {
    font-size: 22px;
    color: #666666;
    font-weight: 400;
    display: flex;
    align-items: center;
    height: 30px;
    text-align: left;
    white-space: nowrap;
}

.static-prefix {
    color: #666666;
    display: inline-block;
    flex-shrink: 0;
}

#scroll-text {
    font-weight: 500;
    color: #000000;
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Custom Animation Slot Machine Classes */
.slide-out {
    transform: translateY(8px);
    opacity: 0;
}

.slide-in {
    transform: translateY(-8px);
    opacity: 0;
    animation: arrive 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes arrive {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Central Search Terminal Styling (Original Desktop Baseline Layout) */
.search-box-container {
    width: 100%;
    background-color: #ededed;
    border-radius: 28px;
    padding: 24px 28px 16px 28px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.search-input {
    width: 100%;
    height: 90px; 
    background: transparent;
    border: none;
    resize: none;
    outline: none;
    font-size: 16px;
    line-height: 1.5;
    color: #555555;
    padding-right: 80px;
}

.search-input::placeholder {
    color: #7a7a7a;
    opacity: 1;
}

.input-actions {
    position: absolute;
    bottom: 16px;
    right: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, color 0.15s ease;
}

.submit-btn {
    color: #0066cc;
}

.submit-btn:hover {
    transform: scale(1.05);
}

/* Ecosystem Pill Buttons Layout */
.segment-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
}

.segment-btn {
    flex: 1;
    background: #ffffff;
    border: 1px solid #444444;
    color: #000000;
    padding: 14px 0;
    border-radius: 24px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.segment-btn:hover {
    background-color: #f5f5f5;
    border-color: #000000;
}

/* --- ISOLATED MOBILE RULES (Only applies to small viewports) --- */
@media (max-width: 768px) {
    .navbar { 
        padding: 16px 20px; 
    }
    
    .logo {
        font-size: 18px;
    }
    
    .cta-btn {
        padding: 8px 18px;
        font-size: 12px;
    }

    .portal-container { 
        margin-top: 24px; 
        padding: 0 16px 40px 16px;
    }

    .main-title { 
        font-size: 28px; 
        line-height: 1.2;
    }
    
    .sub-headline { 
        font-size: 15px; 
        margin-bottom: 32px; 
    }

    /* Fixed Heading Wrapper Dimensions for Phone Screens */
    .prompt-header-wrapper { 
        max-width: 100%;
        padding-left: 12px;
        margin-bottom: 12px;
    }
    
    .prompt-header { 
        font-size: 16px; 
        height: auto;
        white-space: normal;
        display: block; 
        line-height: 1.4;
    }
    
    .static-prefix {
        display: inline;
    }
    
    #scroll-text {
        display: inline;
    }

    /* Optimized Mobile Text Area Framework - Clean, Trimmed Profile */
    .search-box-container {
        padding: 16px 20px 52px 20px; 
    }

    .search-input { 
        height: 85px; /* Compact mobile footprint */
        font-size: 14px; 
        line-height: 1.5;
        padding-right: 0;
    }
    
    .input-actions {
        bottom: 12px;
        right: 20px;
    }

    .segment-buttons { 
        flex-direction: column; 
        gap: 10px; 
        margin-top: 4px;
    }
    
    .segment-btn { 
        padding: 14px 0; 
        font-size: 11px;
        width: 100%;
    }
}