/*
  style.css – look and feel of Website God Mode.
  Theme: red, orange, white. Background: your own image (sharp, no blur).
  Glassmorphism is subtle (5px blur) to keep things readable.
*/

:root {
  --bg-top: #ffe5e5;          /* soft red */
  --bg-bottom: #ffd6a5;       /* warm orange */
  --glass-bg: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(255, 255, 255, 0.6);
  --text: #3a0a0a;            /* dark reddish brown for contrast */
  --text-muted: #5c3a3a;
  --accent: #e63946;          /* bright red */
  --accent2: #ff8c42;         /* orange */
  --danger: #b00020;
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Replace the URL below with your own background image */
  background-image: url("./cherry.jfif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Optional overlay to ensure readability if your image is busy */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  opacity: 0.4;  /* adjust if you want the background image more visible */
  pointer-events: none;
  z-index: 0;
}

/* ========== HEADER / NAV ========== */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: background 0.2s;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.5);
}

.nav-link.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ========== MAIN CONTAINER ========== */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.footer {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  position: relative;
  z-index: 1;
}

/* ========== SEARCH BAR ========== */
.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.search-bar input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.search-bar input::placeholder {
  color: rgba(60, 20, 20, 0.6);
}

.search-bar button {
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* ========== CARDS ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 8px 32px var(--shadow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.3);
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-description {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========== DETAIL PANEL ========== */
.detail-panel {
  background: var(--glass-bg);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 12px 40px var(--shadow);
}

.detail-panel img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.back-btn {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.4);
  color: var(--text);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  cursor: pointer;
}

/* ========== MISC ========== */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.error {
  color: var(--danger);
  padding: 1rem;
  background: rgba(255, 100, 100, 0.2);
  border: 1px solid rgba(255, 100, 100, 0.4);
  border-radius: 8px;
}

.repo-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.notice {
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table td, table th {
  padding: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  text-align: left;
}

.ai-result {
  background: var(--glass-bg);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.project-idea {
  background: var(--glass-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--accent);
  margin-bottom: 1rem;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 8px 32px var(--shadow);
}

.section-ref {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}