/* Base styles and CSS variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 2rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation */
.navbar {
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: 70px;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.brand-logo img {
  height: 70px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #666;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s;
}

.nav-links a:hover {
  background: #f0f0f0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
  text-align: center;
}

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

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #666;
  color: white;
}

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

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-logout {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #555;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.form-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-inline {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.form-inline .form-control {
  flex: 1;
}

/* Alerts */
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
  background: #f0f0f0;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Footer */
.footer {
  background: white;
  border-top: 1px solid #e0e0e0;
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: #666;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 4rem 0;
  text-align: center;
  margin: -2rem 0 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero .lead {
  font-size: 1.3rem;
  margin-bottom: 3rem;
  opacity: 0.95;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature {
  background: rgba(255,255,255,0.1);
  padding: 2rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.feature h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Auth Forms */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.auth-box {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

.auth-box h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.auth-box .subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

/* Dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.events-section {
  margin-bottom: 3rem;
}

.events-section h2 {
  margin-bottom: 1.5rem;
  color: #333;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

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

.event-card.past {
  opacity: 0.7;
}

.event-card h3 {
  margin-bottom: 0.5rem;
}

.event-card h3 a {
  color: var(--secondary-color);
  text-decoration: none;
}

.event-type {
  color: #666;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-date {
  color: #888;
  margin: 0.5rem 0;
}

.event-location {
  color: #666;
  margin-bottom: 1rem;
}

.event-stats {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem 0;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

.stat {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

.stat strong {
  display: block;
  font-size: 1.2rem;
  color: #333;
}

.event-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 8px;
}

.empty-state h2 {
  margin-bottom: 1rem;
  color: #333;
}

.empty-state p {
  color: #666;
  margin-bottom: 2rem;
}

/* Event Details */
.event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.event-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.detail-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detail-card h3 {
  margin-bottom: 1.5rem;
  color: #333;
}

.detail-card dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem;
}

.detail-card dt {
  font-weight: 600;
  color: #666;
}

.detail-card dd {
  color: #333;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 8px;
}

.stat-card.success {
  background: #d4edda;
  color: #155724;
}

.stat-card.danger {
  background: #f8d7da;
  color: #721c24;
}

.stat-card.warning {
  background: #fff3cd;
  color: #856404;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
}

.stat-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tables */
.table {
  width: 100%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.table thead {
  background: #f5f5f5;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge-pending {
  background: #fff3cd;
  color: #856404;
}

.badge-attending {
  background: #d4edda;
  color: #155724;
}

.badge-not_attending {
  background: #f8d7da;
  color: #721c24;
}

/* Brand-specific styles */
.brand-invitepixel {
  --primary-color: #f093fb;
  --secondary-color: #764ba2;
}

.brand-shareourdate {
  --primary-color: #d4a574;
  --secondary-color: #1a1a1a;
}

.brand-shareourdate .hero {
  background: linear-gradient(135deg, #d4a574, #8b7355);
}

.brand-shareourdate .feature h3 {
  font-weight: 300;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .form-row,
  .event-details {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .event-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}