
:root {
  --primary: #0d9488;
  --primary-light: #14b8a6;
  --accent: #f59e0b;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #334155;
  --text-white: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --success: #10b981;
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text-white); min-height: 100vh; }

.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 5%; background: var(--bg-card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px);
}
.top-logo {
  font-size: 1.3rem; font-weight: 800; color: var(--text-white);
  text-decoration: none; display: flex; align-items: center;
}
.top-logo span { color: var(--accent); }
.top-links { display: flex; gap: 20px; }
.top-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.3s; }
.top-links a:hover { color: var(--primary-light); }

.contacts-app { max-width: 800px; margin: 0 auto; padding: 32px 20px; }

.search-header { text-align: center; margin-bottom: 32px; }
.search-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.search-header p { color: var(--text-muted); font-size: 1rem; }
.search-header p span { color: var(--accent); font-weight: 700; }

.search-box {
  position: relative; margin-bottom: 16px;
  background: var(--bg-card); border-radius: var(--radius);
  border: 2px solid var(--border); display: flex; align-items: center;
  transition: border-color 0.3s;
}
.search-box:focus-within { border-color: var(--primary); }
.search-icon { padding: 0 16px; font-size: 1.2rem; color: var(--text-muted); }
.search-box input {
  flex: 1; padding: 18px 0; background: none; border: none;
  color: var(--text-white); font-size: 1.05rem; font-family: 'Inter', sans-serif;
  outline: none;
}
.search-box input::placeholder { color: var(--text-muted); }
.clear-btn {
  background: none; border: none; color: var(--text-muted); font-size: 1.2rem;
  padding: 0 16px; cursor: pointer; transition: color 0.3s;
}
.clear-btn:hover { color: var(--text-white); }

.filter-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 16px; border-radius: 50px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-muted); font-family: 'Inter', sans-serif;
  font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.3s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--text-white); }
.filter-btn.active {
  background: rgba(13,148,136,0.2); border-color: var(--primary);
  color: var(--primary-light); font-weight: 600;
}

.results-info { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 12px; padding: 0 4px; }

.contacts-list { display: flex; flex-direction: column; gap: 6px; }

.contact-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 14px 18px; border: 1px solid var(--border);
  transition: all 0.3s; animation: fadeIn 0.4s ease both;
}
.contact-card:hover { border-color: var(--primary); transform: translateX(4px); background: rgba(30,41,59,0.8); }

.contact-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; color: #fff; flex-shrink: 0;
}

.contact-info { flex: 1; min-width: 0; }
.contact-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-phone { font-size: 0.85rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.contact-phone mark, .contact-name mark { background: rgba(245,158,11,0.3); color: var(--accent); border-radius: 2px; padding: 0 2px; }

.contact-actions { display: flex; gap: 8px; flex-shrink: 0; }
.contact-actions a, .contact-actions button {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; text-decoration: none; border: 1px solid var(--border);
  background: var(--bg-input); cursor: pointer; transition: all 0.3s;
}
.action-call:hover { background: rgba(16,185,129,0.2); border-color: var(--success); }
.action-wa:hover { background: rgba(37,211,102,0.2); border-color: #25D366; }
.action-copy:hover { background: rgba(59,130,246,0.2); border-color: #3b82f6; }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); }

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

.copy-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--success); color: #fff; padding: 12px 24px; border-radius: 50px;
  font-size: 0.9rem; font-weight: 600; z-index: 9999;
  transition: transform 0.3s ease;
}
.copy-toast.show { transform: translateX(-50%) translateY(0); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .top-links { display: none; }
  .contact-card { padding: 12px 14px; }
  .contact-actions a, .contact-actions button { width: 32px; height: 32px; font-size: 0.9rem; }
  .search-header h1 { font-size: 1.5rem; }
}
