body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: black;
    min-height: 500px;
    margin: 0;
    text-align: center;
    color:white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.ui {
    animation: slideDown 0.8s ease-out forwards;
}
header {
    padding: 20px 20px 20px 80px; /* Shifted right to make room for the menu button */
}
span {
    color:white;
}
button {
    color: #ffffff;
    background-color: #00c3ff;
    margin: 10px;
    border-radius: 10px;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 1rem;
    border: none;
    font-family: 'Google Sans', -apple-system, sans-serif;
    transition: opacity 0.15s ease, transform 0.1s ease;
}
button:hover { opacity: 0.88; }
button:active { transform: scale(0.97); }
h1 { margin: 20px auto; font-size: 3rem; color: #fff; font-weight: 700; letter-spacing: -0.02em; }
h2 { margin: 20px auto; font-size: 1.5rem; color: #ababab; font-weight: 600; }
p { margin: 20px auto; color: #6e6e6e; line-height: 1.6; }
input[type="text"] {
    padding: 10px;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    font-size: 1rem;
    margin: 10px;
    color: #fff;
    transition: border-color 0.2s ease, background 0.2s ease;
}
input[type="text"]:focus {
    border-color: #00c3ff;
    background: rgba(255,255,255,0.06);
    outline: none;
}
input[type="email"] {
    padding: 10px;
    max-width: 400px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    font-size: 1rem;
    color: #fff;
    margin: 10px;
    transition: border-color 0.2s ease;
}
input[type="email"]:focus {
    border-color: #00c3ff;
    outline: none;
}
input[type="password"] {
    padding: 10px;
    max-width: 400px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    font-size: 1rem;
    color: #fff;
    margin: 10px;
    transition: border-color 0.2s ease;
}
input[type="password"]:focus {
    border-color: #00c3ff;
    outline: none;
}
#login-button {
        margin: 0 auto;
        position: relative;
        top: -120px;
    }
/* Menu Trigger Button (Three Lines) */
.menu-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1000000;
}

.menu-btn span {
    display: block;
    height: 4px;
    width: 100%;
    background-color: #555;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger Animation Transforms */
.menu-btn.open span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.menu-btn.open span:nth-child(2) {
    opacity: 0;
}
.menu-btn.open span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}
.box {
    background: rgba(39, 39, 39, 0.2);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 28px;
    padding: 2.8rem 2.2rem;
    text-align: center;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}
/* Sliding Navigation Drawer Section */
#ai-directory {
    position: fixed;
    top: 0;
    left: -320px; /* Fully hidden off-screen initially */
    width: 250px;
    height: 100vh;
    padding: 80px 20px 20px 20px;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Smooth slide curve */
    z-index: 99999;
    box-sizing: border-box;
    overflow-y: auto;
    background: rgba(13, 15, 18, 0.85);
    backdrop-filter: blur(20px);
}

/* Revealed Slide State */
#ai-directory.open {
    left: 0;
}

#ai-directory h2 {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8895a7;
}

/* Navigation Links Styling */
.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-list li {
    margin-bottom: 6px;
}

.links-list a {
    display: block;
    text-decoration: none;
    color: #e8edf3;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 14px;
}

.links-list a:hover {
    background: rgba(0, 118, 255, 0.12);
    color: #6cb4ee;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 20px;
}
#app-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Your exact customized gradient styling */
    background: linear-gradient(145deg, #0b0e12fa 0%, #072c57fa 100%);
    
    will-change: transform;
    
    /* Drop it to the absolute bottom layer behind your interface */
    z-index: -100000000; 
}
#menu-toggle{
    position: fixed;
}
.ad-top-box {
    width: 95%;
    max-width: 970px; /* Limits size to premium landscape slots */
    height: 90px;
    margin: 20px auto; /* Centers the banner on the screen layout */
    position: relative;
    display: block;
}
.ad-sidebar-box {
    position: fixed;
    top: 30px;
    right: 25px; /* Anchors it cleanly to the right edge */
    left: auto;
    width: 300px; /* Locked to fit your 300x600 skyscraper ad size */
    height: 600px;
    margin-left: 20px; /* Invisible barrier protecting the chat window layout */
    z-index: 1000;
}


