* {
  margin: 0;
  padding: 0;

}

body {
  background-color: #f1f2f3;

}

.container {
  box-sizing: border-box;
  max-width: 1600px;
  min-width: 1240px;
  width: 100%;
  margin: 20px auto;
  color: #333;

}

.container * {
    box-sizing: border-box;
}

header {
  margin-bottom: 20px;
  text-align: center;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subtitle {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 90%;
  margin: 0 auto;
  line-height: 1.6;
}

.main-content {
  display: flex;
  min-height: 600px;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.control-panel {
  width: 380px;
  background: #fff;
  padding: 20px;
  border-right: 1px solid #e9ecef;
}

.preview-area {
  flex: 1;
  padding: 20px;
  background: white;
}

.section {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.section-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2c3e50;
}

.upload-area {
  border: 2px dashed #adb5bd;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
  transition: all 0.3s;
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #4263eb;
  background: #edf2ff;
}

.upload-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
}

.upload-text {
  font-size: 1rem;
  margin-bottom: 25px;
  color: #495057;
}

.btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: #4263eb;
  color: white;
}

.btn-primary:hover {
  background: #364fc7;
}

.btn-secondary {
  background: #e9ecef;
  color: #495057;
}

.btn-secondary:hover {
  background: #dee2e6;
}

.btn-success {
  background: #37b24d;
  color: white;
}

.btn-success:hover {
  background: #2f9e44;
}

.btn-danger {
  background: #f03e3e;
  color: white;
}

.btn-danger:hover {
  background: #e03131;
}

.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #495057;
}

input[type="number"],
input[type="color"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
}

input[type="color"] {
  min-height: 60px;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.files-list {
  margin-top: 20px;
  max-height: 200px;
  overflow-y: auto;
}

.file-item {
  padding: 10px 15px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.remove-file {
  color: #f03e3e;
  cursor: pointer;
  font-size: 1.2rem;
}

.preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.preview-item {
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.preview-header {
  padding: 15px;
  background: #edf2ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #4263eb;
}

.preview-body {
  padding: 20px;
  text-align: center;
}

.preview-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-footer {
  padding: 15px;
  display: flex;
  justify-content: center;
  border-top: 1px solid #e9ecef;
}

.no-files {
  text-align: center;
  padding: 50px 20px;
  color: #868e96;
}

.no-files-icon {
  font-size: 5rem;
  margin-bottom: 20px;
  opacity: 0.3;
}

.no-files-text {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.action-buttons {
  width: 100%;
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.status-bar {
  padding: 15px;
  background: #e9f5ff;
  border-radius: 8px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-icon {
  font-size: 1.5rem;
}

.format-info {
  margin-top: 10px;
  padding: 15px;
  background: #fff9db;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #5c3c00;
}

.format-info strong {
  color: #e67700;
}

footer {
  text-align: center;
  margin-top: 20px;
  color: #6c757d;
  font-size: 0.95rem;
  width: 100%;
}
