/* ===========================================
   OLYMPUS RISING - Character Customization CSS
   Styling for character creator and 3D viewer
   =========================================== */

/* ═══════════════════════════════════════════════════════════════════════════════
   CUSTOMIZATION CONTAINER
   ═══════════════════════════════════════════════════════════════════════════════ */

.customization-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  background: linear-gradient(180deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a1a 100%);
}

.customization-header {
  text-align: center;
  margin-bottom: 30px;
}

.customization-header h2 {
  font-size: 2.5rem;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  margin-bottom: 10px;
}

.customization-header .subtitle {
  color: #a0a0c0;
  font-style: italic;
  font-size: 1.1rem;
}

.customization-content {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   3D PREVIEW PANEL
   ═══════════════════════════════════════════════════════════════════════════════ */

.preview-panel {
  background: linear-gradient(135deg, #1e1e3a 0%, #0d0d1a 100%);
  border: 2px solid #3a3a5a;
  border-radius: 20px;
  overflow: hidden;
  position: sticky;
  top: 20px;
}

.character-preview-3d {
  width: 100%;
  height: 500px;
  position: relative;
  background: radial-gradient(ellipse at center, #2a2a4a 0%, #0a0a1a 100%);
}

.character-preview-3d canvas {
  width: 100% !important;
  height: 100% !important;
}

.preview-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid #3a3a5a;
}

.preview-controls .btn {
  width: 45px;
  height: 45px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 50%;
  background: #2a2a4a;
  border: 2px solid #3a3a5a;
  transition: all 0.2s;
}

.preview-controls .btn:hover {
  background: #3a3a5a;
  border-color: #6366f1;
  transform: scale(1.1);
}

.preview-controls .btn.active {
  background: #6366f1;
  border-color: #818cf8;
}

.preview-name {
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.3);
}

.preview-name input {
  width: 100%;
  padding: 12px 15px;
  font-size: 1.2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #3a3a5a;
  border-radius: 10px;
  color: #ffd700;
  font-family: 'Cinzel', serif;
  transition: all 0.2s;
}

.preview-name input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.preview-name input::placeholder {
  color: #666;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   OPTIONS PANEL
   ═══════════════════════════════════════════════════════════════════════════════ */

.options-panel {
  background: linear-gradient(135deg, #1e1e3a 0%, #0d0d1a 100%);
  border: 2px solid #3a3a5a;
  border-radius: 20px;
  overflow: hidden;
}

.section-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid #3a3a5a;
  overflow-x: auto;
}

.section-tab {
  flex: 1;
  min-width: 120px;
  padding: 15px 20px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.section-tab:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
}

.section-tab.active {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.3) 0%, transparent 100%);
  color: #ffd700;
  border-bottom: 3px solid #ffd700;
}

.section-content {
  padding: 20px;
  max-height: 600px;
  overflow-y: auto;
}

.section-description {
  color: #a0a0c0;
  margin-bottom: 20px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   APPEARANCE OPTIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

.option-group {
  margin-bottom: 25px;
}

.option-label {
  display: block;
  color: #ffd700;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-buttons.horizontal-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 5px;
}

.option-btn {
  padding: 10px 18px;
  background: #2a2a4a;
  border: 2px solid #3a3a5a;
  border-radius: 10px;
  color: #a0a0c0;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.option-btn:hover {
  background: #3a3a5a;
  border-color: #6366f1;
  color: #fff;
}

.option-btn.selected {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #818cf8;
  color: #fff;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.option-btn .option-icon {
  font-size: 1.5rem;
}

.option-btn .option-name {
  font-size: 0.85rem;
}

.option-btn.small {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

/* Color Swatches */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.15);
  border-color: #fff;
}