.clear-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 10px !important;
    font-family: 'Google Sans', sans-serif;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    margin: 0;
    position: fixed;
    right: 15px;
    left: auto;
    top: 15px;

  }

  
  
#ad-mobile-footer-auction {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 250px;
    transition: left 0.3s ease-in-out;
    z-index: 1000;
    box-sizing: border-box;
    background: transparent !important;
    display: none; /* Hidden on desktop, shown on mobile via media query */
    justify-content: center;
    align-items: center;
}
#account-img {
    width: 50px;
    margin: 0;
    margin-top: -80px;
}
#account {
    display:flex;justify-content: center;align-items: center;
}
#account-btn {
    transform: none;

    left: 0;
    position: absolute;
    right: 0;
    top: 75px;
    bottom: auto;
}

  label {
    color:white;
  }
  #ad-sidebar-auction {
    position: absolute;
    right: 25px;
    left:auto;
    top:20px;
    width: 300px;
    height: 100vh;
    transition: left 0.3s ease-in-out; /* Smooth slide-in effect */
    z-index: 1000; /* Ensure it sits above other content */
    box-sizing: border-box;
    background: transparent !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 30px;
    padding-bottom: 30px;
}
.sidebar-ad-slot {
    width: 300px;
    height: 250px;
    flex-shrink: 0;
    background: transparent !important;
}
.chat-settings-panel {
      position: relative;
      top: 30px;
      left: 50%;
      transform: translateX(-50%);
      max-width: 100%;
      z-index: 70;
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .chat-settings-panel > div:first-child {
      font-size: 13px;
      font-weight: 700;
      color: #fff;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .chat-settings-title {
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      max-width: 90%;
      letter-spacing: 0.08em;
    }

    .chat-settings-status {
      font-size: 11px;
      max-width: 90%;
      color: #8dc6ff;
      font-weight: 500;
    }

    .chat-settings-panel label {
      font-size: 10px;
      color: #8895a7;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-top: 4px;
    }

    .chat-settings-group {
      display: flex;
      flex-direction: column;
      gap: 4px;
      max-width: 90%;
    }

    .chat-settings-group label {
      font-size: 11px;
      max-width: 90%;
    }

    .chat-settings-panel input,
    .chat-settings-panel textarea, .chat-settings-panel select, .chat-settings-panel button {
    box-sizing: border-box;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 12px;
    max-width: 90%;
    font-family: 'Google Sans', sans-serif;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
    color: white;
    margin: 0;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.1);
    transition: border-color 0.2s ease, background 0.2s ease;
}

    .chat-settings-panel input:focus,
    .chat-settings-panel textarea:focus,
    .chat-settings-panel select:focus {
      border-color: #6cb4ee;
      outline: none;
      background: rgba(108,180,238,0.05);
    }

    .chat-settings-panel textarea {
      min-height: 70px;
      max-width: 90%;
      resize: vertical;
      line-height: 1.5;
    }

    .chat-settings-row {
      display: flex;
      align-items: center;
      gap: 10px;
      max-width: 90%;
    }

    .chat-settings-row input[type="range"] {
      flex: 1;
      padding: 0;
      max-width: 90%;
    }

    .chat-settings-row span {
      min-width: 48px;
      text-align: right;
      font-size: 10px;
      color: #8895a7;
      font-weight: 600;
    }

    .chat-settings-actions {
      position: relative;
      max-width: 80%;
      padding: 8px 16px;
      font-size: 0.85rem;
      border-radius: 10px;
      background: linear-gradient(135deg, #00c3ff, #6cb4ee);
      color: #000;
      font-weight: 700;
      cursor: pointer;
      transition: opacity 0.15s, transform 0.1s;
    }

    .chat-settings-actions:hover {
      opacity: 0.88;
      transform: translateY(-1px);
    }

    input[type="range"] {
        padding: 0 !important;
        accent-color: #6cb4ee;
    }

    select, select:focus, select:active {
        background: rgba(0,0,0,0.4) !important;
        color: #fff !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        border-radius: 8px !important;
    }
    select option {
        background: #0d0f12 !important;
        color: #fff !important;
    }
@keyframes slideDown {
    from {
        transform: translateY(-30%); /* Starts completely above its normal position */
        opacity: 0;                   /* Optional: fades the text in simultaneously */
    }
    to {
        transform: translateY(0);     /* Lands exactly where it belongs */
        opacity: 1;
    }
}




/* Hide this mobile box automatically on desktop computers */
@media screen and (min-width: 866px) {
    .ad-mobile-footer-box {
        display: none !important;
    }
    
    #sage-chat {
        top:0px !important;
        height:calc(100vh - 160px) !important;
    }

    .sage-input-row {
        top: calc(100vh - 160px) !important;
    }
      
}

