/* Church Optimizer - Shared Styles */

:root {
  --black: #000000;
  --grey-900: #0A0A0A;
  --grey-800: #1A1A1A;
  --grey-700: #2A2A2A;
  --grey-600: #3A3A3A;
  --grey-500: #7A7A7A;
  --grey-400: #9A9A9A;
  --grey-300: #BABABA;
  --grey-200: #E5E5E5;
  --grey-100: #F5F5F5;
  --white: #FFFFFF;
  --green: #22C55E;
  --green-dark: #16A34A;
  --red: #EF4444;
  --yellow: #F59E0B;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--grey-900);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
  background-color: var(--black);
  border-bottom: 1px solid var(--grey-800);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--white);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-name {
  font-size: 14px;
  color: var(--grey-300);
}

.logout-btn {
  background: none;
  border: 1px solid var(--grey-700);
  color: var(--grey-300);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background-color: var(--grey-800);
  border-color: var(--grey-600);
  color: var(--white);
}

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

/* Stats Section */
.stats-section {
  margin-bottom: 60px;
}

.church-name {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 32px;
  color: var(--white);
}

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

.stat-card {
  background-color: var(--grey-800);
  border: 1px solid var(--grey-700);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  background-color: var(--grey-700);
  border-color: var(--grey-600);
}

.stat-label {
  font-size: 13px;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 36px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -1px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

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

.btn-primary:hover {
  background-color: var(--grey-200);
  transform: translateY(-1px);
}

.btn-secondary {
  background: none;
  border: 1px solid var(--grey-700);
  color: var(--grey-300);
}

.btn-secondary:hover {
  background-color: var(--grey-800);
  border-color: var(--grey-600);
  color: var(--white);
}

.upload-btn {
  background-color: var(--white);
  color: var(--black);
  border: none;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.upload-btn:hover {
  background-color: var(--grey-200);
  transform: translateY(-1px);
}

.upload-btn:active {
  transform: translateY(0);
}

/* Sermons Section */
.sermons-section {
  margin-top: 60px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--grey-800);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.5px;
}

.view-all {
  font-size: 14px;
  color: var(--grey-400);
  text-decoration: none;
  transition: color 0.2s ease;
}

.view-all:hover {
  color: var(--white);
}

/* Sermon Cards */
.sermon-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sermon-card {
  background-color: var(--grey-800);
  border: 1px solid var(--grey-700);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
}

.sermon-card:hover {
  background-color: var(--grey-700);
  border-color: var(--grey-600);
}

.sermon-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.sermon-info {
  flex: 1;
}

.sermon-date {
  font-size: 13px;
  color: var(--grey-400);
  margin-bottom: 4px;
}

.sermon-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.sermon-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.status-complete {
  background-color: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.status-processing {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--yellow);
}

.status-error {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-complete .status-dot {
  background-color: var(--green);
}

.status-processing .status-dot {
  background-color: var(--yellow);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-error .status-dot {
  background-color: var(--red);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.sermon-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--grey-700);
}

.action-btn {
  background: none;
  border: 1px solid var(--grey-700);
  color: var(--grey-300);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}

.action-btn:hover {
  background-color: var(--grey-700);
  border-color: var(--grey-600);
  color: var(--white);
}

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

.action-btn.primary:hover {
  background-color: var(--grey-200);
}

/* Footer Links */
.footer-links {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--grey-800);
  display: flex;
  gap: 24px;
  justify-content: center;
}

.footer-link {
  font-size: 14px;
  color: var(--grey-500);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--grey-300);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg, var(--grey-800) 25%, var(--grey-700) 50%, var(--grey-800) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--grey-400);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--grey-300);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 14px;
  color: var(--grey-500);
  margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 40px 20px;
  }

  header {
    padding: 16px 20px;
  }

  .church-name {
    font-size: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .sermon-header {
    flex-direction: column;
  }

  .sermon-actions {
    flex-direction: column;
  }
}
