:root {
  --green: #006400;
  --green-dark: #004d00;
  --gold: #d4af37;
  --bg: #f8f1e3;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #555;
  --text-light: #888;
  --border: rgba(0,0,0,0.1);
  --radius: 12px;
  --shadow: 0 4px 15px rgba(0,0,0,0.08);
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.dark-mode {
  --bg: #121212;
  --card-bg: #1e1e1e;
  --text: #e0e0e0;
  --text-muted: #aaa;
  --text-light: #777;
  --border: rgba(255,255,255,0.08);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }

.header {
  background: var(--green);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo { font-size: 1.3rem; font-weight: bold; }
.logo .elite { color: var(--gold); }

nav { display: flex; gap: 1.5rem; }
nav a { color: white; text-decoration: none; font-weight: 500; padding: 0.25rem 0; border-bottom: 2px solid transparent; transition: border-color var(--transition); }
nav a:hover, nav a:focus { color: var(--gold); border-bottom-color: var(--gold); outline: none; }

.theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background var(--transition);
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.hero {
  background: linear-gradient(rgba(0,100,0,0.8), rgba(0,100,0,0.8)), url("https://picsum.photos/id/1015/1200/400");
  background-size: cover;
  background-position: center;
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
  border-radius: 0 0 24px 24px;
  margin-bottom: 2rem;
}

.hero h2 { font-size: 1.8rem; margin-bottom: 0.5rem; line-height: 1.3; }
.hero p { font-size: 1rem; opacity: 0.85; margin-bottom: 1rem; }

#search-input {
  width: 100%;
  max-width: 500px;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  outline: none;
  font-family: inherit;
}
#search-input:focus { box-shadow: 0 0 0 3px var(--gold); }

.feed-section { margin: 2rem 0; }
.feed-section h2 {
  margin-bottom: 1rem;
  color: var(--green);
  border-left: 4px solid var(--gold);
  padding-left: 0.75rem;
}
body.dark-mode .feed-section h2 { color: var(--gold); }

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  font-style: italic;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.video-grid, .posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.post-card, .video-card {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover, .video-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }

.post-card h3 { color: var(--green); margin-bottom: 0.5rem; font-size: 1.1rem; }
body.dark-mode .post-card h3 { color: var(--gold); }
.post-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.post-card small { color: var(--text-light); font-size: 0.8rem; display: block; margin-top: 0.5rem; }

.video-thumbnail {
  background: linear-gradient(135deg, var(--green), #008000);
  height: 180px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.scene-number {
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
}

.video-info h4 { color: var(--green); margin-bottom: 0.25rem; font-size: 1rem; }
body.dark-mode .video-info h4 { color: var(--gold); }
.video-info p { color: var(--text-muted); font-size: 0.85rem; }

main { flex: 1; }

.share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.share-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.share-btn {
  padding: 0.35rem 0.75rem;
  border: none;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  color: white;
  font-family: inherit;
}
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.share-wa { background: #25D366; }
.share-x { background: #1a1a1a; }
.share-fb { background: #1877F2; }

body.dark-mode .share-x { background: #333; }

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
footer a { color: var(--green); text-decoration: none; }
footer a:hover { text-decoration: underline; }
body.dark-mode footer a { color: var(--gold); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

@media (max-width: 768px) {
  .header .container { flex-direction: column; text-align: center; }
  .logo { font-size: 1.1rem; }
  nav { gap: 1rem; }
  .hero { padding: 2rem 1rem; }
  .hero h2 { font-size: 1.3rem; }
  .video-grid, .posts-grid { grid-template-columns: 1fr; }
}

@media print {
  .header, .hero, footer, .theme-toggle, #search-input { display: none; }
  .video-grid, .posts-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .post-card, .video-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
