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

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #242424;
  --border: #2e2e2e;
  --accent: #c8a96e;
  --accent2: #e0c48a;
  --text: #e8e8e8;
  --text-muted: #888;
  --red: #e05252;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  background: #111;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 22px; font-weight: 700; color: var(--accent); letter-spacing: -0.5px; }
.logo span { color: var(--text-muted); font-weight: 400; }
nav a { color: var(--text-muted); margin-left: 20px; font-size: 14px; transition: color .2s; }
nav a:hover { color: var(--accent); }

/* Layout */
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; margin-top: 24px; }

/* Sidebar */
.sidebar { }
.filter-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}
.filter-box h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 14px; }
.filter-box label { display: block; font-size: 12px; color: var(--text-muted); margin: 10px 0 4px; }
.filter-box select,
.filter-box input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}
.filter-box button {
  width: 100%;
  margin-top: 14px;
  background: var(--accent);
  color: #111;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s;
}
.filter-box button:hover { background: var(--accent2); }
.reset-link { display: block; text-align: center; margin-top: 8px; font-size: 13px; color: var(--text-muted); }

/* Ad banner */
.ad-banner { margin: 16px 0; border-radius: 8px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.ad-banner a { display: block; }
.ad-banner img { width: 100%; display: block; max-height: 120px; object-fit: cover; }
.ad-banner span { display: block; padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px; }
.ad-side { margin-top: 16px; border-radius: 8px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.ad-side a { display: block; }
.ad-side img { width: 100%; display: block; }
.ad-side span { display: block; padding: 12px; text-align: center; color: var(--text-muted); font-size: 12px; }

/* Grid */
.grid-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.grid-header h1 { font-size: 18px; font-weight: 600; }
.count { color: var(--text-muted); font-size: 13px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  display: block;
  color: var(--text);
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-photo { aspect-ratio: 3/4; overflow: hidden; background: var(--surface2); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-photo img { transform: scale(1.04); }
.no-photo { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; }
.card-info { padding: 10px 12px; }
.card-info h2 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.city, .views { display: block; font-size: 12px; color: var(--text-muted); }
.price { display: block; font-size: 12px; color: var(--accent); margin-top: 2px; }

/* Pagination */
.pagination { display: flex; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pagination a {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 14px;
  transition: all .2s;
}
.pagination a.active,
.pagination a:hover { background: var(--accent); color: #111; border-color: var(--accent); }

/* Profile page */
.profile-page { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.main-photo img { width: 100%; border-radius: 8px; }
.thumbnails { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumb { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: border-color .2s; }
.thumb:hover { border-color: var(--accent); }
.profile-details { padding-top: 8px; }
.profile-details h1 { font-size: 26px; margin-bottom: 14px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag { background: var(--surface2); border: 1px solid var(--border); padding: 5px 12px; border-radius: 20px; font-size: 13px; }
.price-tag { color: var(--accent); border-color: var(--accent); }
.views-tag { color: var(--text-muted); }
.profile-description { margin-bottom: 24px; }
.profile-description h2 { font-size: 15px; color: var(--text-muted); margin-bottom: 8px; }
.profile-description p { line-height: 1.8; color: var(--text); }
.show-phone-btn {
  background: var(--accent);
  color: #111;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.show-phone-btn:hover { background: var(--accent2); }
.show-phone-btn.revealed { background: var(--surface2); color: var(--text); border: 1px solid var(--border); letter-spacing: 1px; }
.no-photo-large { aspect-ratio: 1; background: var(--surface2); display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-muted); }

.similar-section { margin-top: 40px; }
.similar-section h2 { font-size: 18px; margin-bottom: 16px; }

/* 404 */
.not-found { text-align: center; padding: 80px 20px; }
.not-found h1 { font-size: 80px; color: var(--accent); }
.not-found p { font-size: 18px; color: var(--text-muted); margin: 12px 0 24px; }
.not-found a { background: var(--accent); color: #111; padding: 10px 24px; border-radius: 8px; font-weight: 600; }

/* Footer */
.site-footer { margin-top: 60px; border-top: 1px solid var(--border); padding: 28px 0 16px; color: var(--text-muted); font-size: 13px; }
.disclaimer { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; }
.disclaimer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.disclaimer p { font-size: 12px; line-height: 1.7; color: #666; }
.footer-bottom { text-align: center; }

.empty { padding: 40px; text-align: center; color: var(--text-muted); }

/* Responsive */
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .profile-page { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