@media screen and (max-width: 865px) {
    /* 1. Top ad removed - only footer ad */
    
    /* 2. MOBILE FOOTER: absolute positioning, centered */
    #ad-mobile-footer-auction { 
      display: flex !important;
      position: absolute !important;
      bottom: 0 !important;
      left: 50% !important;
      transform: translateX(-50%) !important;
      height: 250px !important;
      z-index: 100000 !important;
    } 

    /* Hide footer ad when mobile keyboard is open */
    body.keyboard-open #ad-mobile-footer-auction {
      display: none !important;
    }
  
    /* 3. Pull chat up to the top */
    #sage-chat {
      top: 0 !important;
      height: calc(100vh - 400px) !important;
    }
  
    /* 4. WIDEN CHAT INPUTS: Pull it up safely above the 250px footer ad height */
    .sage-input-row {
      top: calc(100vh - 400px) !important;
    }
  
    #ad-sidebar-auction { display: none !important; } 
  
  
    /* 5. CHAT CANVAS WINDOW: Gives text heavy scrolling margins */
    #app { 
      width: 90% !important;
      left: 50% !important;
      transform:translateX(-50%);
    } 
  }
  
.selected-model{
    background-color: #4076b475 !important;
}  
@media screen and (max-width: 750px) {
    body {
        font-size: 14px !important;
    }
    h1 {
        font-size: 2rem !important;
    }
    h2 {
        font-size: 1.2rem !important;
    }
    p {
        font-size: 0.9rem !important;
    }
    button {
        font-size: 1rem !important;
        
    }
   
    #login-button {
        font-size: 1rem !important;
        padding: 8px 16px !important;
    }
    #model-select {
        display: none !important; /* Hide the model select dropdown on small screens */
    }
    #sage-inp {
        padding-right: 55px !important;
    }
    .send-btn {
        padding: 8px 16px !important;
    }

}
/* ==========================================================================
   VERTICAL COMPRESSION PROTECTOR (Kicks in when height is under 600px)
   ========================================================================== */
   @media screen and (max-height: 600px) {
    /* 1. Scale down the input row height to give your chat room to breathe */
    .sage-input-row {
      height: 90px !important;
      max-height: 90px !important;
          top: calc(100vh - 340px) !important;
    }
  
    /* 2. Scale down the textarea height to fit the new tighter row footprint */
    #sage-inp {
      min-height: 90px !important;
      max-height: 90px !important;
    }
  
    /* 3. Pull the chat screen up to the top */
    #sage-chat {
      height: calc(100vh - 340px) !important;
        top: 0 !important;
    }
  
    /* 4. Reposition the send button perfectly inside the new 80px container height */
    .send-btn {
      width: 26px !important;
      height: 26px !important;
      font-size: 11px !important;
    }
    #ad-mobile-footer-auction {
        display:none !important;
  }
}