/* Bitcoin Club Bulgaria — community & warm theme.
   Dark base, Bitcoin orange accent, soft warm cream text. */

:root {
  --bg-deep: #0a0a0a;
  --bg: #111111;
  --bg-mid: #1a1a1a;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --border: rgba(247, 147, 26, 0.16);
  --border-strong: rgba(247, 147, 26, 0.45);
  --orange: #f7931a;
  --orange-bright: #ffa733;
  --orange-dim: #c97812;
  --green: #4caf50;
  --red: #e53935;
  --text: #f5f1e8;
  --text-muted: #a8a298;
  --text-dim: #6f6a62;
  --bg-flag-white: #ffffff;
  --bg-flag-green: #00966e;
  --bg-flag-red: #d62612;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(247, 147, 26, 0.08), transparent 60%),
    radial-gradient(800px 400px at 90% 100%, rgba(247, 147, 26, 0.04), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 50%, var(--bg-deep) 100%);
  min-height: 100vh;
}

a { color: var(--orange); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--orange-bright); }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; margin: 0 0 12px; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }

p { margin: 0 0 12px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }

/* topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 12px 28px;
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--orange-bright); }
.brand-logo { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: var(--orange);
}
.brand-sub { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; }

.nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.nav a:hover { color: var(--text); border-bottom-color: var(--orange); }
.nav a.active { color: var(--text); border-bottom-color: var(--orange); }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; gap: 4px; align-items: center; font-size: 12px; }
.lang-switch a { color: var(--text-dim); padding: 2px 4px; }
.lang-switch a.active { color: var(--orange); font-weight: 600; }
.lang-switch span { color: var(--text-dim); }

.logout { display: flex; align-items: center; gap: 12px; }
.who { color: var(--text-dim); font-size: 12px; }
.btn-link {
  background: none; border: 0; color: var(--text-muted); cursor: pointer;
  font-size: 13px; padding: 4px 6px;
}
.btn-link:hover { color: var(--orange-bright); }
.btn-link.danger { color: var(--red); }
.btn-link.danger:hover { color: #ff6b6b; }

/* layout */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}
.page-narrow { max-width: 640px; margin: 0 auto; }
.page-wide { max-width: 1100px; margin: 0 auto; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: rgba(247, 147, 26, 0.08); color: var(--orange-bright); }
.btn.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #0a0a0a;
  font-weight: 600;
}
.btn.primary:hover { background: var(--orange-bright); border-color: var(--orange-bright); color: #0a0a0a; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.block { width: 100%; }

.badge {
  display: inline-block;
  background: rgba(247, 147, 26, 0.15);
  border: 1px solid var(--border-strong);
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}
.badge.admin { background: rgba(76, 175, 80, 0.15); color: #6fcf73; border-color: rgba(76, 175, 80, 0.4); }

/* cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
}
.card-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 32px;
}
.tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  color: var(--text);
  display: block;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.tile:hover { background: var(--bg-card-hover); border-color: var(--border-strong); transform: translateY(-2px); color: var(--text); }
.tile-icon { font-size: 30px; margin-bottom: 8px; }
.tile h3 { margin: 0 0 6px; }
.tile.admin-tile { border-color: rgba(76, 175, 80, 0.35); }

.section-h { margin-top: 36px; }

/* hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  margin-bottom: 40px;
  padding: 48px 36px;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(247, 147, 26, 0.12), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.hero-logo-wrap { margin-bottom: 8px; }
.hero-logo { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 0 24px rgba(247,147,26,0.35)); }
.hero-title { font-size: 40px; margin: 0 0 8px; line-height: 1.15; }
.hero-sub { color: var(--text-muted); font-size: 18px; max-width: 520px; margin: 0 auto 4px; }
.hero-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }

/* goals */
.goals-section {
  margin-bottom: 40px;
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.goals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.goals-block h2 { color: var(--orange); font-size: 20px; margin-bottom: 16px; }
.goals-block ul { padding-left: 20px; margin: 0; }
.goals-block li { margin-bottom: 8px; color: var(--text-muted); line-height: 1.5; }

@media (max-width: 800px) {
  .hero { padding: 28px 20px; }
  .hero-logo { width: 130px; height: 130px; }
  .hero-title { font-size: 30px; }
  .goals-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav { gap: 0.7rem; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .container { padding: 20px 16px 64px; }
}

/* home grid + photos */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.home-photos h2 { margin-bottom: 16px; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.photo-grid.masonry { grid-auto-rows: 220px; }
.photo-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin: 0;
}
.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.photo-card:hover img { transform: scale(1.04); }
.photo-card figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  font-size: 13px;
  color: var(--text);
}
.admin-photo form { padding: 6px 10px; background: var(--bg-mid); border-top: 1px solid var(--border); }

/* prose / page text */
.prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.7;
}
.prose h1 { font-size: 32px; }
.prose h2 { margin-top: 32px; color: var(--orange); }
.prose ul { padding-left: 22px; }
.prose a { border-bottom: 1px dotted var(--orange); }

/* resources */
.resource-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.resource-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.resource-card:hover { background: var(--bg-card-hover); border-color: var(--border-strong); color: var(--text); }
.resource-card.locked { border-style: dashed; }
.resource-card.ext::after { content: " ↗"; color: var(--text-dim); font-size: 13px; }
.resource-card h3 { margin: 0; font-size: 16px; }
.resource-card .badge { margin-bottom: 8px; }

/* members */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.member-card {
  display: flex; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.member-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dim));
  color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.member-info h3 { margin: 0 0 2px; font-size: 16px; }
.member-bio { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.member-bio p { margin: 0 0 6px; }

/* forms */
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-stack label > span,
.form-2col label > span {
  display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px;
}
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .form-2col { grid-template-columns: 1fr; } }
input[type="text"], input[type="email"], input[type="file"], textarea, select {
  width: 100%;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--orange); }
input:disabled { color: var(--text-dim); }
textarea { resize: vertical; min-height: 80px; }
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox input { width: auto; }
fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0;
}
legend { padding: 0 8px; color: var(--orange); font-weight: 600; font-size: 14px; }
.form-row {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.form-row input[type="email"], .form-row input[type="text"] { flex: 1 1 200px; width: auto; }

/* login */
.login-hero { display: flex; justify-content: center; padding: 40px 0; }
.login-card { max-width: 440px; width: 100%; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.success-msg {
  background: rgba(76, 175, 80, 0.12); color: #6fcf73;
  border: 1px solid rgba(76, 175, 80, 0.4);
  border-radius: 6px; padding: 10px 14px; margin-bottom: 12px;
}
.error-msg {
  background: rgba(229, 57, 53, 0.12); color: #ff7461;
  border: 1px solid rgba(229, 57, 53, 0.4);
  border-radius: 6px; padding: 10px 14px; margin-bottom: 12px;
}
.error { color: var(--red); font-size: 14px; margin: 0; }

/* tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--bg-mid);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table .actions { text-align: right; }
.data-table .actions form { display: inline; }

.page-breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.page-breadcrumb a { color: var(--text-muted); }

/* footer */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.6);
  position: relative;
  overflow: hidden;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap; gap: 12px;
}
.footer-links a { color: var(--text-muted); margin-left: 16px; }
.footer-links a:hover { color: var(--orange-bright); }
.bg-stripe {
  display: block;
  height: 4px;
  background: linear-gradient(to right,
    var(--bg-flag-white) 0%, var(--bg-flag-white) 33.33%,
    var(--bg-flag-green) 33.33%, var(--bg-flag-green) 66.66%,
    var(--bg-flag-red) 66.66%, var(--bg-flag-red) 100%);
}
