/* ==========================================================
   WHALE OS 2.0 — 3D Icon Library System
   High-DPI 3D Rendered Assets • Precision Sizing • Micro-Motion
   ========================================================== */

.icon-3d {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
  will-change: transform;
}

/* Sizing Scale */
.icon-3d-xs {
  width: 16px;
  height: 16px;
}

.icon-3d-sm {
  width: 22px;
  height: 22px;
}

.icon-3d-md {
  width: 32px;
  height: 32px;
}

.icon-3d-lg {
  width: 44px;
  height: 44px;
}

.icon-3d-xl {
  width: 60px;
  height: 60px;
}

.icon-3d-hero {
  width: 80px;
  height: 80px;
}

/* Icon Frame / Badge Container */
.icon-3d-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-3d-badge.sm {
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 10px;
}

.icon-3d-badge.md {
  width: 48px;
  height: 48px;
  padding: 8px;
  border-radius: 12px;
}

.icon-3d-badge.lg {
  width: 64px;
  height: 64px;
  padding: 10px;
  border-radius: 16px;
}

.icon-3d-badge.hero {
  width: 96px;
  height: 96px;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface-wash);
}

/* Micro-Interactions on Parent Hover */
.card:hover .icon-3d,
.card-tool:hover .icon-3d,
.card-prompt:hover .icon-3d,
.card-knowledge:hover .icon-3d,
.card-feature:hover .icon-3d,
.bento-card:hover .icon-3d,
.icon-3d-interactive:hover .icon-3d,
.btn:hover .icon-3d {
  transform: translateY(-2px) scale(1.06);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
}

.card:hover .icon-3d-badge,
.card-tool:hover .icon-3d-badge,
.card-prompt:hover .icon-3d-badge,
.card-knowledge:hover .icon-3d-badge {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(20, 90, 255, 0.12);
}

/* Dark Mode Shadows */
[data-theme="dark"] .icon-3d,
body.dark-theme .icon-3d {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

[data-theme="dark"] .card:hover .icon-3d,
[data-theme="dark"] .card-tool:hover .icon-3d,
[data-theme="dark"] .card-prompt:hover .icon-3d,
[data-theme="dark"] .card-knowledge:hover .icon-3d,
body.dark-theme .card:hover .icon-3d,
body.dark-theme .card-tool:hover .icon-3d,
body.dark-theme .card-prompt:hover .icon-3d,
body.dark-theme .card-knowledge:hover .icon-3d {
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.7));
}

[data-theme="dark"] .icon-3d-badge,
body.dark-theme .icon-3d-badge {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .card:hover .icon-3d-badge,
body.dark-theme .card:hover .icon-3d-badge {
  background: var(--surface-hover);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}
