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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 450px;
}

.login-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}

.login-card h1 {
  font-size: 28px;
  margin-bottom: 12px;
  color: #2c3e50;
}

.subtitle {
  color: #7f8c8d;
  margin-bottom: 32px;
  font-size: 14px;
}

.discord-btn {
  width: 100%;
  background: #5865F2;
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s;
}

.discord-btn:hover {
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(88,101,242,0.4);
}

.features {
  margin-top: 32px;
  text-align: left;
}

.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: #555;
  font-size: 14px;
}

.feature .icon {
  color: #5865F2;
  font-weight: bold;
  font-size: 18px;
}

/* Navbar */
.navbar {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 24px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar h1 {
  font-size: 24px;
  color: #2c3e50;
}

.nav-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

.username {
  font-weight: 600;
  color: #5865F2;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-left: 4px solid #5865F2;
}

.stat-card.pending { border-left-color: #f39c12; }
.stat-card.progress { border-left-color: #3498db; }
.stat-card.completed { border-left-color: #2ecc71; }

.stat-value {
  font-size: 36px;
  font-weight: bold;
  color: #2c3e50;
}

.stat-label {
  color: #7f8c8d;
  margin-top: 8px;
  font-size: 14px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  background: white;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  color: #555;
}

.filter-btn:hover {
  border-color: #5865F2;
  color: #5865F2;
}

.filter-btn.active {
  background: #5865F2;
  color: white;
  border-color: #5865F2;
}

/* Tasks Grid */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.task-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
  border-left: 4px solid #ddd;
}

.task-card[data-status="pending"] { border-left-color: #f39c12; }
.task-card[data-status="in_progress"] { border-left-color: #3498db; }
.task-card[data-status="completed"] { border-left-color: #2ecc71; }

.task-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
  gap: 12px;
}

.task-header h3 {
  color: #2c3e50;
  font-size: 18px;
  flex: 1;
}

.task-category {
  background: #ecf0f1;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: #7f8c8d;
  white-space: nowrap;
}

.task-description {
  color: #555;
  margin-bottom: 16px;
  line-height: 1.5;
}

.variations {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.variations strong {
  color: #2c3e50;
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.variation {
  padding: 8px 0;
  color: #555;
  font-size: 14px;
  display: flex;
  align-items: start;
  gap: 8px;
}

.variation-icon {
  color: #5865F2;
  font-weight: bold;
}

.variation-author {
  color: #7f8c8d;
  font-size: 12px;
  font-style: italic;
  margin-left: auto;
}

.task-status, .task-notes {
  margin-bottom: 16px;
}

.task-status label, .task-notes label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.status-select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  background: white;
  transition: border 0.3s;
}

.status-select:focus {
  outline: none;
  border-color: #5865F2;
}

.task-notes textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  transition: border 0.3s;
}

.task-notes textarea:focus {
  outline: none;
  border-color: #5865F2;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  color: #7f8c8d;
  font-size: 12px;
  padding-top: 12px;
  border-top: 1px solid #ecf0f1;
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.btn-primary {
  background: #5865F2;
  color: white;
}

.btn-primary:hover {
  background: #4752C4;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #ecf0f1;
  color: #555;
}

.btn-secondary:hover {
  background: #ddd;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  background: white;
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  color: #555;
}

.tab-btn:hover {
  background: #f8f9fa;
}

.tab-btn.active {
  background: #5865F2;
  color: white;
}

.tab-content {
  display: none;
}

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

/* Admin Sections */
.admin-section {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 24px;
}

.admin-section h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 20px;
}

/* Forms */
.assign-form, .template-form, .variation-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.form-group input, .form-group select, .form-group textarea {
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: #5865F2;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Templates List */
.template-item {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 12px;
}

.template-item h4 {
  color: #2c3e50;
  margin-bottom: 8px;
}

.template-item p {
  color: #555;
  margin-bottom: 8px;
  font-size: 14px;
}

.template-category {
  display: inline-block;
  background: #5865F2;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
}

/* User Tasks Group */
.user-tasks-group {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-tasks-group h3 {
  color: #2c3e50;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #ecf0f1;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #ddd;
}

.task-item.pending { border-left-color: #f39c12; }
.task-item.in_progress { border-left-color: #3498db; }
.task-item.completed { border-left-color: #2ecc71; }

.task-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.task-item-header strong {
  color: #2c3e50;
  font-size: 16px;
}

.task-item-description {
  color: #555;
  margin-bottom: 12px;
  font-size: 14px;
}

.task-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #5865F2;
  color: white;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-small:hover {
  background: #4752C4;
}

.btn-danger {
  background: #e74c3c;
}

.btn-danger:hover {
  background: #c0392b;
}

.task-item-actions small {
  margin-left: auto;
  color: #7f8c8d;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.pending {
  background: #f39c12;
  color: white;
}

.status-badge.in_progress {
  background: #3498db;
  color: white;
}

.status-badge.completed {
  background: #2ecc71;
  color: white;
}

.empty-state {
  text-align: center;
  color: #7f8c8d;
  padding: 40px;
  font-size: 16px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.modal-content h2 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-buttons button {
  flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .tasks-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-container {
    flex-direction: column;
    gap: 12px;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}