* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #FCFCFC;
  padding: 32px;
  color: #282828;
}

.container { max-width: 1800px; margin: 0 auto; }

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8e8e8;
}

h1 { margin: 0; color: #282828; font-size: 28px; font-weight: 700; }

.logout-btn {
  padding: 10px 24px;
  background: #282828;
  color: #FCFCFC;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-btn:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 40, 40, 0.15);
}

.logout-btn:active {
  transform: translateY(0);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid #e8e8e8;
  overflow-x: auto;
}

.tab {
  padding: 14px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #888;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}

.tab:hover { 
  color: white;
  background: #282828;
}

.tab.active {
  color: #FCFCFC;
  background: #282828;
  border-bottom-color: #282828;
  border-radius: 6px 6px 0 0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Forms */
.upload-section {
  background: white;
  padding: 36px;
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #282828;
  font-size: 14px;
}

label .required {
  color: #d32f2f;
}

input, select, textarea {
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  font-family: inherit;
  background: #FCFCFC;
  color: #282828;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #282828;
  background: white;
  box-shadow: 0 0 0 3px rgba(40, 40, 40, 0.05);
}

.file-upload {
  border: 2px dashed #282828;
  padding: 40px;
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}

.file-upload:hover {
  background: white;
  border-color: #282828;
}

.file-upload input {
  display: none;
}

.file-upload-label {
  font-size: 15px;
  font-weight: 600;
  color: #282828;
  display: block;
  margin-bottom: 8px;
}

.file-upload-hint {
  color: #888;
  font-size: 13px;
}

.image-preview {
  max-width: 300px;
  max-height: 300px;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
  border: 1px solid #e0e0e0;
}

.image-preview.visible {
  display: block;
}

#editPackCoverPreview {
  max-width: 400px;
  max-height: 400px;
}

.file-name {
  margin-top: 12px;
  color: #2e7d32;
  font-weight: 600;
}

button {
  padding: 12px 24px;
  background: #282828;
  color: #FCFCFC;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(40, 40, 40, 0.15);
}

button:disabled {
  background: #d0d0d0;
  cursor: not-allowed;
  transform: none;
}

button.secondary {
  background: #888;
}

button.secondary:hover {
  background: #666;
}

/* Lists */
.items-list {
  background: white;
  padding: 36px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
}

.item {
  padding: 24px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.item:last-child { border-bottom: none; }

.ad-item {
  padding: 24px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ad-item:last-child { border-bottom: none; }

.ad-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-radius: 12px;
  min-height: 200px;
  overflow: hidden;
  position: relative;
}

.ad-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.ad-headline {
  font-size: clamp(18px, 5vw, 32px);
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.ad-description {
  font-size: clamp(14px, 3vw, 18px);
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
  max-width: 600px;
}

.ad-image-container {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.ad-image-preview {
  max-width: 200px;
  max-height: 200px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
  border: 1px solid #e0e0e0;
}

.ad-image-preview.visible {
  display: block;
}

/* Form preview */
.ad-form-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-radius: 12px;
  min-height: 300px;
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
  border: 2px solid #e8e8e8;
  background-color: #282828;
  width: 100%;
}

.ad-form-preview .ad-content {
  flex: 1;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ad-form-preview .ad-headline {
  font-size: clamp(24px, 6vw, 48px);
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.ad-form-preview .ad-description {
  font-size: clamp(16px, 3.5vw, 22px);
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
  max-width: 600px;
}

.ad-cta-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background: rgba(255,255,255,0.2);
  border: 2px solid currentColor;
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ad-cta-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.ad-preview .ad-cta-btn {
  border: none;
  background: rgba(255,255,255,0.25);
}

/* Responsive ads */
@media (max-width: 800px) {
  .ad-preview {
    flex-direction: column;
    text-align: center;
    min-height: auto;
  }
  
  .ad-preview .ad-content,
  .ad-form-preview .ad-content {
    text-align: center;
    width: 100%;
  }
  
  .ad-image-container {
    width: 100px;
    height: 100px;
  }
  
  .ad-description {
    max-width: 100%;
  }

  .ad-form-preview {
    flex-direction: column;
    text-align: center;
    min-height: auto;
  }
}

.item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.item-info {
  flex: 1;
}

.item-info h3 { margin-bottom: 8px; color: #282828; font-weight: 600; }
.item-meta { color: #888; font-size: 14px; }
.item-meta span { margin-right: 15px; }

.item-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
}

.badge.free { background: #e8f5e9; color: #2e7d32; }
.badge.premium { background: #f3e5f5; color: #6a1b9a; }
.badge.loop { background: #e3f2fd; color: #1565c0; }
.badge.drums_loops { background: #fce4ec; color: #c2185b; }
.badge.drums_oneshot { background: #fff3e0; color: #e65100; }
.badge.instruments_oneshot { background: #f3e5f5; color: #7b1fa2; }

.delete-btn {
  background: #d32f2f;
  padding: 8px 16px;
  font-size: 13px;
}

.delete-btn:hover { background: #b71c1c; }

.download-btn {
  background: #2e7d32;
  padding: 8px 16px;
  font-size: 13px;
}

.download-btn:hover { background: #1b5e20; }

.edit-btn {
  background: #f57f17;
  padding: 8px 16px;
  font-size: 13px;
}

.edit-btn:hover { background: #e65100; }

.preset-btn {
  background: #2196F3;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background: #1976D2;
  transform: translateY(-1px);
}

.preset-btn:active {
  transform: translateY(0);
}

.status {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
  border-left: 4px solid;
}

.status.success { background: #f1f8f4; color: #2e7d32; border-left-color: #2e7d32; display: block; }
.status.error { background: #fef5f5; color: #c62828; border-left-color: #c62828; display: block; }

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loop-selector {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 10px;
}

.loop-option {
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.loop-option:hover {
  background: #fafafa;
  border-color: #282828;
}

.loop-option input {
  margin-right: 10px;
}

/* Stats for VST tab */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  padding: 28px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: #282828;
  margin-bottom: 8px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 36px;
  border-radius: 12px;
  max-width: 1200px;
  width: 80%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* Collapsible panel styles */
.collapsible-panel {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  margin-bottom: 12px;
  background: white;
  overflow: hidden;
}

.collapsible-panel-header {
  padding: 16px 20px;
  background: #fafafa;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  border-bottom: 1px solid #e8e8e8;
}

.collapsible-panel-header:hover {
  background: #f5f5f5;
}

.collapsible-panel-header.active {
  background: #f5f5f5;
  border-bottom-color: #282828;
}

.collapsible-panel-title {
  font-weight: 600;
  color: #282828;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.collapsible-panel-toggle {
  font-size: 20px;
  color: #282828;
  transition: transform 0.3s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collapsible-panel-toggle:hover {
  background: rgba(40, 40, 40, 0.05);
  border-radius: 4px;
}

.collapsible-panel-header.active .collapsible-panel-toggle {
  transform: rotate(180deg);
}

.collapsible-panel-header[role="button"]:focus {
  outline: 2px solid #282828;
  outline-offset: 2px;
}

.collapsible-panel-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.collapsible-panel-content.expanded {
  max-height: 5000px;
  transition: max-height 0.5s ease-in;
}

.collapsible-panel-body {
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
}

.modal-header h2 {
  margin: 0;
  color: #282828;
  font-size: 22px;
}

.close-modal {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #888;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-modal:hover {
  color: #d32f2f;
  transform: scale(1.1);
}

.loop-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.loop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}

.loop-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.loop-item-info span {
  font-size: 14px;
  color: #888;
}

.remove-loop-btn {
  padding: 6px 12px;
  background: #d32f2f;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.remove-loop-btn:hover {
  background: #b71c1c;
}

.checkbox-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  background: #fafafa;
  border-radius: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #e8e8e8;
}

.checkbox-item:hover {
  background: #fcfcfc;
}

.checkbox-item input[type="checkbox"] {
  cursor: pointer;
}

.checkbox-item label {
  cursor: pointer;
  font-size: 14px;
  margin: 0;
  font-weight: normal;
}

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 24px;
  background: #4caf50;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 2000;
  animation: slideIn 0.3s ease;
}

.toast.error {
  background: #f44336;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
 }   

.stat-label {
  color: #666;
  font-size: 14px;
  font-weight: 600;
}

/* Tag System Styles */
.tag-container {
  margin-top: 8px;
  margin-bottom: 8px;
}

.tag-input-wrapper {
  position: relative;
  margin-bottom: 8px;
}

.tag-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  background: #FCFCFC;
  color: #282828;
}

.tag-input:focus {
  outline: none;
  border-color: #282828;
  background: white;
  box-shadow: 0 0 0 3px rgba(40, 40, 40, 0.05);
}

.tag-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tag-autocomplete.show {
  display: block;
}

.tag-autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #f0f0f0;
  color: #282828;
}

.tag-autocomplete-item:hover {
  background: #fafafa;
}

.tag-autocomplete-item:last-child {
  border-bottom: none;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #282828;
  color: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.tag-chip.genre {
  background: #282828;
}

.tag-chip.content {
  background: #2e7d32;
}

.tag-chip.pack {
  background: #f57f17;
}

.tag-chip-remove {
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.tag-chip-remove:hover {
  opacity: 1;
}

.tag-limit {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.tag-limit.warning {
  color: #ff9800;
}

.tag-limit.error {
  color: #f44336;
}

/* BPM Input with buttons */
.bpm-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bpm-input-wrapper input {
  flex: 1;
}

.bpm-btn {
  padding: 8px 12px;
  background: #282828;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  min-width: 40px;
  transition: background 0.2s;
}

.bpm-btn:hover {
  background: #1a1a1a;
}

.bpm-btn:active {
  background: #0a0a0a;
}

/* Radio buttons for credits */
.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.radio-option label {
  margin: 0;
  cursor: pointer;
  font-weight: normal;
}

/* License selector */
.license-custom-input {
  margin-top: 8px;
  display: none;
}

.license-custom-input.show {
  display: block;
}

/* Keywords input */
.keywords-input {
  width: 100%;
}

.keywords-hint {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}
