/* ================= GLOBAL ================= */

html, body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
}

/* ================= TOP BAR ================= */

/* Desktop: 3-column layout (same as before) */
#top-panel-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px;
  background-color: #1f1f1f;
}

#top-panel-wrapper > header {
  grid-column: 2; /* Centered title */
  text-align: center;
}

#top-panel-wrapper > #top-controls {
  grid-column: 1 / span 3; /* Full width for controls */
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

#top-panel {
  text-align: left;
}


#auth-section {
  text-align: right;
}

header {
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 3rem;
  color: #ffd700;
}


#auth-section a {
  color: #4caf50;
  text-decoration: none;
}

/* ================= AUTH CONTAINER (login/register) ================= */
.auth-container {
    width: 350px;
    margin: 60px auto;
    padding: 25px;
    background-color: #1f1f1f;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    color: #eee;
    text-align: center;
}

.auth-container h1 {
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.auth-container h2 {
    margin-bottom: 15px;
}

.auth-container label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: left;
}

.auth-container input {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: #2a2a2a;
    color: #eee;
}

.auth-container button {
    margin-top: 15px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #4caf50;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.auth-container button:hover {
    background-color: #45a049;
}

.auth-container a {
    color: #4C16DC;
    text-decoration: none;
}

.auth-container a:hover {
    text-decoration: underline;
}




.logout-link {
  color: #ff4444;
}

/* ================= BUTTONS ================= */

#file {
  display: none;
}

.custom-file-btn {
  padding: 10px 16px;
  border-radius: 6px;
  background-color: #4C16DC;
  color: white;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
}

.custom-file-btn:hover {
  background-color: #3b0fb8;
}

#file-name {
    margin-top: 12px; /* space below the Upload & Predict button */
    font-style: italic;
    color: #eee;
}


/* ================= PREDICTION ================= */

#prediction {
  font-weight: bold;
  font-size: 1.1rem;
}

.prediction-loading { color: #ff9800; }
.prediction-success { color: #ffd700; }
.prediction-error { color: #f44336; }

/* ================= MAIN GRID ================= */

#main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  min-height: 65vh;
}

#map {
  height: 100%;
}

#info-panel {
  background: #161616;
  padding: 20px;
  border-left: 1px solid #2a2a2a;
}

.preview {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  border-radius: 10px;
}

/* ================= FOOTER ================= */

footer {
  text-align: center;
  padding: 16px;
  font-size: 0.9rem;
  color: #aaa;
  background: #1f1f1f;
}

/* ================= MOBILE ================= */

@media (max-width: 900px) {

  /* Top wrapper: stack rows */
  #top-panel-wrapper {
    display: grid;
    grid-template-rows: auto auto;
    gap: 10px;
    text-align: center;
  }

  /* Header stays full width */
  #top-panel-wrapper header {
    grid-row: 1;
  }

  /* Controls row: flex layout */
  #top-panel-wrapper > #top-panel,
  #top-panel-wrapper > #auth-section {
    display: inline-block;
    vertical-align: top;
  }

  #top-panel-wrapper > #top-panel {
    width: 55%;
    text-align: left; /* Upload button left-aligned */
  }

  #top-panel-wrapper > #auth-section {
    width: 40%;
    text-align: right; /* Auth info right-aligned */
  }

  /* Adjust header font size */
  header h1 {
    font-size: 1.5rem;
  }

  /* Main content: map on top, info panel below */
  #main {
    grid-template-columns: 1fr;
  }

  #map {
    height: 30vh;
  }

  #info-panel {
    border-left: none;
    border-top: 1px solid #2a2a2a;
  }

    /* Make mushroom image smaller */
  #info-panel img.preview {
    display: block;
    margin: 0 auto;   /* centers the image */
    max-height: 200px; /* keep your smaller size */
    width: auto;       /* maintain aspect ratio */
  }

  /* Keep upload button reasonable */
  .custom-file-btn {
    width: auto;
    display: inline-block;
  }

    /* Footer / disclaimer smaller text */
  footer {
    font-size: 0.75rem;  /* smaller than desktop */
    padding: 12px;        /* slightly less padding */
  }

}



.auth-error {
    background: #fde8e8;
    color: #a00;
    border: 1px solid #f5c0c0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 14px;
}
 
.auth-success {
    background: #e8f5e9;
    color: #2d6a4f;
    border: 1px solid #b2dfcb;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 14px;
}
 
.auth-hint {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}
 
.auth-link {
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
}
 