/* ========================================
   TinySolvers Custom Styles
   ======================================== */

/* Original Styles */
textarea.textarea {
  min-height: 14rem;
}

.htmx-request #spinner {
  display: inline-block;
}

#loadingModal .modal-content {
  max-width: 22rem;
}

/* ========================================
   Gradient Hero Section
   ======================================== */
.gradient-hero {
  background: linear-gradient(135deg, #3456ee 0%, #4b86a2 50%, #85ff95 100%);
  position: relative;
  overflow: hidden;
}

.gradient-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="white" fill-opacity="0.1"/></svg>');
  background-size: 50px 50px;
  opacity: 0.3;
}

.hero-icon-container {
  position: relative;
  display: inline-block;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in-up.delay-1 {
  animation-delay: 0.2s;
}

.fade-in-up.delay-2 {
  animation-delay: 0.4s;
}

.fade-in-up.delay-3 {
  animation-delay: 0.6s;
}

.floating {
  animation: float 3s ease-in-out infinite;
}

/* ========================================
   Card Styles
   ======================================== */
.feature-card {
  height: 100%;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

.feature-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.feature-icon {
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

/* ========================================
   Hover Effects
   ======================================== */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.hover-lift:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Form Container
   ======================================== */
.form-container {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.form-container:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Enhanced form inputs */
.input:focus, .select select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.125em rgba(102, 126, 234, 0.25);
}

/* Section dividers */
.form-container hr {
  background-color: #e8e8e8;
  height: 2px;
}

/* Input group styling */
.field .label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.help {
  font-size: 0.875rem;
  color: #7a7a7a;
}

/* ========================================
   Button Enhancements
   ======================================== */
.button.is-rounded {
  border-radius: 50px;
  padding-left: 1.5em;
  padding-right: 1.5em;
}

.button.is-medium {
  font-size: 1.1rem;
  padding: 1.25rem 2rem;
}

.button.is-large {
  font-size: 1.25rem;
  padding: 1.5rem 2.5rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media screen and (max-width: 768px) {
  .gradient-hero .title.is-1 {
    font-size: 2.5rem;
  }

  .gradient-hero .title.is-2 {
    font-size: 2rem;
  }

  .gradient-hero .subtitle.is-4 {
    font-size: 1.25rem;
  }

  .hero-icon-container .icon i {
    font-size: 5rem !important;
  }

  .feature-card {
    margin-bottom: 1.5rem;
  }

  .button.is-large {
    font-size: 1.1rem;
    padding: 1.25rem 2rem;
  }

  .button.is-medium {
    font-size: 1rem;
    padding: 1rem 1.5rem;
  }

  /* Fix level component stacking on mobile */
  .level {
    flex-direction: column;
    align-items: flex-start;
  }

  .level-left,
  .level-right {
    width: 100%;
  }

  .level-right {
    margin-top: 1rem;
    justify-content: flex-start;
  }

  /* Smaller page titles on mobile */
  .title.is-2 {
    font-size: 1.5rem;
  }

  .subtitle.is-5 {
    font-size: 0.95rem;
  }
}

/* ========================================
   Loading State Improvements
   ======================================== */
.modal-content {
  animation: fadeInUp 0.3s ease-out;
}

/* ========================================
   Utility Classes
   ======================================== */
.has-text-white-bis {
  color: #f5f5f5 !important;
}

.has-text-white-ter {
  color: #ececec !important;
}

/* Icon text alignment */
.icon-text {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
}

.icon-text .icon {
  flex-grow: 0;
  flex-shrink: 0;
}

/* Spacing utilities */
.py-6 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.my-5 {
  margin-top: 2rem !important;
  margin-bottom: 2rem !important;
}

/* ========================================
   Additional Polish
   ======================================== */
.box {
  border-radius: 12px;
}

.card {
  border-radius: 12px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
*:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

button:focus, a:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* ========================================
   Buy Me a Coffee Button
   ======================================== */
.coffee-button {
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 221, 87, 0.4);
  transition: all 0.3s ease;
}

.coffee-button:hover {
  box-shadow: 0 6px 20px rgba(255, 221, 87, 0.6);
  transform: translateY(-3px) scale(1.05);
}

.coffee-button:active {
  transform: translateY(-1px) scale(1.02);
}

/* Pulse animation for coffee button */
@keyframes coffee-pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 221, 87, 0.4);
  }
  50% {
    box-shadow: 0 6px 20px rgba(255, 221, 87, 0.6);
  }
}

.coffee-button {
  animation: coffee-pulse 2s ease-in-out infinite;
}

/* ========================================
   Math Symbols Hero Animation
   ======================================== */
.math-symbols-container {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.math-symbol {
  position: absolute;
  opacity: 0.9;
}

.math-symbol:nth-child(1) {
  top: 20%;
  left: 15%;
}

.math-symbol:nth-child(2) {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.math-symbol:nth-child(3) {
  top: 15%;
  right: 20%;
}

.math-symbol:nth-child(4) {
  bottom: 20%;
  left: 25%;
}

.math-symbol:nth-child(5) {
  bottom: 15%;
  right: 15%;
}

/* Responsive adjustments for math symbols */
@media screen and (max-width: 768px) {
  .math-symbols-container {
    height: 300px;
  }

  .math-symbol span {
    font-size: 3rem !important;
  }
}

/* ========================================
   Stats Quote Box
   ======================================== */
.stats-quote-box {
  border-radius: 16px;
  border: 3px solid #3273dc;
  box-shadow: 0 4px 16px rgba(50, 115, 220, 0.15);
  padding: 2rem;
  transition: all 0.3s ease;
}

.stats-quote-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(50, 115, 220, 0.25);
}

.stats-quote-box .title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}