/* Custom styles */
:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --background: #0f172a;
  --card-bg: #1e293b;
  --input-bg: #334155;
  --border-color: #475569;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
}

body {
  font-family: 'Inter', sans-serif;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--card-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Range inputs */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--input-bg);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
}

/* Color input */
input[type="color"] {
  -webkit-appearance: none;
  border: none;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

/* Preview text */
#previewText {
  transition: all 0.3s ease;
  max-width: 100%;
  word-wrap: break-word;
}

/* Color presets */
.color-preset {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
  position: relative;
}

.color-preset:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.color-preset.active {
  border-color: white;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.color-preset.active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
}

/* Button styles */
.style-btn {
  transition: all 0.2s ease;
}

.style-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-hover);
}

/* Quick font buttons */
.quick-font {
  transition: all 0.15s ease;
}

.quick-font:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-hover);
}

/* Style cards */
.style-card {
  transition: all 0.2s ease;
}

.style-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Form controls */
textarea, select, input[type="text"] {
  transition: all 0.2s ease-in-out;
}

textarea:focus, select:focus, input[type="text"]:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
  border-color: var(--primary-color);
}

/* Select styling for font categories */
select#fontCategory {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cbd5e1'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.5em 1.5em;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: all 0.2s ease;
}

select#fontCategory:hover {
  background-color: var(--input-bg);
  cursor: pointer;
}

select#fontFamily {
  transition: all 0.2s ease;
}

select#fontFamily option {
  font-family: inherit;
}

/* Font selection UI */
.font-ui-controls {
  position: relative;
}

.font-ui-controls::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.font-ui-controls:hover::after {
  transform: scaleX(1);
}

/* Font sample preview */
optgroup {
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.25rem 0;
}

option {
  padding: 8px 12px;
  font-weight: normal;
}

/* Improved font dropdown styling */
#fontFamily {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cbd5e1'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.5em 1.5em;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

#fontFamily:hover {
  cursor: pointer;
  background-color: var(--input-bg);
}

#fontFamily option {
  transition: background-color 0.2s;
}

#fontFamily option:hover, 
#fontFamily option:focus {
  background-color: var(--primary-color);
}

/* Style for the selected font in dropdown */
#fontFamily option[style*="display: ''"] {
  background-color: var(--input-bg);
  color: var(--text-primary);
  font-weight: 500;
  padding: 10px 15px;
}

/* Font search box styling */
#fontSearch {
  padding-right: 2.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-icon {
  transition: color 0.3s ease;
}

#fontSearch:focus + .search-icon {
  color: var(--primary-color) !important;
}

/* Fonts animation */
@keyframes fontFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#fontFamily optgroup[style*="display: ''"] {
  animation: fontFadeIn 0.3s ease-out;
}

/* Selected font highlight animation */
@keyframes pulseHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

#fontFamily:focus {
  animation: pulseHighlight 1.5s ease-out;
}

/* Copy buttons feedback */
.copy-success {
  background-color: #10b981 !important;
}

/* Share modal */
#shareModal {
  transition: opacity 0.3s ease;
}

#shareModal.hidden {
  display: none;
}

.social-share-btn {
  transition: all 0.3s ease;
}

.social-share-btn:hover {
  transform: translateY(-2px);
}

/* Gradient backgrounds */
.bg-gradient-red {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.bg-gradient-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.bg-gradient-green {
  background: linear-gradient(135deg, #10b981 0%, #84cc16 100%);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  h1 {
    font-size: 1.875rem;
  }
  
  #shareModal .bg-slate-800 {
    margin: 0 16px;
    width: calc(100% - 32px);
  }
} 