/* Homepage Specific Styles - toonifyit.com (Non-critical CSS loaded async) */

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

.converter__controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  animation: fadeIn 0.5s ease-out;
}

.converter__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
  animation: fadeIn 0.7s ease-out;
}

.converter__panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.converter__panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.converter__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

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

.converter__actions {
  display: flex;
  gap: 0.5rem;
}

.converter__actions .btn--small {
  background: var(--accent);
  color: white;
  border: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.converter__actions .btn--small:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  transform: translateY(-2px);
}

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

.textarea {
  transition: all 0.3s ease;
}

.textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.converter__error {
  min-height: 1.5rem;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.select {
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  font-size: 0.95rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23b0b0b0' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 16px;
}

body.dark-mode .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23b0b0b0' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
}

body.light-mode .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23666666' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: light) {
  .select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23666666' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
  }
}

.select--small {
  padding: 0.5rem 2.2rem 0.5rem 0.8rem;
  font-size: 0.9rem;
  background-position: right 0.6rem center;
  background-size: 14px 14px;
}

.select:hover {
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%234da6ff' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
}

body.dark-mode .select:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%234da6ff' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
}

body.light-mode .select:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23007bff' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: light) {
  .select:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23007bff' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
  }
}

.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.select:active {
  transform: translateY(1px);
}

.converter__options {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border);
  animation: fadeIn 0.9s ease-out;
}

.converter__options-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.converter__options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  align-items: start;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
}

.option__label {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
}

.checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* Stats Section */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: 0;
}

.stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 2rem 1.5rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stats__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(77, 166, 255, 0.15);
}

.stats__item--highlight {
  background: linear-gradient(135deg, rgba(77, 166, 255, 0.1), rgba(77, 166, 255, 0.05));
  border-color: var(--accent);
}

.stats__label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.stats__value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1.5px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.stats__item--highlight .stats__value {
  color: var(--success);
  font-size: 3rem;
}

/* How To Use Section */
.how-to-use {
  padding: 5rem 0;
  background: var(--bg-secondary);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  animation: fadeInUp 0.6s ease-out;
}

.step__number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.step__content {
  flex: 1;
}

.step__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.step__text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Features Section */
.features {
  padding: 5rem 0;
  background: var(--bg-primary);
}

.section__title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.feature {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--bg-primary);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  border: 2px solid transparent;
}

.feature:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.feature__icon {
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  color: var(--accent);
}

.feature__icon svg {
  width: 56px;
  height: 56px;
  stroke: var(--accent);
}

.feature:hover .feature__icon {
  transform: scale(1.15) rotate(5deg);
}

.feature:hover .feature__icon svg {
  stroke: var(--accent-hover);
}

.feature__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.feature__text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Responsive Design - Homepage Specific */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 0 2rem;
  }
  
  .hero__title {
    font-size: 2.2rem;
  }
  
  .hero__subtitle {
    font-size: 1.2rem;
  }
  
  .hero__description {
    font-size: 1rem;
  }
  
  .converter__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .converter__controls {
    flex-wrap: wrap;
  }
  
  .textarea {
    min-height: 250px;
  }
  
  .stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stats__value {
    font-size: 2rem;
  }
  
  .stats__item--highlight .stats__value {
    font-size: 2.5rem;
  }
  
  .section__title {
    font-size: 2rem;
  }
  
  .features {
    padding: 3rem 0;
  }
  
  .features__grid {
    gap: 2rem;
  }
  
  .how-to-use {
    padding: 3rem 0;
  }
  
  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.8rem;
  }
  
  .hero__subtitle {
    font-size: 1rem;
  }
  
  .converter__panel {
    padding: 1rem;
  }
  
  .feature {
    padding: 1.5rem 1rem;
  }
}
