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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1117;
  color: #e1e1e6;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f1117 0%, #1a1b2e 100%);
}

.login-card {
  text-align: center;
  padding: 3rem;
  background: #1a1b2e;
  border-radius: 12px;
  border: 1px solid #2a2b3e;
  max-width: 400px;
  width: 90%;
}

.login-card h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #00ae86, #00d4a4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-card p {
  color: #8888a0;
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  color: white;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.9; }
.btn-discord { background: #5865F2; }
.btn-primary { background: #00ae86; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; background: #2a2b3e; }

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: #1a1b2e;
  border-bottom: 1px solid #2a2b3e;
}
.topbar-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: #00ae86;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Container */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.section { margin-bottom: 2rem; }
.section h2 { margin-bottom: 1rem; font-size: 1.5rem; }
.section h3 { margin: 1.5rem 0 0.75rem; font-size: 1.1rem; color: #aaa; }

/* Guild Grid */
.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.guild-card {
  background: #1a1b2e;
  border: 1px solid #2a2b3e;
  border-radius: 10px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.guild-card:hover {
  border-color: #00ae86;
  transform: translateY(-2px);
}

.guild-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2a2b3e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.guild-icon img { width: 100%; height: 100%; border-radius: 50%; }

.guild-card-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Form */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #aaa;
}
.form-group input[type="checkbox"] {
  margin-right: 0.4rem;
}
.file-input {
  padding: 0.5rem;
  background: #12131d;
  border: 1px solid #2a2b3e;
  border-radius: 6px;
  color: #e1e1e6;
  width: 100%;
  cursor: pointer;
}
.form-group select,
.form-group input[type="text"],
.form-group input[type="url"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: #12131d;
  border: 1px solid #2a2b3e;
  border-radius: 6px;
  color: #e1e1e6;
  font-size: 0.95rem;
}
.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: #00ae86;
}
.form-row {
  display: flex;
  gap: 2rem;
}

.save-status {
  margin-left: 1rem;
  font-size: 0.9rem;
  color: #00ae86;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0.5rem 0 1rem;
  border: 2px solid #2a2b3e;
}

/* TV Link */
.tv-link-section {
  margin-top: 2rem;
  padding: 1.25rem;
  background: #12131d;
  border-radius: 8px;
  border: 1px solid #2a2b3e;
}
.tv-url {
  display: block;
  padding: 0.5rem 0.75rem;
  background: #1a1b2e;
  border-radius: 4px;
  margin: 0.5rem 0;
  word-break: break-all;
  font-size: 0.85rem;
  color: #00d4a4;
}
