/**
 * Tesla Events & Launch Countdown Styles
 */

.events-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  color: #f4f4f4;
}

.events-header {
  text-align: center;
  margin-bottom: 40px;
}

.events-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.events-header .subtitle {
  color: #888;
  font-size: 1.1rem;
}

.events-section {
  margin-bottom: 60px;
}

.events-section h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #fff;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

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

.event-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.event-card:hover {
  transform: translateY(-4px);
  border-color: #667eea;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.event-card.live {
  border-color: #ff4444;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
}

.event-card.live::before {
  content: '🔴 LIVE';
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff4444;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.event-card-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
  margin: 0;
  flex: 1;
}

.event-card-type {
  background: #667eea;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: bold;
}

.event-card-description {
  color: #aaa;
  margin-bottom: 15px;
  line-height: 1.5;
}

.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #888;
}

.event-card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.countdown-container {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.countdown-label {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}

.countdown-timer {
  display: flex;
  gap: 15px;
  font-family: 'Courier New', monospace;
}

.countdown-unit {
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  min-width: 60px;
}

.countdown-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
  display: block;
}

.countdown-label-unit {
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  margin-top: 4px;
}

.countdown-expired {
  color: #888;
  font-style: italic;
}

/* Live Updates Section */
.updates-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.update-item {
  background: #1a1a1a;
  border: 1px solid #333;
  border-left: 4px solid #667eea;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.update-item:hover {
  border-left-color: #764ba2;
  background: #222;
}

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

.update-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  margin: 0;
  flex: 1;
}

.update-title a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s;
}

.update-title a:hover {
  color: #764ba2;
}

.update-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #888;
  flex-wrap: wrap;
}

.update-summary {
  color: #aaa;
  line-height: 1.6;
  margin-top: 10px;
}

.update-source {
  color: #667eea;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .events-grid {
    grid-template-columns: 1fr;
  }

  .events-header h1 {
    font-size: 2rem;
  }

  .countdown-timer {
    gap: 10px;
  }

  .countdown-unit {
    min-width: 50px;
    padding: 8px;
  }

  .countdown-value {
    font-size: 1.2rem;
  }
}

/* Hidden sections */
.hidden {
  display: none !important;
}

/* Loading and Error States */
.loading-state,
.error-state {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  border: 4px solid #333;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-primary,
.btn-secondary {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

.btn-primary:hover,
.btn-secondary:hover {
  background: #764ba2;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #444;
}

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

