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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #fff;
  padding: 24px 16px;
}

.container {
  max-width: 860px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 2.4em;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #4fc3f7, #81c784);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  text-align: center;
  color: #78909c;
  font-size: 0.95em;
  margin-bottom: 32px;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.3em;
  color: #4fc3f7;
  font-weight: 600;
}

/* --- Sections --- */
.section {
  background: rgba(255, 255, 255, 0.06);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Drop Zone --- */
.drop-zone {
  border: 2px dashed rgba(79, 195, 247, 0.4);
  border-radius: 12px;
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(79, 195, 247, 0.04);
}

.drop-zone:hover, .drop-zone.dragover {
  background: rgba(79, 195, 247, 0.12);
  border-color: #4fc3f7;
}

.drop-icon {
  font-size: 2.5em;
  margin-bottom: 12px;
  opacity: 0.7;
}

.drop-text {
  color: #b0bec5;
  font-size: 0.95em;
  line-height: 1.6;
}

.drop-text strong {
  color: #4fc3f7;
}

/* --- Preview --- */
.preview-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

#skinCanvas {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  max-width: 100%;
}

.preview-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.skin-name-input {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.95em;
  outline: none;
  width: 200px;
  transition: border-color 0.2s;
}

.skin-name-input:focus {
  border-color: #4fc3f7;
}

.skin-name-input::placeholder {
  color: #546e7a;
}

/* --- Buttons --- */
.btn {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #4fc3f7;
  color: #1a1a2e;
}

.btn-primary:hover {
  background: #29b6f6;
  box-shadow: 0 4px 12px rgba(79, 195, 247, 0.3);
}

.btn-secondary {
  background: #81c784;
  color: #1a1a2e;
}

.btn-secondary:hover {
  background: #66bb6a;
  box-shadow: 0 4px 12px rgba(129, 199, 132, 0.3);
}

.btn-danger {
  background: rgba(229, 115, 115, 0.15);
  color: #e57373;
  border: 1px solid rgba(229, 115, 115, 0.3);
}

.btn-danger:hover {
  background: rgba(229, 115, 115, 0.25);
}

/* --- Skins Grid --- */
.skins-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.empty-text {
  text-align: center;
  color: #546e7a;
  font-style: italic;
  grid-column: 1 / -1;
  padding: 32px 0;
}

.skin-item {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skin-item:hover {
  transform: translateY(-3px);
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(79, 195, 247, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.skin-thumb-wrapper {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skin-thumb-wrapper canvas {
  image-rendering: pixelated;
  border-radius: 4px;
}

.skin-name {
  font-size: 0.8em;
  margin-bottom: 12px;
  word-break: break-all;
  color: #b0bec5;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: auto;
}

.btn-small {
  padding: 5px 10px;
  font-size: 0.78em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.btn-small:active {
  transform: scale(0.95);
}

.btn-copy {
  background: rgba(79, 195, 247, 0.15);
  color: #4fc3f7;
}

.btn-copy:hover {
  background: rgba(79, 195, 247, 0.25);
}

.btn-view {
  background: rgba(255, 213, 79, 0.15);
  color: #ffd54f;
}

.btn-view:hover {
  background: rgba(255, 213, 79, 0.25);
}

.btn-small.btn-danger {
  padding: 5px 10px;
  font-size: 0.78em;
}

/* --- Notification --- */
.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  background: #81c784;
  color: #1a1a2e;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9em;
  animation: slideIn 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.notification.error {
  background: #e57373;
  color: #fff;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- Responsive --- */
@media (max-width: 480px) {
  h1 { font-size: 1.8em; }
  .section { padding: 16px; }
  .skins-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
