* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
  margin: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

@media (min-width: 768px) {
  body {
    padding: 2rem;
  }
}

h1 {
  margin-bottom: 0.5rem;
  text-align: center;
  color: #ff0000;
}

p {
  max-width: 600px;
  text-align: center;
  margin: 0 auto 2rem auto;
  color: #b0b0b0;
}

.container {
  background: #0a0a0a;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
  border: 1px solid #2a2a2a;
  max-width: 800px;
  width: 100%;
}

@media (min-width: 768px) {
  .container {
    padding: 2rem;
  }
}

#drop-zone {
  border: 3px dashed #444;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  margin-bottom: 1rem;
  background: #1a1a1a;
}

#drop-zone.dragover {
  border-color: #ff0000;
  background: #2a0a0a;
}

#files-list {
  margin: 1.5rem 0;
}

.file-item {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.file-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.file-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.file-info {
  flex: 1;
  min-width: 150px;
}

.file-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.file-size {
  font-size: 0.85rem;
  color: #888;
}

.file-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.file-controls input {
  padding: 0.5rem;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 0.9rem;
  flex: 1;
  min-width: 150px;
  background: #0a0a0a;
  color: #e0e0e0;
}

.file-controls select {
  padding: 0.5rem;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 0.9rem;
  background: #0a0a0a;
  color: #e0e0e0;
}

.file-controls button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.file-controls .remove-btn {
  background: #cc0000;
  padding: 0.5rem 0.75rem;
}

.file-controls .remove-btn:hover:not(:disabled) {
  background: #ff0000;
}

.status {
  font-size: 0.85rem;
  color: #ff0000;
  margin-top: 0.5rem;
}

.button-container {
  text-align: center;
}

button {
  background: #ff0000;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

button:hover:not(:disabled) {
  background: #cc0000;
}

button:disabled {
  background: #444;
  cursor: not-allowed;
}

button.secondary {
  background: #333;
}

button.secondary:hover:not(:disabled) {
  background: #555;
}

#action-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #666;
}

.info-button {
  background: #ff0000;
  border: 1px solid #ff0000;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}

.info-button:hover {
  background: #cc0000;
  transform: translateY(-2px);
}

.title-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.title-section h1 {
  margin: 0;
}

.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: #0a0a0a;
  border: 2px solid #ff0000;
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.5);
}

.modal-content h2 {
  color: #ff0000;
  margin-top: 0;
  text-align: center;
}

.modal-content h3 {
  color: #ff0000;
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.modal-content ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0;
}

.modal-content ol li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #2a2a2a;
}

.modal-content ol li:last-child {
  border-bottom: none;
}

.modal-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-content li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #2a2a2a;
}

.modal-content li:last-child {
  border-bottom: none;
}

.format-section {
  margin-bottom: 1rem;
}

.close {
  color: #ff0000;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover {
  color: #cc0000;
}

@media (max-width: 768px) {
  .modal-content {
    padding: 1.5rem;
  }
  
  .close {
    top: 0.5rem;
    right: 1rem;
  }
}
