/*
 * C47 Martini Platform - Shared Styles
 * Common styles for signup, login, and account pages
 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #000;
  min-height: 100vh;
  color: #fff;
}

/* Header Styles */
.header {
  background: #2a2a2a;
  padding: 20px 0;
  border-bottom: 1px solid #3a3a3a;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
}

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

.balance-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
}

.sign-out-btn {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid #3a3a3a;
  color: #aaa;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.sign-out-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

/* Container and Layout */
.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.auth-container {
  max-width: 500px;
  margin: 100px auto;
  padding: 20px;
}

/* Card Styles */
.card {
  background: #2a2a2a;
  border-radius: 12px;
  padding: 40px;
  border: 1px solid #3a3a3a;
  margin-bottom: 40px;
}

.auth-card {
  background: #2a2a2a;
  border-radius: 12px;
  padding: 40px;
  border: 1px solid #3a3a3a;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Typography */
.card h2, .auth-card h2 {
  font-size: 32px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: #aaa;
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.6;
}

/* Form Styles */
.form-section {
  background: #1f1f1f;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.form-section h3 {
  margin-bottom: 16px;
  color: #fff;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #aaa;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  background: #2a2a2a;
  border: 2px solid #3a3a3a;
  color: #fff;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button Styles */
.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 1px solid #3a3a3a;
  color: #aaa;
}

.btn-secondary:hover:not(:disabled) {
  border-color: #667eea;
  color: #667eea;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-google {
  background: #4285f4;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-google:hover:not(:disabled) {
  background: #3367d6;
  transform: translateY(-1px);
}

.btn-magic {
  background: #8b5cf6;
  color: white;
}

.btn-magic:hover:not(:disabled) {
  background: #7c3aed;
  transform: translateY(-1px);
}

/* Message Styles */
.message {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
}

.success-message {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  display: none;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  display: none;
}

.info-message {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.warning-message {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

/* Loading Styles */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

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

.text-center {
  text-align: center;
}

.text-small {
  font-size: 14px;
  color: #aaa;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.or-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: #666;
}

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

.or-divider span {
  background: #2a2a2a;
  padding: 0 16px;
}

/* Links */
.link {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s;
}

.link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-container {
    margin: 50px auto;
    padding: 15px;
  }

  .auth-card, .card {
    padding: 30px 20px;
  }

  .header-content {
    padding: 0 15px;
  }

  .container {
    padding: 0 15px;
  }

  .form-group input {
    max-width: 100%;
  }
}

/* Signup/Login Page Specific Styles */
.step-indicator {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 8px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3a3a;
  transition: background 0.3s;
}

.step-dot.active {
  background: #667eea;
  width: 24px;
  border-radius: 4px;
}

.form-section {
  display: none;
}

.form-section.active {
  display: block;
}

.input-group {
  margin-bottom: 20px;
}

.label {
  display: block;
  color: #aaa;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

.input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background: #1f1f1f;
  color: #fff;
  border: 2px solid #3a3a3a;
  border-radius: 8px;
  transition: all 0.3s;
}

.input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.code-input {
  text-align: center;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 20px;
}

.button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-secondary {
  background: transparent;
  border: 2px solid #3a3a3a;
  color: #aaa;
}

.button-secondary:hover:not(:disabled) {
  border-color: #667eea;
  color: #667eea;
}

.credits-banner {
  background: #0F0F0F;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
}

.credits-banner h3 {
  color: #acadad;
  font-size: 18px;
  margin-bottom: 4px;
}

.credits-banner p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.waitlist-link {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #3a3a3a;
}

.waitlist-link p {
  color: #999;
  font-size: 14px;
  margin-bottom: 8px;
}

.waitlist-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.waitlist-link a:hover {
  text-decoration: underline;
}

.login-link {
  text-align: center;
  margin-top: 16px;
}

.login-link a {
  color: #999;
  font-size: 14px;
  text-decoration: none;
}

.login-link a:hover {
  color: #667eea;
}

.auth-method-divider {
  text-align: center;
  position: relative;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-method-divider::before,
.auth-method-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #3a3a3a;
}

.auth-method-divider span {
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.existing-user-redirect {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.existing-user-redirect strong {
  display: block;
  margin-bottom: 8px;
}

.signup-link {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #dedede;
}

.signup-link p {
  color: #999;
  font-size: 14px;
  margin-bottom: 8px;
}

.signup-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.signup-link a:hover {
  text-decoration: underline;
}

/* Account Page Specific Styles */
.welcome-section {
  background: #2a2a2a;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 40px;
  border: 1px solid #3a3a3a;
}

.welcome-section h2 {
  font-size: 32px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-section .subtitle {
  color: #aaa;
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.name-form {
  background: #1f1f1f;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.name-form h3 {
  margin-bottom: 16px;
  color: #fff;
}

.save-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  text-align: center;
  line-height: 1.4;
}

#referralBonus {
  opacity: 0.95;
  margin-top: 4px;
}

.save-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.promotional-notice {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.promotional-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.promotional-content {
  flex: 1;
}

.promotional-content strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
  color: white;
}

.promotional-content p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.promotional-content span {
  font-weight: 600;
  color: #fbbf24;
}

.download-section {
  background: #2a2a2a;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 40px;
  border: 1px solid #3a3a3a;
}

.download-section h2 {
  font-size: 28px;
  margin-bottom: 30px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.download-card {
  background: #1f1f1f;
  border-radius: 8px;
  padding: 24px;
  border: 1px solid #3a3a3a;
}

.download-card h3 {
  margin-bottom: 16px;
  color: #fff;
}

.download-card p {
  color: #aaa;
  margin-bottom: 20px;
  font-size: 14px;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1f1f1f;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid #3a3a3a;
}

.video-placeholder svg {
  width: 60px;
  height: 60px;
  color: #3a3a3a;
}

.instructions-section {
  background: #2a2a2a;
  border-radius: 12px;
  padding: 40px;
  border: 1px solid #3a3a3a;
}

.instructions-section h2 {
  font-size: 28px;
  margin-bottom: 30px;
}

.instructions-list {
  list-style: none;
  padding: 0;
}

.instructions-list li {
  background: #1f1f1f;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid #3a3a3a;
}

.step-number {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.step-content h4 {
  margin-bottom: 8px;
  color: #fff;
}

.step-content p {
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
}