:root {
  --primary: #5865F2;
  --secondary: #4752C4;
  --success: #3BA55D;
  --danger: #ED4245;
  --warning: #FEE75C;
  --dark: #1e1e1e;
  --darker: #141414;
  --light: #ffffff;
  --gray: #4E5058;
  --gray-light: #96989D;
  --border: #2b2b2b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--dark);
  color: var(--light);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: var(--darker);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand h1 {
  font-size: 1.5rem;
  color: var(--light);
}

.nav-brand a {
  text-decoration: none;
  color: inherit;
}

.nav-menu {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.user-name {
  font-weight: 500;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--light);
}

.btn-primary:hover {
  background: var(--secondary);
}

.btn-secondary {
  background: var(--gray);
  color: var(--light);
}

.btn-secondary:hover {
  background: var(--gray-light);
}

.btn-success {
  background: var(--success);
  color: var(--light);
}

.btn-success:hover {
  opacity: 0.9;
}

.btn-discord {
  background: var(--primary);
  color: var(--light);
}

.btn-discord:hover {
  background: var(--secondary);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Hero */
.hero {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
}

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--gray-light);
  margin-bottom: 2rem;
}

/* Features */
.features {
  padding: 5rem 0;
}

.features h3 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--darker);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--gray-light);
}

/* Dashboard */
.dashboard-container {
  padding: 3rem 0;
  min-height: 80vh;
}

.dashboard-container h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--gray-light);
  margin-bottom: 2rem;
}

.guilds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.guild-card {
  background: var(--darker);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--light);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}

.guild-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.guild-icon img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.guild-icon-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
}

.guild-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.guild-badge {
  font-size: 0.875rem;
  color: var(--gray-light);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--gray-light);
  margin-bottom: 2rem;
}

/* Config */
.config-container {
  padding: 2rem 0;
  min-height: 80vh;
}

.config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.server-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.server-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.server-icon-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
}

.server-id {
  color: var(--gray-light);
  font-size: 0.875rem;
}

.config-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.config-tab {
  padding: 0.75rem 1.5rem;
  background: var(--darker);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--light);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.config-tab:hover {
  border-color: var(--primary);
}

.config-tab.active {
  background: var(--primary);
  border-color: var(--primary);
}

.config-section {
  display: none;
}

.config-section.active {
  display: block;
}

.config-card {
  background: var(--darker);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.config-card h4 {
  margin: 2rem 0 1rem 0;
  font-size: 1.25rem;
}

.config-card hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--light);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Toggle Switch */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.toggle-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  background: var(--gray);
  border-radius: 26px;
  transition: 0.3s;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--light);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: 0.3s;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
  background: var(--success);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::after {
  transform: translateX(24px);
}

.info-text {
  color: var(--gray-light);
  font-style: italic;
}

/* Footer */
footer {
  background: var(--darker);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

footer p {
  color: var(--gray-light);
}

/* Error Page */
.error-container {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-content {
  text-align: center;
}

.error-content h1 {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.error-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.error-content p {
  color: var(--gray-light);
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h2 {
    font-size: 2rem;
  }

  .features h3 {
    font-size: 2rem;
  }

  .config-nav {
    flex-wrap: wrap;
  }

  .config-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
