@import url('shared-styles.css');

/* friends.css - LaoVerse Friends Page Styling */
:root {
  --neon-blue: #66f0ff;
  --light-blue: #00b7d4;
  --soft-blue: #8bd8e5;
  --black: #000000;
  --white: #ffffff;
  --gray: #222222;
  --light-gray: #333333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Noto Sans Lao', sans-serif;
}

body {
  background-color: var(--black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  padding-top: 100px;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(102, 240, 255, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(102, 240, 255, 0.05) 0%, transparent 20%);
}

/* --- Shared Header Styling --- */
.main-header {
  width: 100%;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--black);
  border-bottom: 1px solid var(--neon-blue);
  box-shadow: 0 0 15px var(--neon-blue);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
}

.logo img { width: 160px; }
.main-nav ul { display: flex; list-style: none; gap: 1.2rem; }
.main-nav a {
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--neon-blue);
  background-color: var(--black);
  font-size: 0.9rem;
}
.main-nav a:hover { color: var(--neon-blue); background-color: var(--white); }
.main-nav a.active { background-color: var(--neon-blue); color: var(--black); font-weight: bold; }

/* --- Main Container --- */
.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-card {
  background-color: var(--gray);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(102, 240, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.section-card h2 {
  color: var(--neon-blue);
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(102, 240, 255, 0.2);
  padding-bottom: 0.5rem;
}

/* --- Search --- */
#searchFriends {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--neon-blue);
  border-radius: 8px;
  background-color: var(--light-gray);
  color: var(--white);
  font-size: 1rem;
  outline: none;
}
#searchFriends:focus { box-shadow: 0 0 10px var(--neon-blue); }

/* --- Items --- */
.friend-item, .request-item, .search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 12px;
  margin-bottom: 12px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(102, 240, 255, 0.1);
  transition: all 0.2s ease;
}
.friend-item:hover { background-color: rgba(102, 240, 255, 0.05); }

.friend-item img, .request-item img, .search-result-item img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--neon-blue);
}

.friend-info, .request-info, .search-info { flex: 1; min-width: 0; }
h3 { font-size: 1.05rem; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }

/* --- Actions --- */
.friend-actions, .request-actions { display: flex; gap: 8px; flex-wrap: wrap; }

button {
  padding: 6px 14px;
  border: 1px solid var(--neon-blue);
  border-radius: 6px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
button:hover { background: var(--neon-blue); color: var(--black); }

.remove-btn, .reject-btn { border-color: #ff4444; color: #ff4444; }
.remove-btn:hover, .reject-btn:hover { background: #ff4444; color: white; }

.accept-btn { border-color: #00c851; color: #00c851; }
.accept-btn:hover { background: #00c851; color: white; }

/* --- Common UI --- */
.empty-msg { text-align: center; color: #888; padding: 20px; font-style: italic; }

.message {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: 8px; z-index: 3000;
  display: none; animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { transform: translate(-50%, -20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.message.success { background: var(--light-blue); color: white; }
.message.error { background: #ff4444; color: white; }

#loading {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: none; align-items: center; justify-content: center; z-index: 4000;
}
.spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.1); border-top-color: var(--neon-blue); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Mobile --- */
@media (max-width: 768px) {
  body { padding-top: 140px; }
  .main-header { flex-direction: column; padding: 10px; }
  .main-nav ul { gap: 8px; flex-wrap: wrap; justify-content: center; }
  .main-nav a { padding: 6px 10px; font-size: 0.75rem; }
  .friend-item { flex-direction: column; text-align: center; }
  .friend-actions { justify-content: center; width: 100%; }
  button { width: 100%; }
}
