/* Global Styles */
:root {
  --primary: #4f46e5;
  --dark: #1e293b;
  --light: #f8fafc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f1f5f9;
  color: var(--dark);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tool-categories {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
}

.category-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  background: #e2e8f0;
  cursor: pointer;
}

.category-btn.active {
  background: var(--primary);
  color: white;
}

.tools-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.tool-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s;
}

.tool-card:hover {
  transform: translateY(-5px);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 100;
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 2rem;
  width: 80%;
  max-width: 700px;
  border-radius: 8px;
}

.tool-interface {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

textarea {
  width: 100%;
  min-height: 150px;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

button {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.output-container {
  padding: 1rem;
  border: 1px dashed #ccc;
  border-radius: 4px;
  min-height: 200px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tools-container {
    grid-template-columns: 1fr;
  }
}