body {
  font-family: Arial, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: linear-gradient(135deg, #ff6b6b, #d62322);
  min-height: 100vh;
}

.container {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

h1 {
  color: #d62322;
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.input-group {
  margin-bottom: 20px;
  background: #f8f8f8;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #eee;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

input[type="text"], textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

input[type="text"]:focus, textarea:focus {
  border-color: #d62322;
  outline: none;
}

textarea {
  height: 100px;
  resize: vertical;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

button {
  background: #d62322;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

button:hover {
  background: #b51d1c;
  transform: translateY(-2px);
}

button.secondary {
  background: #4CAF50;
}

button.secondary:hover {
  background: #45a049;
}

.loading {
  display: none;
  text-align: center;
  margin: 20px 0;
  color: #d62322;
  font-weight: bold;
}

.loading.active {
  display: block;
}

.generated-content {
  margin-top: 30px;
  text-align: center;
}

.generated-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 25px rgba(0,0,0,0.2);
}

.card-info {
  margin-top: 20px;
  padding: 15px;
  background: #f8f8f8;
  border-radius: 8px;
  text-align: left;
}

.card-info h3 {
  color: #d62322;
  margin: 0 0 10px 0;
}

.card-info p {
  margin: 5px 0;
  color: #333;
}

.community-cards {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.community-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.community-card img {
  width: 100%;
  border-radius: 8px;
}

.view-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 15px;
}

.view-toggle button {
  padding: 12px 30px;
  font-size: 18px;
  background: #333;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.2s;
}

.view-toggle button.active {
  opacity: 1;
  transform: scale(1.05);
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.community-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.community-header h2 {
  color: #d62322;
  margin: 0;
}

.sort-select {
  padding: 8px;
  border-radius: 5px;
  border: 2px solid #ddd;
  background: white;
  color: #333;
  font-weight: bold;
}

.style-selector {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.style-option {
  flex: 1;
  cursor: pointer;
}

.style-option input[type="radio"] {
  display: none;
}

.style-preview {
  border: 3px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s;
}

.style-option input[type="radio"]:checked + .style-preview {
  border-color: #d62322;
  background: #fff5f5;
}

.style-preview span {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  color: #333;
}

.style-preview small {
  display: block;
  color: #666;
  margin-top: 5px;
}

.complex-preview {
  width: 100px;
  height: 140px;
  margin: 0 auto;
  background: linear-gradient(45deg, #ff6b6b, #d62322);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 24px;
}

.delete-project {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ff4444;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: none; 
}

.delete-project:hover {
  background: #cc0000;
}

.generate-rules-btn {
  background: #4CAF50;
  margin-bottom: 10px;
  width: 100%;
}

.generate-rules-btn:hover {
  background: #45a049;
}