/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0A0A0A;
  --surface: #1A1A1A;
  --surface-hover: #252525;
  --orange: #FF6B35;
  --orange-hover: #FF8555;
  --success: #4ADE80;
  --danger: #EF4444;
  --pending: #FBBF24;
  --text: #FFFFFF;
  --text-muted: #9CA3AF;
  --border: #2A2A2A;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
#header {
  background: var(--surface);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: 'Bebas Neue', cursive;
  font-size: 2rem;
  letter-spacing: 2px;
  color: var(--orange);
  font-weight: 400;
}

#user-info {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Main Content */
#main-content {
  flex: 1;
  padding: 1.5rem;
  padding-bottom: 100px;
  overflow-y: auto;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.75rem;
  letter-spacing: 1px;
}

/* Buttons */
.btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--orange);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

.btn-success {
  background: var(--success);
  color: var(--bg-dark);
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-danger {
  background: var(--danger);
  color: var(--text);
}

.btn-danger:hover {
  filter: brightness(1.1);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-icon:hover {
  color: var(--orange);
}

.btn-link {
  background: none;
  border: none;
  color: var(--orange);
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--orange-hover);
}

/* Pending Requests Banner */
#pending-requests-banner {
  background: var(--surface);
  border: 1px solid var(--pending);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

#pending-count {
  color: var(--pending);
  font-weight: 700;
  font-size: 1.125rem;
}

/* Friend Card */
.friend-card {
  background: var(--surface);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: background 0.2s ease;
}

.friend-card:hover {
  background: var(--surface-hover);
}

.friend-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #FF8555);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.friend-info {
  flex: 1;
  min-width: 0;
}

.friend-username {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.125rem;
}

.friend-name {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.friend-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Search */
.search-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-header h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.75rem;
  letter-spacing: 1px;
}

.search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

#search-input:focus {
  outline: none;
  border-color: var(--orange);
}

#search-input::placeholder {
  color: var(--text-muted);
}

#search-results {
  display: flex;
  flex-direction: column;
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Requests Section */
.requests-section {
  margin-bottom: 2rem;
}

.requests-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
}

.request-card {
  background: var(--surface);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Badge */
.badge {
  background: var(--danger);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 20px;
  text-align: center;
}

/* Bottom Navigation */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 100;
  height: 64px;
}

.nav-item {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem;
  transition: color 0.2s ease;
  position: relative;
  border-bottom: 3px solid transparent;
}

.nav-item:hover {
  color: var(--text);
}

.nav-item.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.nav-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (min-width: 768px) {
  #app {
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* Loading State */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Status Badge in requests */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background: var(--pending);
  color: var(--bg-dark);
}
