/* ColdPitch - Design System */

/* CSS Variables */
:root {
  --color-primary: #2563EB;
  --color-primary-hover: #1D4ED8;
  --color-background: #FAFBFC;
  --color-surface: #FFFFFF;
  --color-text: #1F2937;
  --color-text-muted: #6B7280;
  --color-border: #E5E7EB;
  --color-casual: #10B981;
  --color-professional: #3B82F6;
  --color-provocative: #F59E0B;
  --color-error: #EF4444;
  --color-success: #10B981;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base Styles */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hero Section */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0;
}

.hero-content {
  max-width: 600px;
  width: 100%;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--color-text);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  line-height: 1.5;
}

/* Form Styles */
.form {
  width: 100%;
}

.input-group {
  display: flex;
  gap: 12px;
  width: 100%;
}

.url-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  font-family: var(--font-family);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.url-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.url-input::placeholder {
  color: var(--color-text-muted);
}

/* Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-family);
  color: white;
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
  min-width: 160px;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--color-text-muted);
  background-color: var(--color-background);
}

.btn-text {
  display: inline;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

.spinner-large {
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

.spinner-circle {
  stroke-dasharray: 60;
  stroke-dashoffset: 45;
  stroke-linecap: round;
}

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

/* Error Message */
.error-message {
  margin-top: 12px;
  color: var(--color-error);
  font-size: 14px;
  text-align: left;
}

/* Loading Section */
.loading-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loading-spinner {
  color: var(--color-primary);
}

.loading-message {
  font-size: 18px;
  color: var(--color-text-muted);
  animation: pulse 2s ease-in-out infinite;
}

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

/* Results Section */
.results-section {
  flex: 1;
  padding: 20px 0;
}

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

.prospect-info {
  text-align: left;
}

.results-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.prospect-company {
  font-size: 16px;
  color: var(--color-text-muted);
}

/* Email Cards */
.email-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.email-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.email-card:hover {
  box-shadow: var(--shadow-lg);
}

.email-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.email-tone {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tone-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  color: white;
}

.tone-badge.casual {
  background-color: var(--color-casual);
}

.tone-badge.professional {
  background-color: var(--color-professional);
}

.tone-badge.provocative {
  background-color: var(--color-provocative);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-family);
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.copy-btn.copied {
  color: var(--color-success);
  border-color: var(--color-success);
}

.copy-icon {
  width: 16px;
  height: 16px;
}

.email-card-body {
  padding: 20px;
}

.email-subject {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.email-subject-text {
  font-weight: 600;
  color: var(--color-text);
}

.email-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  white-space: pre-wrap;
  background: var(--color-background);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 12px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0 20px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
    margin-bottom: 32px;
  }

  .input-group {
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-title {
    font-size: 24px;
  }

  .email-card-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .copy-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 16px;
  }

  .hero-title {
    font-size: 28px;
  }

  .url-input {
    padding: 12px 14px;
    font-size: 15px;
  }

  .btn-primary {
    padding: 12px 20px;
  }

  .email-body {
    padding: 12px;
    font-size: 14px;
  }
}
