/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.5;
  transition: background-color 0.3s, color 0.3s;
}

/* Theme Variables */
:root {
  --primary-color: #6c63ff;
  --secondary-color: #f0f0f0;
  --accent-color: #ff6584;
}

/* Header */
.header {
  text-align: center;
  padding: 1rem 0;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
}

.subtitle {
  font-size: 1rem;
  color: #666;
}

/* Container */
.container {
  max-width: 900px;
  margin: auto;
  padding: 1rem;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: space-around;
  margin: 1rem 0;
}

.tab-button {
  flex: 1;
  padding: 0.75rem;
  background-color: #eee;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.tab-button:hover {
  background-color: #ddd;
}

.tab-button.active {
  background-color: #ccc;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Form */
.form-section {
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="number"],
input[type="file"],
textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: all 0.3s ease;
}

input[type="radio"],
input[type="checkbox"] {
  margin-right: 0.5rem;
}

.range-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

output {
  font-weight: bold;
}

/* Buttons */
.primary-btn,
.secondary-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  margin-top: 1rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
}

.primary-btn:hover {
  background-color: #4b42d4;
}

.secondary-btn {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.secondary-btn:hover {
  background-color: var(--accent-color);
  color: white;
}

/* Canvas */
canvas {
  display: block;
  margin: 1rem auto;
  border: 1px solid #ccc;
}

/* Error */
.error {
  color: red;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Results */
.result-section {
  margin-top: 2rem;
}

details summary {
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 1rem;
  background-color: #f0f0f0;
  border-top: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    flex-direction: column;
  }

  .tab-button {
    margin-bottom: 0.5rem;
  }
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e0e0e0;
  }

  .header, .footer {
    background-color: #1e1e1e;
    border-color: #333;
  }

  .tab-button {
    background-color: #333;
    color: #fff;
  }

  .tab-button.active {
    background-color: #555;
  }

  input, textarea, canvas {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #444;
  }

  .primary-btn {
    background-color: #0078d4;
    color: white;
  }

  .secondary-btn {
    background-color: #333;
    color: #eee;
  }

  .error {
    color: #ff6b6b;
  }
}
