/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: white;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main Content Styles */
main {
  flex: 1;
  max-width: 1200px;
  width: 95%;
  margin: 2rem auto;
  padding: 0 1rem;
}

.generator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 80px;
}

.controls-section,
.preview-section {
  background-color: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #444;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
}

/* Controls Section */
.control-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #555;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #8e2de2;
  box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.1);
}

.color-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

input[type="color"] {
  width: 60px;
  height: 40px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.color-value {
  font-weight: 600;
  color: #8e2de2;
}

.range-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

input[type="range"] {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #e9ecef;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8e2de2;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8e2de2;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.range-value {
  min-width: 50px;
  text-align: center;
  font-weight: 600;
  color: #8e2de2;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

button {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.apply-btn {
  background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
  color: white;
}

.apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(142, 45, 226, 0.3);
}

.reset-btn {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
}

.reset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(108, 117, 125, 0.3);
}

.download-btn {
  background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
  color: white;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 176, 155, 0.3);
}

/* Preview Section */
.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  margin-bottom: 2rem;
  border-radius: 12px;
  background-color: #f8f9fa;
  border: 1px dashed #dee2e6;
}

.preview-text {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
  padding: 1rem;
}

.css-output {
  background-color: #2d3748;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin-top: 1.5rem;
}

.css-code {
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin-top: 1rem;
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

/* Presets Section */
.presets-section {
  background-color: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  margin-top: 2rem;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.preset {
  height: 80px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  padding: 0.5rem;
  background-color: white;
}

.preset:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.preset.active {
  border-color: #8e2de2;
  box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.2);
}

.credit {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.team {
  font-size: 1.2rem;
  opacity: 0.9;
  font-style: italic;
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification.show {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .generator-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  main {
    width: 95%;
    margin: 1.5rem auto;
  }

  .controls-section,
  .preview-section,
  .presets-section {
    padding: 1.5rem;
  }

  .preview-text {
    font-size: 2.5rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .presets-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 480px) {
  header {
    padding: 2rem 0;
  }

  header h1 {
    font-size: 1.6rem;
  }

  .controls-section,
  .preview-section,
  .presets-section {
    padding: 1.2rem;
  }

  .preview-text {
    font-size: 2rem;
  }

  .presets-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .credit {
    font-size: 1.2rem;
  }

  .team {
    font-size: 1rem;
  }
}
