/* === MEMBER SYSTEM STYLES === */

/* Auth Button in Nav */
.auth-btn {
  background: var(--accent, #6C63FF);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-btn:hover { transform: translateY(-1px); opacity: 0.9; }
.auth-btn.logged-in {
  background: linear-gradient(135deg, #10B981, #059669);
}
.auth-btn .auth-icon { font-size: 1.1rem; }

/* Member Badge */
.member-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Auth Modal */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}
.auth-overlay.open { display: flex; }

.auth-modal {
  background: var(--card-bg, #fff);
  border-radius: 20px;
  padding: 32px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  animation: authSlideUp 0.3s ease;
}
@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary, #666);
}

.auth-modal h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: var(--text-primary, #1a1a2e);
}
.auth-modal .auth-subtitle {
  color: var(--text-secondary, #666);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: var(--bg, #f5f5f5);
  border-radius: 12px;
  padding: 4px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary, #666);
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--accent, #6C63FF);
  color: #fff;
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary, #1a1a2e);
}
.auth-field input, .auth-field select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border, #e0e0e0);
  border-radius: 12px;
  font-size: 0.95rem;
  background: var(--bg, #fafafa);
  color: var(--text-primary, #1a1a2e);
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.auth-field input:focus, .auth-field select:focus {
  outline: none;
  border-color: var(--accent, #6C63FF);
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary, #666);
}
.auth-check input { width: 18px; height: 18px; accent-color: var(--accent, #6C63FF); }

.auth-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent, #6C63FF), #5a52e0);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(108,99,255,0.4); }

.auth-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}
.auth-success.show { display: block; }
.auth-success .check-icon { font-size: 3rem; margin-bottom: 12px; }
.auth-success h3 { margin: 0 0 8px; color: #10B981; }
.auth-success p { color: var(--text-secondary, #666); font-size: 0.9rem; }

/* News Section */
.news-section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.news-section h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--text-primary, #1a1a2e);
}
.news-section .news-subtitle {
  text-align: center;
  color: var(--text-secondary, #666);
  margin-bottom: 24px;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.news-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #eee);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent, #6C63FF), #10B981);
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.news-card .news-date {
  font-size: 0.75rem;
  color: var(--accent, #6C63FF);
  font-weight: 600;
  margin-bottom: 8px;
}
.news-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--text-primary, #1a1a2e);
}
.news-card p {
  color: var(--text-secondary, #666);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}
.news-card .news-tag {
  display: inline-block;
  background: var(--accent, #6C63FF);
  color: #fff;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 10px;
}

/* Member Welcome Bar */
.member-bar {
  display: none;
  background: linear-gradient(135deg, #6C63FF, #5a52e0);
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
}
.member-bar.show { display: block; }
.member-bar a { color: #FFD700; text-decoration: underline; }

/* Profile Dropdown */
.profile-dropdown {
  position: relative;
  display: inline-block;
}
.profile-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  min-width: 200px;
  z-index: 999;
  overflow: hidden;
  margin-top: 8px;
}
.profile-menu.open { display: block; }
.profile-menu-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9rem;
  color: var(--text-primary, #1a1a2e);
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  width: 100%;
}
.profile-menu-item:hover { background: var(--bg, #f5f5f5); }
.profile-menu-item.danger { color: #EF4444; }

/* Responsive */
@media (max-width: 768px) {
  .auth-modal { padding: 24px; margin: 16px; }
  .news-grid { grid-template-columns: 1fr; }
}

/* Dark theme */
[data-theme="dark"] .auth-modal { background: #1e1e2e; }
[data-theme="dark"] .auth-field input,
[data-theme="dark"] .auth-field select { background: #2a2a3e; border-color: #3a3a4e; color: #e0e0e0; }
[data-theme="dark"] .auth-tabs { background: #2a2a3e; }
[data-theme="dark"] .news-card { background: #1e1e2e; border-color: #2a2a3e; }
[data-theme="dark"] .profile-menu { background: #1e1e2e; }
[data-theme="dark"] .profile-menu-item:hover { background: #2a2a3e; }