.color-swatch.selected {
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.color-swatch.selected::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 0 0 3px #000;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DIVINE LINEAGE CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */

.lineage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.lineage-card {
  background: #2a2a4a;
  border: 2px solid #3a3a5a;
  border-radius: 15px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 15px;
}

.lineage-card:hover {
  border-color: #6366f1;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lineage-card.selected {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, #2a2a4a 100%);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.lineage-icon {
  font-size: 3rem;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  flex-shrink: 0;
}

.lineage-info {
  flex: 1;
}

.lineage-name {
  font-size: 1.2rem;
  color: #ffd700;
  font-weight: 600;
}

.lineage-title {
  font-size: 0.85rem;
  color: #a855f7;
  margin-bottom: 8px;
  font-style: italic;
}

.lineage-desc {
  font-size: 0.85rem;
  color: #a0a0c0;
  margin-bottom: 10px;
  line-height: 1.4;
}

.lineage-bonuses {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.bonus-tag {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.lineage-ability {
  font-size: 0.8rem;
  color: #888;
}

.lineage-ability strong {
  color: #6366f1;
  text-transform: capitalize;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ORIGIN CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */

.origin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.origin-card {
  background: #2a2a4a;
  border: 2px solid #3a3a5a;
  border-radius: 15px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 15px;
}

.origin-card:hover {
  border-color: #6366f1;
  transform: translateY(-3px);
}

.origin-card.selected {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, #2a2a4a 100%);
}

.origin-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  flex-shrink: 0;
}

.origin-info {
  flex: 1;
}

.origin-name {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 5px;
}

.origin-desc {
  font-size: 0.85rem;
  color: #a0a0c0;
  margin-bottom: 10px;
  line-height: 1.4;
}

.origin-bonuses {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CLASS/ARCHETYPE CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.class-card {
  background: #2a2a4a;
  border: 2px solid #3a3a5a;
  border-radius: 15px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 15px;
}

.class-card:hover {
  border-color: #6366f1;
  transform: translateY(-3px);
}

.class-card.selected {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, #2a2a4a 100%);
}

.class-icon {
  font-size: 3rem;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  flex-shrink: 0;
}

.class-info {
  flex: 1;
}

.class-name {
  font-size: 1.2rem;
  color: #fff;
  font-weight: 600;
}

.class-role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin: 5px 0;
}

.class-role.role-tank { background: #3b82f6; color: #fff; }
.class-role.role-dps { background: #ef4444; color: #fff; }
.class-role.role-support { background: #22c55e; color: #fff; }
.class-role.role-balanced { background: #a855f7; color: #fff; }
.class-role.role-hybrid { background: #f59e0b; color: #fff; }

.class-desc {
  font-size: 0.85rem;
  color: #a0a0c0;
  margin-bottom: 10px;
  line-height: 1.4;
}

.class-stats {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
}

.stat-bar .stat-name {
  width: 60px;
  color: #888;
  text-transform: capitalize;
}

.stat-bar .stat-fill {
  flex: 1;
  height: 6px;
  background: #3a3a5a;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.stat-bar .stat-fill::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 3px;
}

.stat-bar .stat-val {
  width: 25px;
  text-align: right;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */

.customization-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
}

.customization-actions .btn-large {
  padding: 15px 40px;
  font-size: 1.2rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   GEAR PREVIEW (Equipment Screen)
   ═══════════════════════════════════════════════════════════════════════════════ */

.view-toggle {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 15px;
}

.view-toggle .view-btn {
  padding: 8px 20px;
  background: #2a2a4a;
  border: 2px solid #3a3a5a;
  border-radius: 8px;
  color: #a0a0c0;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.view-toggle .view-btn:hover {
  background: #3a3a5a;
  color: #fff;
}

.view-toggle .view-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #818cf8;
  color: #fff;
}

.gear-preview-panel {
  background: linear-gradient(135deg, #1a1a2e 0%, #0d0d1a 100%);
  border: 2px solid #3a3a5a;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 15px;
}

.gear-preview-3d {
  width: 100%;
  height: 400px;
  position: relative;
  background: radial-gradient(ellipse at center, #252540 0%, #0d0d1a 100%);
}

.gear-preview-3d canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.gear-preview-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid #3a3a5a;
}

.preview-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border-radius: 50%;
  background: #2a2a4a;
  border: 2px solid #3a3a5a;
  color: #a0a0c0;
  cursor: pointer;
  transition: all 0.2s;
}

.preview-btn:hover {
  background: #3a3a5a;
  border-color: #6366f1;
  color: #fff;
  transform: scale(1.1);
}

.preview-btn.active {
  background: #6366f1;
  border-color: #818cf8;
  color: #fff;
}

.rotate-btn.active {
  animation: spin-slow 3s linear infinite;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gear-preview-container {
  position: relative;
  background: linear-gradient(135deg, #1e1e3a 0%, #0d0d1a 100%);
  border: 2px solid #3a3a5a;
  border-radius: 15px;
  overflow: hidden;
}

/* Equipment slot highlights */
.slot-highlight {
  position: absolute;
  pointer-events: none;
  border: 2px solid #ffd700;
  border-radius: 50%;
  animation: slot-pulse 1s ease-in-out infinite;
}

@keyframes slot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .customization-content {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
    max-width: 500px;
    margin: 0 auto;
  }

  .character-preview-3d {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .customization-header h2 {
    font-size: 1.8rem;
  }

  .section-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .section-tab {
    min-width: 100px;
    padding: 12px 15px;
    font-size: 0.85rem;
  }

  .lineage-grid,
  .origin-grid,
  .class-grid {
    grid-template-columns: 1fr;
  }

  .customization-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .customization-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .character-preview-3d {
    height: 350px;
  }

  .preview-controls .btn {
    width: 40px;
    height: 40px;
  }

  .option-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ═══════════════════════════════════════════════════════════════════════════════ */

.section-content::-webkit-scrollbar {
  width: 8px;
}

.section-content::-webkit-scrollbar-track {
  background: #1a1a2e;
  border-radius: 4px;
}

.section-content::-webkit-scrollbar-thumb {
  background: #3a3a5a;
  border-radius: 4px;
}

.section-content::-webkit-scrollbar-thumb:hover {
  background: #4a4a6a;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

@keyframes card-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.5); }
}

.lineage-card.selected,
.origin-card.selected,
.class-card.selected {
  animation: card-glow 2s ease-in-out infinite;
}
