/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Component stylesheets are automatically included by Propshaft */

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #111827;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  min-height: 100vh;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.875rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }
h5 { font-size: 1.125rem; margin-bottom: 0.5rem; }
h6 { font-size: 1rem; margin-bottom: 0.5rem; }

/* Paragraphs */
p {
  color: #374151;
  font-weight: 400;
  margin-bottom: 1rem;
}

/* Strong emphasis */
strong, b {
  color: #111827;
  font-weight: 700;
}

/* Links */
a {
  color: #4338ca;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #3730a3;
  text-decoration: underline;
}

/* Small text */
small {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

/* Header */
.header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4338ca;
  text-decoration: none;
  letter-spacing: -0.025em;
}

.logo:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
  background: rgba(67, 56, 202, 0.08);
  color: #4338ca;
  transform: translateY(-1px);
}

/* Header button styling */
.header .btn-primary {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid rgba(67, 56, 202, 0.3);
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.header .btn-primary:hover {
  background: linear-gradient(135deg, #3730a3 0%, #312e81 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 56, 202, 0.35);
  text-decoration: none;
}

/* Main content */
.main-content {
  padding: 2rem 0;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 4rem 0;
  color: white;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}


.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.025em;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 500;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #3730a3 0%, #4338ca 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(67, 56, 202, 0.4);
  border: 1px solid rgba(55, 48, 163, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(67, 56, 202, 0.4);
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%);
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #4338ca;
  border: 2px solid #4338ca;
  font-weight: 600;
}

.btn-secondary:hover {
  background: #4338ca;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 56, 202, 0.25);
  text-decoration: none;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 16px 32px rgba(0, 0, 0, 0.12);
  border-color: rgba(67, 56, 202, 0.1);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(249, 250, 251, 0.5);
}

.card-body {
  padding: 1.5rem;
  color: #374151;
}

.card-footer {
  padding: 1rem 1.5rem;
  background: rgba(249, 250, 251, 0.6);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: #6b7280;
}

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

.form-label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #111827;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-white {
  color: white;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Animation classes for Hotwire */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

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

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

/* Payment & Publishing Styles */
.payment-section {
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.publish-section h3 {
  margin-bottom: 0.5rem;
  color: #1f2937;
  font-weight: 700;
}

.publish-btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: white;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.publish-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

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

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

.published-section h3 {
  color: #047857;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

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

.text-success {
  color: #059669;
  font-weight: 600;
}

/* Alert Styles */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-success {
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
  color: #047857;
  font-weight: 500;
}

.alert-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #b91c1c;
  font-weight: 500;
}

.alert-pending {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #d97706;
  font-weight: 500;
}

/* Additional responsive adjustments for payment section */
@media (max-width: 768px) {
  .published-actions {
    flex-direction: column;
  }
  
  .publish-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

/* Additional CSS animations for polish */
.sparkle {
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { 
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% { 
    transform: scale(1.1) rotate(180deg);
    opacity: 0.8;
  }
}

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.glow {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  }
  to {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
  }
}

/* Success state animations */
.success-pulse {
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(1);
    background: var(--accent-color);
  }
  50% {
    transform: scale(1.05);
    background: #4CAF50;
  }
  100% {
    transform: scale(1);
    background: #4CAF50;
  }
}
