/* Animated Text Generator Styles */
:root {
  --primary-color: #4460aa;
  --primary-light: #6a80c5;
  --primary-dark: #2d4080;
  --secondary-color: #ff7ac6;
  --secondary-light: #ff9ed6;
  --secondary-dark: #d65aa6;
  --text-on-primary: #ffffff;
  --text-on-secondary: #ffffff;
  --background-color: #f5f7fa;
  --surface-color: #ffffff;
  --error-color: #f44336;
  --success-color: #4caf50;
  --border-radius: 12px;
  --box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}

/* Generator Container */
.generator-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  position: relative;
  overflow: hidden;
}

.generator-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color),
    var(--primary-light)
  );
  z-index: 1;
}

.generator-header {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.generator-header h1 {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 0px 2px 3px rgba(0, 0, 0, 0.1);
}

.page-description {
  color: #666;
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Two Column Layout */
.tool-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.tool-column {
  flex: 1;
  min-width: 300px;
}

/* Text Input Area */
.text-input-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#inputText {
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1.1rem;
  resize: vertical;
  transition: all var(--transition-speed) ease;
  background-color: #fcfcfc;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#inputText:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(68, 96, 170, 0.2);
  background-color: #fff;
}

.transform-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.transform-btn {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-dark)
  );
  color: var(--text-on-primary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 10px rgba(68, 96, 170, 0.3);
}

.transform-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(68, 96, 170, 0.4);
}

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

.copy-status {
  display: none;
  background: linear-gradient(145deg, var(--success-color), #218838);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* Animation Options */
.animation-options {
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.animation-options::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--secondary-color)
  );
}

.options-header {
  margin-bottom: 1.5rem;
}

.options-header h2 {
  font-size: 1.25rem;
  color: #333;
  margin: 0;
}

/* Options Tabs */
.options-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.option-tab {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: #777;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  position: relative;
}

.option-tab.active {
  color: var(--primary-color);
}

.option-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

.options-panel {
  display: none;
}

.options-panel.active {
  display: block;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-group label {
  font-weight: 600;
  color: #555;
  font-size: 0.95rem;
}

.option-group select,
.option-group input[type="text"],
.option-group input[type="number"] {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: all var(--transition-speed) ease;
}

.option-group select:focus,
.option-group input[type="text"]:focus,
.option-group input[type="number"]:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(68, 96, 170, 0.2);
}

.option-group input[type="color"] {
  width: 100%;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
}

.option-group input[type="range"] {
  width: 100%;
  margin: 0.5rem 0;
}

.range-with-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.range-with-value input[type="range"] {
  flex: 1;
  margin: 0;
}

.range-with-value span {
  font-size: 0.85rem;
  color: #666;
  min-width: 30px;
  text-align: right;
}

.color-options {
  display: flex;
  gap: 1rem;
}

.option-group.half {
  flex: 1;
}

/* Animation Preview */
.animation-preview-container {
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.animation-preview-container h2 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.animation-preview-container h2::before {
  content: "▶";
  color: var(--secondary-color);
  margin-right: 8px;
  font-size: 1rem;
}

.animation-preview {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

.animation-preview::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.03), transparent);
  height: 15%;
}

.preview-content {
  font-size: 36px;
  color: #fff;
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  perspective: 400px; /* For 3D animations */
}

.preview-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative;
}

.control-btn {
  background-color: #fff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.control-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.6s ease;
  z-index: -1;
}

.control-btn:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.control-btn:hover::before {
  left: 100%;
}

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

.control-btn i {
  font-size: 1rem;
}

/* Code Display */
.code-display-container {
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid #e9ecef;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.collapsible-header h2 {
  font-size: 1.25rem;
  color: #333;
  margin: 0;
}

.toggle-btn {
  background: none;
  border: none;
  color: #777;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.collapsible.collapsed .toggle-btn {
  transform: rotate(-90deg);
}

.collapsible-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 500px;
}

.collapsible.collapsed .collapsible-content {
  max-height: 0;
}

.code-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.code-tab {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: #777;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  position: relative;
}

.code-tab.active {
  color: var(--primary-color);
}

.code-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

.code-content {
  position: relative;
}

.code-block {
  background-color: #2d2d2d;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  display: none;
  max-height: 200px;
  overflow-y: auto;
}

.code-block.active {
  display: block;
}

/* SEO Content */
.seo-content {
  margin-top: 3rem;
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  border: 1px solid #e9ecef;
}

.seo-content h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 1rem;
}

.seo-content p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.usage-guide,
.compatibility-info {
  margin-top: 2rem;
}

.usage-guide h3,
.compatibility-info h3 {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 1rem;
}

.usage-guide ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.usage-guide li {
  margin-bottom: 0.75rem;
  color: #555;
}

.copy-guidance {
  background: #f0f4ff;
  padding: 1rem;
  border-radius: 8px;
  font-style: italic;
  color: #555;
  border-left: 4px solid var(--primary-color);
}

.compatibility-info p {
  font-weight: 500;
  color: #666;
}

/* Animation Keyframes */
/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Bounce Animation */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

/* Slide In Animation */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Typewriter Animation */
@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Wave Animation */
@keyframes wave {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-15px);
  }
  75% {
    transform: translateY(15px);
  }
}

/* Flip Animation */
@keyframes flip {
  0% {
    transform: perspective(400px) rotateY(0deg);
  }
  100% {
    transform: perspective(400px) rotateY(360deg);
  }
}

/* Pulse Animation */
@keyframes pulseAnim {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Shake Animation */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-10px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(10px);
  }
}

/* Rainbow Colors Animation */
@keyframes rainbow {
  0% {
    color: red;
  }
  14% {
    color: orange;
  }
  28% {
    color: yellow;
  }
  42% {
    color: green;
  }
  57% {
    color: blue;
  }
  71% {
    color: indigo;
  }
  85% {
    color: violet;
  }
  100% {
    color: red;
  }
}

/* Glitch Animation */
@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-5px, 5px);
  }
  40% {
    transform: translate(-5px, -5px);
  }
  60% {
    transform: translate(5px, 5px);
  }
  80% {
    transform: translate(5px, -5px);
  }
  100% {
    transform: translate(0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .generator-container {
    padding: 1rem;
  }

  .generator-header h1 {
    font-size: 1.8rem;
  }

  .tool-layout {
    flex-direction: column;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .preview-controls {
    flex-direction: column;
  }

  .control-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .animation-preview {
    padding: 1rem;
    min-height: 150px;
  }

  .preview-content {
    font-size: 24px;
  }

  .code-block {
    font-size: 0.8rem;
    padding: 0.75rem;
  }
}
