/* CSS 2.1 COMPLIANT - No Variables, No Overqualified Selectors */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* We use overflow hidden on body to lock the header/footer */
body {
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  color: #1f1f1f;
  background-color: #ffffff;
  overflow: hidden;
}

/* Header */
.app-bar {
  height: 64px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: #ffffff;
}

.header-icon {
  height: 44px;
  width: auto;
  border-radius: 0%; /* Makes it circular like a Google profile pic */
  border: 0px solid #e0e0e0; /* Adds a subtle border */
}

.logo {
  font-size: 22px;
  font-weight: bold;
  color: #5f6368;
}

.logo-container {
  display: flex;
  align-items: center;
}

.main-logo {
  height: 44px; /* Professional height for a header logo */
  width: auto;
  margin-right: 12px;
}

.logo-text {
  font-size: 22px;
  font-weight: bold;
  color: #5f6368;
}

.goog-blue   { color: #4285F4; }
.goog-red    { color: #EA4335; }
.goog-yellow { color: #FBBC04; }
.goog-green  { color: #34A853; }

/* Main Container */
.app-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar - Removed 'sidebar li a' to avoid overqualification */
.sidebar {
  width: 260px;
  background-color: #f8f9fa;
  border-right: 1px solid #e0e0e0;
  padding: 24px 0;
  overflow-y: auto;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  display: block;
  padding: 12px 24px;
  border-radius: 0 24px 24px 0;
  text-decoration: none;
  color: #1f1f1f;
  margin-bottom: 4px;
  font-size: 14px;
}

.nav-link:hover {
  background-color: #f1f3f4;
}

.nav-link.active {
  background-color: #e8f0fe;
  color: #4285F4;
  font-weight: bold;
}

/* Content Area */
.content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  background-color: #ffffff;
}

.surface-card {
  /* max-width: auto;
  /* margin: 0 auto;  <-- REMOVED THIS */
  margin-left: 0;   /* Force to the left */
  margin-right: auto;
}

/* The Gemini Text - Validator Workaround */
.gemini-text {
  font-size: 32px;
  font-weight: bold;
  margin-top: 0;
  color: #4285f4; 
}

/* Footer */
.app-footer {
  height: 48px;
  min-height: 48px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 12px;
  color: #5f6368;
  background: #ffffff;
}

/* Force both sides to take up identical space */
.footer-left, .footer-right {
  flex: 1;
  display: flex;
}

/* Ensure the logo stays snapped to the right */
.footer-right {
  justify-content: flex-end;
}

/* The center takes only the space it needs, but stays centered */
.footer-center {
  flex: 0 0 auto; 
  text-align: center;
  white-space: nowrap;
  font-weight: 500; /* Makes the colored letters pop a bit more */
  letter-spacing: 0.5px;
}

.footer-logo {
  height: 32px;
  width: auto;
  display: block;
}

.responsive-img {
  max-width: 100%;
  border-radius: 12px;
}

.dino-error {
    filter: grayscale(100%);
    opacity: 0.6;
    user-select: none;
}

/* Hide all pages by default */
.page-content {
  display: none;
}

/* Show only the active page */
.page-content.active-page {
  display: block;
}

/* 1. The Wrapper (Terminal Window) */
.code-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 700px;
    width: 100%;
    margin: 25px 0;
    text-align: left;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* 2. The Window Title Bar */
.code-title-bar {
    background: #323639;
    color: #bdc1c6;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #333;
    border-bottom: none;
    user-select: none;
}

/* 3. The Mac-style Traffic Lights */
.window-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-right: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.code-title-left {
    display: flex;
    align-items: center;
}

.code-file-name {
    font-family: 'Consolas', monospace;
    font-size: 13px;
    font-weight: bold;
    color: #e8eaed;
}

/* 4. The Dark Code Box */
.code-wrapper pre {
    background: #1e1e1e !important;
    color: #d4d4d4;
    padding: 20px 0; /* Vertical padding only, horizontal handled by lines */
    border-radius: 0 0 8px 8px !important;
    overflow-x: hidden; /* Hide horizontal scroll, we are wrapping now */
    max-height: 700px;
    margin: 0 !important;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #333;
}

/* 5. Auto Line Numbers */
.code-wrapper code {
    display: block;
    counter-reset: step;
}

.code-line {
    display: block;
    counter-increment: step;
    position: relative;
    padding-left: 3.5em;
    padding-right: 1.5em; /* Add space on the right so text doesn't hit the edge */
    
    /* THE FIX: Wrap long lines but keep them "pre" formatted */
    white-space: pre-wrap;       /* Wraps text to next line */
    word-break: break-all;      /* Breaks long strings if necessary */
    overflow-wrap: break-word;  /* Standard wrap behavior */
}

.code-line::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0; /* Keep number at the top of the wrapped line */
    width: 2.5em;
    text-align: right;
    color: #5f6368;
    padding-right: 1em;
    border-right: 1px solid #333;
    user-select: none;
    background: #1e1e1e; /* Match background so text doesn't slide under it */
    height: 100%; /* Ensures the vertical line continues if the text wraps */
}

/* 6. The Copy Button */
.copy-button {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: 0.2s;
}

.copy-button:hover {
    background: #4285f4;
    border-color: #4285f4;
}