/**
 * SPA Styles
 */

/* Root Container */
#app-root {
  min-height: 100vh;
  position: relative;
}

/* Loading Indicator */
.spa-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.spa-loading.show {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #22c55e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  color: #666;
  font-size: 1rem;
}

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

/* View Transitions */
.spa-view {
  animation: fadeIn 0.3s ease;
  min-height: 80vh;
}

.spa-transitioning-in {
  opacity: 0;
  transform: translateY(20px);
  animation: slideIn 0.3s ease forwards;
}

.spa-transitioning-out {
  opacity: 0;
  transform: translateY(-20px);
  animation: slideOut 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Navigation Active State */
.nav-link[data-active="true"] {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
}

/* Page Layouts */
.page-home,
.page-events,
.page-about,
.page-register,
.page-event-detail,
.page-admin-login,
.page-404 {
  padding-top: 80px; /* Account for fixed header */
}

/* Event Detail Page */
.event-hero {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  padding: 3rem 0;
}

.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.breadcrumb a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
  opacity: 0.7;
}

.event-content {
  padding: 3rem 0;
}

.event-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.event-info-card,
.event-description,
.event-talks,
.participation-vote-section,
.registration-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.info-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.info-item:last-child {
  border-bottom: none;
}

.info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-content {
  flex: 1;
}

.info-content strong {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.event-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.stat-icon {
  font-size: 1.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #22c55e;
  margin: 0 0.5rem;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-block {
  width: 100%;
}

.share-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
}

.share-btn {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.share-btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

/* Vote Section */
.vote-form {
  margin-top: 1.5rem;
}

.vote-form .form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.vote-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.vote-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

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

/* Registration Form */
.registration-section {
  animation: slideIn 0.5s ease;
}

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

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

.required {
  color: #dc2626;
}

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

.form-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

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

/* About Page */
.about-hero {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: white;
  text-align: center;
  padding: 4rem 0;
}

.about-hero .lead {
  font-size: 1.25rem;
  margin-top: 1rem;
  opacity: 0.9;
}

.about-content {
  padding: 3rem 0;
}

.intro-section,
.history-section,
.benefits-section,
.tips-section,
.cta-section {
  margin-bottom: 4rem;
}

.intro-card {
  background: #f8f9fa;
  border-left: 4px solid #22c55e;
  padding: 2rem;
  border-radius: 8px;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ddd;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 4px #f8f9fa;
}

.timeline-content {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.benefit-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

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

.benefit-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.tips-list {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tip-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid #eee;
}

.tip-item:last-child {
  border-bottom: none;
}

.cta-section {
  text-align: center;
  padding: 3rem;
  background: #f8f9fa;
  border-radius: 12px;
}

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

/* Register Page */
.register-hero {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  text-align: center;
  padding: 3rem 0;
}

.register-content {
  padding: 3rem 0;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.progress-step.active .step-number {
  background: #22c55e;
  color: white;
}

.step-label {
  font-size: 0.9rem;
  color: #666;
}

.progress-step.active .step-label {
  color: #333;
  font-weight: 600;
}

.progress-line {
  width: 100px;
  height: 2px;
  background: #e5e7eb;
  margin: 0 1rem;
  transition: background 0.3s ease;
}

.progress-line.active {
  background: #22c55e;
}

.register-form-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.participation-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.option-card {
  background: #f8f9fa;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.option-card:hover {
  border-color: #22c55e;
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.option-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.option-features {
  list-style: none;
  margin-top: 1rem;
  text-align: left;
}

.option-features li {
  padding: 0.5rem 0;
  color: #666;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.form-section:last-of-type {
  border-bottom: none;
}

.confirmation-content {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
}

.confirm-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.confirm-list dt {
  font-weight: 600;
  color: #666;
}

.confirm-list dd {
  color: #333;
}

.confirm-notice {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  text-align: center;
}

.confirm-notice .small {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Success Page */
.success-page {
  text-align: center;
  padding: 4rem 2rem;
}

.success-icon {
  font-size: 5rem;
  margin-bottom: 2rem;
  animation: bounce 1s ease;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

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

/* Admin Login Page */
.page-admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
}

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

.login-box {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.login-header {
  background: #f8f9fa;
  padding: 2rem;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.login-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: #666;
  font-size: 0.95rem;
}

.login-content {
  padding: 2rem;
}

.google-auth-section {
  margin-bottom: 1.5rem;
}

.btn-google-auth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: white;
  color: #3c4043;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.btn-google-auth:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google-auth img {
  width: 20px;
  height: 20px;
}

.btn-google-signup {
  background: #f8f9fa;
}

.divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e5e7eb;
}

.divider span {
  background: white;
  padding: 0 1rem;
  position: relative;
  color: #666;
  font-size: 0.9rem;
}

.error-message {
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.login-help {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #666;
}

.login-help a {
  color: #22c55e;
  text-decoration: none;
}

.login-help a:hover {
  text-decoration: underline;
}

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

.btn-text {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.btn-text:hover {
  color: #333;
}

/* 404 Page */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-content {
  max-width: 500px;
}

.error-code {
  font-size: 8rem;
  font-weight: bold;
  color: #e5e7eb;
  margin-bottom: 1rem;
  line-height: 1;
}

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

/* Notifications */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1000;
  animation: slideInRight 0.3s ease;
}

.notification-success {
  border-left: 4px solid #22c55e;
}

.notification-error {
  border-left: 4px solid #dc2626;
}

.notification-icon {
  font-size: 1.25rem;
}

.notification-text {
  color: #333;
}

.notification.fade-out {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .event-main {
    grid-template-columns: 1fr;
  }
  
  .event-sidebar {
    order: -1;
  }
  
  .participation-options {
    grid-template-columns: 1fr;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .progress-bar {
    flex-direction: column;
    gap: 1rem;
  }
  
  .progress-line {
    width: 2px;
    height: 30px;
    margin: 0;
  }
  
  .vote-buttons {
    grid-template-columns: 1fr;
  }
  
  .share-buttons {
    grid-template-columns: 1fr;
  }
  
  .logo-image {
    height: 24px;
  }
  
  .logo-text {
    font-size: 1.1rem;
  }
}