* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #e0e0e0;
  padding: 20px;
  min-height: 100vh;
}

main {
  max-width: 700px;
  margin: 0 auto;
}

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

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #fff;
}

header p {
  font-size: 1.1rem;
  color: #b0b0b0;
}

.upload-section {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
}

input[type='file'],
input[type='number'],
input[type='text'] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: #e0e0e0;
  font-size: 1rem;
}

input[type='file']::file-selector-button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  margin-right: 10px;
}

input[type='file']::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.instructions {
  background: rgba(102, 126, 234, 0.1);
  border-left: 3px solid rgba(102, 126, 234, 0.5);
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #c0c0c0;
}

.options {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #b0b0b0;
}

select {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: #e0e0e0;
  font-size: 0.95rem;
  cursor: pointer;
}

select option {
  background: #2d2d2d;
  color: #e0e0e0;
}

button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

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

.status {
  text-align: center;
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
  min-height: 1.5rem;
}

.status:empty {
  display: none;
}

.image-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.image-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.preview-image {
  width: 100%;
  height: auto;
  display: block;
  background: rgba(0, 0, 0, 0.3);
}

.download-image-btn {
  padding: 10px;
  margin: 10px;
  font-size: 0.95rem;
  width: calc(100% - 20px);
}

.info-box {
  background: rgba(102, 126, 234, 0.1);
  border-left: 4px solid rgba(102, 126, 234, 0.5);
  padding: 20px;
  margin: 30px 0;
  border-radius: 4px;
}

.info-box h3 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.info-box ul {
  list-style: none;
  padding-left: 0;
}

.info-box li {
  padding: 8px 0;
  line-height: 1.6;
  color: #c0c0c0;
}

.related-tools {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-tools h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #fff;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.tool-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

.tool-card .name {
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.tool-card .desc {
  font-size: 0.9rem;
  color: #a0a0a0;
  line-height: 1.4;
}
