/* Wallpaper Workshop - Modern Design */

/* Page Container */
.wallpaper-workshop {
  min-height: 100vh;
  background: var(--bg);
  padding: 0;
}

/* Stage Top */
.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-bottom: 12px;
}

/* Hero Section */
.hero {
  padding: 60px 40px 40px;
  text-align: center;
  color: white;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero h1 .icon {
  display: inline-block;
  margin-right: 12px;
  font-size: 36px;
}

.hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Preview Stage */
.stage {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 40px;
}

.stage-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.3);
  border: 3px solid rgba(255,255,255,0.2);
}

.stage-frame canvas {
  width: 100%;
  height: 400px;
  display: block;
}

.stage-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stage-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.stage-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

.stage-clock {
  font-size: 48px;
  font-weight: 200;
  color: white;
  opacity: 0.9;
}

.stage-actions {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  gap: 12px;
}

.stage-actions .button-link,
.stage-actions button {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: white;
  backdrop-filter: blur(10px);
}

.stage-actions .button-link:hover,
.stage-actions button:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

.stage-actions .primary {
  background: var(--accent);
  border-color: transparent;
}

.stage-actions .primary:hover {
  background: var(--accent-hover);
}

/* File Input */
.file-input {
  display: none;
}

/* Filter Tabs */
.theme-filters {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 40px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-filters button {
  padding: 10px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: white;
  backdrop-filter: blur(10px);
}

.theme-filters button:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

.theme-filters button.active {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

/* Gallery Grid */
.gallery {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.gallery-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  border: 3px solid transparent;
  background: rgba(0,0,0,0.3);
}

.gallery-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.5);
}

.gallery-card canvas {
  width: 100%;
  height: 200px;
  display: block;
}

.gallery-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
  color: white;
  font-weight: 600;
  font-size: 16px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Preview Modal */
.preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.preview-modal.open,
.preview-modal.visible {
  display: flex;
}

.preview-inner {
  position: relative;
  max-width: 1200px;
  width: 100%;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(20px);
}

.preview-inner canvas {
  width: 100%;
  height: 600px;
  display: block;
}

.preview-title {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 32px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.clock-display {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 64px;
  font-weight: 200;
  color: white;
  opacity: 0.9;
}

.preview-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.preview-close:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
  transform: rotate(90deg);
}

.preview-toolbar {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.preview-toolbar button {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s ease;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: white;
  backdrop-filter: blur(10px);
}

.preview-toolbar button:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

.preview-toolbar .apply-btn {
  background: var(--accent);
  border-color: transparent;
}

.preview-toolbar .apply-btn:hover {
  background: var(--accent-hover);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 24px;
  background: var(--bg-elevated);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  font-weight: 600;
  color: var(--text);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 40px 20px 30px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .stage {
    padding: 0 20px;
  }

  .stage-frame canvas {
    height: 250px;
  }

  .stage-title {
    font-size: 20px;
  }

  .stage-clock {
    font-size: 32px;
  }

  .stage-actions {
    bottom: 16px;
    right: 16px;
  }

  .stage-actions .button-link,
  .stage-actions button {
    padding: 10px 18px;
    font-size: 13px;
  }

  .theme-filters {
    padding: 0 20px;
  }

  .theme-filters button {
    padding: 8px 18px;
    font-size: 13px;
  }

  .gallery {
    padding: 0 20px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-card canvas {
    height: 180px;
  }

  .preview-modal {
    padding: 20px;
  }

  .preview-inner canvas {
    height: 300px;
  }

  .preview-title {
    font-size: 20px;
  }

  .clock-display {
    font-size: 40px;
  }

  .preview-toolbar {
    flex-direction: column;
  }

  .preview-toolbar button {
    width: 100%;
  }
}

:root[data-theme="dark"] .theme-filters button.active {
  background: var(--ios-surface-solid);
  color: var(--ios-accent);
  border-color: var(--ios-border-strong);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"] .preview-inner {
  background: rgba(17, 24, 39, 0.82);
  border-color: rgba(148, 163, 184, 0.24);
}

:root[data-theme="dark"] .toast {
  background: var(--ios-surface-solid);
  border: 1px solid var(--ios-border);
  color: var(--ios-text);
}
