:root {
  --primary-color: #5d5fef;
  --primary-hover: #4a4cbf;
  --bg-color: #f9fafc;
  --card-bg: #ffffff;
  --text-color: #2d3748;
  --border-color: #e2e8f0;
  --slider-track: #e2e8f0;
  --slider-thumb: #5d5fef;
  --secondary-text: #4a5568;
  --success-color: #38a169;
  --warning-color: #dd6b20;
  --error-color: #e53e3e;
  --color-primary: #0066cc;
  --color-primary-light: #4d94ff;
  --color-primary-dark: #004c99;
  --color-secondary: #6c757d;
  --color-secondary-light: #9ca5af;
  --color-secondary-dark: #495057;
  --color-text: #333333;
  --color-text-light: #6c757d;
  --color-background: #f8f9fa;
  --color-card: #ffffff;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-xxl: 2rem;
}

body {
  font-family: var(--font-family);
  margin: 0; 
  padding: 0; 
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    margin: 20px auto;
    padding: 0 16px;
  }
}

header {
  margin-bottom: 40px;
  text-align: center;
}

h1 {
  color: var(--text-color);
  margin-top: 0;
  font-weight: 600;
  font-size: 2.2rem;
  line-height: 1.2;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
}

.animation-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 24px auto;
  max-width: 320px;
}

.animation-showcase img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.animation-caption {
  font-size: 0.9rem;
  color: var(--secondary-text);
  margin-top: 12px;
  font-style: italic;
}

.card {
  background: var(--card-bg);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  margin-bottom: 32px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

@media (max-width: 480px) {
  .card {
    padding: 24px 20px;
    border-radius: 12px;
  }
}

h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--text-color);
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f2f5;
}

p {
  margin-bottom: 24px;
  color: var(--secondary-text);
}

.form-group {
  margin-bottom: 24px;
}

.slider-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.slider-group input[type="number"] {
  width: 70px;
  text-align: center;
  font-weight: 500;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 768px) {
  .grid-2col {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .grid-4col {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

label {
  margin-bottom: 10px;
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-color);
}

input[type="number"],
input[type="text"],
select {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  background-color: #fafafa;
}

/* Styling for range sliders */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--slider-track);
  outline: none;
  margin: 12px 0;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--slider-thumb);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(93, 95, 239, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--slider-thumb);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  box-shadow: 0 2px 6px rgba(93, 95, 239, 0.3);
}

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

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

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(93, 95, 239, 0.15);
}

.color-picker {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  height: 48px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.color-picker:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.color-picker-input {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.color-display {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 0px 0px 3px rgba(0,0,0,0.7);
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s;
}

.button-group {
  margin-top: 32px;
  display: flex;
  gap: 16px;
}

@media (max-width: 480px) {
  .button-group {
    flex-direction: column;
  }
}

button {
  padding: 14px 24px;
  border: none;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  min-height: 52px; /* Better for touch */
  box-shadow: 0 4px 6px rgba(93, 95, 239, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(93, 95, 239, 0.25);
}

button:active {
  transform: translateY(0);
}

.button-secondary {
  background: #f0f2f5;
  color: var(--text-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.button-secondary:hover {
  background: #e2e8f0;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.08);
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 0;
  transition: all 0.2s;
}

.checkbox-group:hover {
  background-color: rgba(93, 95, 239, 0.03);
  border-radius: 6px;
}

.checkbox-group input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.checkbox-group label {
  margin-bottom: 0;
  margin-left: 8px;
  cursor: pointer;
}

#svgContainer {
  margin-top: 24px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow-x: auto;
  transition: all 0.3s ease;
}

#svgContainer:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Hide custom canvas fields by default */
#customCanvas {
  display: none;
  margin-top: 20px;
  padding: 16px;
  background: #fafafa;
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quadrant-settings {
  margin-bottom: 36px;
}

/* Tooltip styles */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

.help-text {
  font-size: 0.95rem;
  color: var(--secondary-text);
  margin-bottom: 20px;
  padding: 12px 16px;
  background-color: rgba(93, 95, 239, 0.05);
  border-left: 3px solid var(--primary-color);
  border-radius: 4px;
}

footer {
  text-align: center;
  margin: 40px 0 20px;
  color: var(--secondary-text);
  font-size: 0.95rem;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

footer a {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}

footer a:hover {
  color: var(--primary-color);
}

#colorFields {
  margin-top: 20px;
}

.error-message {
  color: var(--error-color);
  font-size: 0.95rem;
  margin-top: 8px;
  padding: 10px 14px;
  background-color: rgba(229, 62, 62, 0.05);
  border-left: 3px solid var(--error-color);
  border-radius: 4px;
}

.logo {
  margin: 0 auto 1rem;
  text-align: center;
  animation: float 3s ease-in-out infinite;
}

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

.highlight {
  color: var(--primary-color);
  font-weight: 600;
  padding: 2px 6px;
  background-color: rgba(93, 95, 239, 0.08);
  border-radius: 4px;
}

/* Progress Message */
.progress-message {
  background-color: rgba(0, 102, 204, 0.1);
  border-radius: 8px;
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  border-left: 4px solid var(--color-primary);
  color: var(--color-primary-dark);
  font-weight: 500;
  text-align: center;
  animation: pulse 2s infinite;
}

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

@media (max-width: 768px) {
  .container {
    margin: 20px auto;
    padding: 0 16px;
  }
  
  h1 {
    font-size: var(--font-size-xl);
  }
  
  h2 {
    font-size: var(--font-size-lg);
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  #colorFields {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .button-group {
    flex-direction: column;
  }
  
  button {
    width: 100%;
  }
} 