/* ============================================
   CUBE / MAGIC ASSEMBLY THEME
   Pastel, clean, modern 3D cube building
   ============================================ */

/* --- Base hidden --- */
.cube-assembly { display: none; }

[data-theme="cube"] {
  --bg-dark: #F0F6FF;
  --bg-darker: #E8F4FD;
  --bg-panel: rgba(255, 255, 255, 0.9);
  --crt-bg: transparent;
  --border-panel: rgba(127, 219, 202, 0.15);

  --cyan: #7FDBCA;
  --red: #FF8A9B;
  --crimson: #FF6B7A;
  --gold: #FFE066;
  --green: #5EEDB8;
  --magenta: #FFB3C6;
  --orange: #FFD6A5;
  --purple: #C4B0FF;

  --text-primary: #3A3F5C;
  --text-secondary: #7A7F9C;
  --text-pixel: #7FDBCA;
  --speech-bg: rgba(255, 255, 255, 0.96);
  --speech-text: #3A3F5C;

  --hp-color: #5EEDB8;
  --mp-color: #7EB8E0;
  --exp-color: #FFE066;

  --font-pixel: 'Gmarket Sans', 'Pretendard', sans-serif;
  --font-body: 'Gmarket Sans', 'Pretendard', sans-serif;

  --pixel-size: 0;
  --panel-radius: 16px;
}

/* --- Body --- */
[data-theme="cube"] body,
body[data-theme="cube"] {
  background: linear-gradient(170deg, #F0F6FF 0%, #E8F4FD 30%, #FFF8E1 70%, #F0F6FF 100%);
  background-image: none;
  color: #3A3F5C;
}

body[data-theme="cube"]::before { content: none; }

[data-theme="cube"] .scanline-overlay { display: none; }

/* --- Float button (light theme adaptations) --- */
[data-theme="cube"] .float-btn {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}
[data-theme="cube"] .float-cube {
  border-color: rgba(127, 219, 202, 0.5);
  color: #5AAAA0;
}
[data-theme="cube"] .float-retro {
  border-color: rgba(0, 170, 210, 0.4);
  color: #0099BB;
}
[data-theme="cube"] .float-ai3 {
  border-color: rgba(0, 180, 50, 0.4);
  color: #00A030;
}
[data-theme="cube"] .float-korea {
  border-color: rgba(194, 59, 34, 0.4);
  color: #C23B22;
}
[data-theme="cube"] .float-btn.active {
  border-color: #7FDBCA;
  color: #5AAAA0;
  box-shadow: 0 0 16px rgba(127, 219, 202, 0.3);
  background: rgba(127, 219, 202, 0.15);
}

/* ============================================
   HERO — CUBE ASSEMBLY
   ============================================ */

[data-theme="cube"] #title-screen.section {
  padding: 0;
  min-height: 100vh;
  max-width: none;
  margin: 0;
}

[data-theme="cube"] .crt-frame {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: 100vh;
}

[data-theme="cube"] .crt-frame::before,
[data-theme="cube"] .crt-frame::after { content: none; }

[data-theme="cube"] .crt-screen {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: none;
  width: 100%;
  border-radius: 0;
}

[data-theme="cube"] .crt-screen::before,
[data-theme="cube"] .crt-screen::after { content: none; }

[data-theme="cube"] .crt-content { display: none; }

[data-theme="cube"] .cube-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(170deg, #F0F6FF 0%, #E8F4FD 30%, #FFF8E1 70%, #F0F6FF 100%);
}

/* --- Particles --- */
.cube-particles {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

.cube-particle {
  position: absolute;
  border-radius: 50%;
  animation: cube-float-p linear infinite;
}

.cube-particle.tri {
  width: 0 !important; height: 0 !important;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid;
  background: none !important;
  border-radius: 0;
}

.cube-particle.sq { border-radius: 3px; }

@keyframes cube-float-p {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-25px) rotate(180deg); }
  100% { transform: translateY(0) rotate(360deg); }
}

/* --- Structure --- */
.cube-structure-wrap {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cube-structure {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.15s ease-out;
}

.cube-structure-inner {
  transform-style: preserve-3d;
  transform: rotateX(-25deg) rotateY(45deg);
  animation: cube-gentle-rotate 8s ease-in-out infinite;
  transition: transform 0.6s ease;
}

.cube-structure-inner.complete-spin {
  animation: cube-victory-spin 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes cube-gentle-rotate {
  0%, 100% { transform: rotateX(-25deg) rotateY(45deg); }
  50%      { transform: rotateX(-25deg) rotateY(48deg); }
}

@keyframes cube-victory-spin {
  0%   { transform: rotateX(-25deg) rotateY(45deg); }
  50%  { transform: rotateX(-20deg) rotateY(225deg) scale(1.05); }
  100% { transform: rotateX(-25deg) rotateY(405deg) scale(1); }
}

/* --- Grid --- */
.cube-grid {
  --cube-size: 128px;
  --half: 64px;
  transform-style: preserve-3d;
  position: relative;
  width: 572px;
  height: 429px;
}

.cube-cell {
  position: absolute;
  transform-style: preserve-3d;
}

.cube-cell[data-col="0"][data-row="0"] { left: 0;     top: 0; }
.cube-cell[data-col="1"][data-row="0"] { left: 143px; top: 0; }
.cube-cell[data-col="2"][data-row="0"] { left: 286px; top: 0; }
.cube-cell[data-col="3"][data-row="0"] { left: 429px; top: 0; }
.cube-cell[data-col="0"][data-row="1"] { left: 0;     top: 143px; }
.cube-cell[data-col="1"][data-row="1"] { left: 143px; top: 143px; }
.cube-cell[data-col="2"][data-row="1"] { left: 286px; top: 143px; }
.cube-cell[data-col="3"][data-row="1"] { left: 429px; top: 143px; }
.cube-cell[data-col="0"][data-row="2"] { left: 0;     top: 286px; }
.cube-cell[data-col="1"][data-row="2"] { left: 143px; top: 286px; }
.cube-cell[data-col="2"][data-row="2"] { left: 286px; top: 286px; }
.cube-cell[data-col="3"][data-row="2"] { left: 429px; top: 286px; }

/* --- Cube faces --- */
.ca-cube {
  width: var(--cube-size);
  height: var(--cube-size);
  transform-style: preserve-3d;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ca-face {
  position: absolute;
  width: var(--cube-size);
  height: var(--cube-size);
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.ca-face.front  { transform: translateZ(var(--half)); }
.ca-face.back   { transform: rotateY(180deg) translateZ(var(--half)); }
.ca-face.right  { transform: rotateY(90deg) translateZ(var(--half)); }
.ca-face.left   { transform: rotateY(-90deg) translateZ(var(--half)); }
.ca-face.top    { transform: rotateX(90deg) translateZ(var(--half)); }
.ca-face.bottom { transform: rotateX(-90deg) translateZ(var(--half)); }

/* Solid */
.ca-cube.solid .front  { background: #E8ECF2; }
.ca-cube.solid .right  { background: #DDE1EA; }
.ca-cube.solid .top    { background: #F0F3F8; }
.ca-cube.solid .back   { background: #D5D9E2; }
.ca-cube.solid .left   { background: #E0E4EC; }
.ca-cube.solid .bottom { background: #D0D4DD; }
.ca-cube.solid .ca-face { border: 1px solid rgba(0,0,0,0.04); }

/* Ghost */
.ca-cube.ghost .ca-face {
  background: rgba(200, 210, 230, 0.08);
  border: 2px dashed rgba(180, 190, 210, 0.4);
}
.ca-cube.ghost .front {
  font-size: 2.1rem;
  color: rgba(180, 190, 210, 0.5);
  font-weight: 300;
}
.ca-cube.ghost {
  animation: ca-ghost-pulse 2s ease-in-out infinite;
}
@keyframes ca-ghost-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.65; }
}

/* Brand */
.ca-cube.brand .ca-face {
  border: 1px solid rgba(0,0,0,0.06);
  transition: background 0.3s ease;
}
.ca-cube.brand .front .ca-logo {
  width: 56px; height: 56px;
  object-fit: contain;
}
.ca-cube.brand .front .ca-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Brand colors */
.ca-cube.brand[data-brand="n8n"] .front    { background: #FFE0E6; }
.ca-cube.brand[data-brand="n8n"] .right    { background: #FFD0D9; }
.ca-cube.brand[data-brand="n8n"] .top      { background: #FFF0F3; }
.ca-cube.brand[data-brand="n8n"] .back     { background: #FFC5CF; }
.ca-cube.brand[data-brand="n8n"] .left     { background: #FFD8E0; }
.ca-cube.brand[data-brand="n8n"] .bottom   { background: #FFC0CA; }
.ca-cube.brand[data-brand="n8n"] .ca-label { color: #ea4b71; }

.ca-cube.brand[data-brand="make"] .front   { background: #EDE0FF; }
.ca-cube.brand[data-brand="make"] .right   { background: #DDD0F5; }
.ca-cube.brand[data-brand="make"] .top     { background: #F5EEFF; }
.ca-cube.brand[data-brand="make"] .back    { background: #D0C0EA; }
.ca-cube.brand[data-brand="make"] .left    { background: #E0D0F8; }
.ca-cube.brand[data-brand="make"] .bottom  { background: #CCC0E5; }
.ca-cube.brand[data-brand="make"] .ca-label { color: #6D3BF5; }

.ca-cube.brand[data-brand="gpt"] .front    { background: #D4F5E9; }
.ca-cube.brand[data-brand="gpt"] .right    { background: #C0EDDB; }
.ca-cube.brand[data-brand="gpt"] .top      { background: #E8FBF2; }
.ca-cube.brand[data-brand="gpt"] .back     { background: #B5E5D0; }
.ca-cube.brand[data-brand="gpt"] .left     { background: #C8F0E0; }
.ca-cube.brand[data-brand="gpt"] .bottom   { background: #B0E0CA; }
.ca-cube.brand[data-brand="gpt"] .ca-label { color: #10a37f; }

.ca-cube.brand[data-brand="gemini"] .front  { background: #D6E4FF; }
.ca-cube.brand[data-brand="gemini"] .right  { background: #C0D4F5; }
.ca-cube.brand[data-brand="gemini"] .top    { background: #E8EEFF; }
.ca-cube.brand[data-brand="gemini"] .back   { background: #B5C8EA; }
.ca-cube.brand[data-brand="gemini"] .left   { background: #C8D8F8; }
.ca-cube.brand[data-brand="gemini"] .bottom { background: #B0C4E5; }
.ca-cube.brand[data-brand="gemini"] .ca-label { color: #4285f4; }

.ca-cube.brand[data-brand="kakao"] .front   { background: #FFF3C4; }
.ca-cube.brand[data-brand="kakao"] .right   { background: #FFE9A0; }
.ca-cube.brand[data-brand="kakao"] .top     { background: #FFFAE0; }
.ca-cube.brand[data-brand="kakao"] .back    { background: #FFDF85; }
.ca-cube.brand[data-brand="kakao"] .left    { background: #FFEDA8; }
.ca-cube.brand[data-brand="kakao"] .bottom  { background: #FFDA80; }
.ca-cube.brand[data-brand="kakao"] .ca-label { color: #3C1E1E; }

.ca-cube.brand[data-brand="banana"] .front  { background: #FFF5CC; }
.ca-cube.brand[data-brand="banana"] .right  { background: #FFEDB0; }
.ca-cube.brand[data-brand="banana"] .top    { background: #FFFBE6; }
.ca-cube.brand[data-brand="banana"] .back   { background: #FFE59A; }
.ca-cube.brand[data-brand="banana"] .left   { background: #FFF0B8; }
.ca-cube.brand[data-brand="banana"] .bottom { background: #FFE090; }
.ca-cube.brand[data-brand="banana"] .ca-label { color: #E6A800; }

/* Bounce & glow */
.ca-cube.bounce-in {
  animation: ca-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes ca-bounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.15); }
  65%  { transform: scale(0.93); }
  100% { transform: scale(1); }
}
.ca-cube.glow .ca-face {
  box-shadow: inset 0 0 15px rgba(127, 219, 202, 0.3);
}

/* --- Flying cube --- */
.ca-flyer {
  --cube-size: 128px;
  --half: 64px;
  position: fixed;
  z-index: 100;
  pointer-events: none;
  transform-style: preserve-3d;
  filter: drop-shadow(4px 8px 16px rgba(0,0,0,0.18));
}
.ca-flyer .ca-cube {
  animation: none;
  transform-style: preserve-3d;
  transform: rotateX(-25deg) rotateY(45deg);
}

/* Impact */
.cube-structure-inner.impact-shake {
  animation: ca-impact-shake 0.18s ease-out;
}
@keyframes ca-impact-shake {
  0%   { translate: 0 0; }
  25%  { translate: 0 -3px; }
  50%  { translate: 1px 2px; }
  75%  { translate: -1px -1px; }
  100% { translate: 0 0; }
}
.ca-cube.squash-land {
  animation: ca-squash 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes ca-squash {
  0%   { transform: scaleX(1.1) scaleY(0.85); }
  40%  { transform: scaleX(0.95) scaleY(1.08); }
  70%  { transform: scaleX(1.03) scaleY(0.97); }
  100% { transform: scale(1); }
}

.ca-impact-ring {
  position: absolute;
  width: var(--cube-size);
  height: 12px;
  bottom: -6px; left: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(127,219,202,0.4) 0%, transparent 70%);
  opacity: 0; transform: scale(0.3);
  pointer-events: none;
}
.ca-impact-ring.pop {
  animation: ca-ring-pop 0.5s ease-out forwards;
}
@keyframes ca-ring-pop {
  0%   { opacity: 0.8; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(1.8); }
}

/* Sparkles */
.ca-spark {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}
.ca-spark.pop {
  animation: ca-spark-pop 0.6s ease-out forwards;
}
@keyframes ca-spark-pop {
  0%   { opacity: 1; transform: translate3d(0,0,0) scale(1); }
  100% { opacity: 0; transform: translate3d(var(--sx),var(--sy),var(--sz)) scale(0); }
}

/* --- Progress --- */
.cube-progress-wrap {
  width: 520px;
  z-index: 10;
}
/* Status text */
.cube-status-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: #7A7F9C;
  text-align: center;
  margin-bottom: 10px;
  min-height: 1.2em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.4s ease;
}
.cube-status-text.fade-in {
  opacity: 1;
  transform: translateY(0);
}
.cube-status-text.done {
  color: #5EEDB8;
  font-weight: 700;
}

.cube-progress-bar {
  width: 100%; height: 6px;
  background: rgba(200, 210, 230, 0.3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.cube-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #7EB8E0, #7FDBCA);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cube-progress-fill.done {
  background: linear-gradient(90deg, #7FDBCA, #5EEDB8);
}
.cube-progress-text {
  font-size: 0.65rem;
  color: #7A7F9C;
  text-align: right;
  transition: color 0.4s ease;
}
.cube-progress-text.done {
  color: #7FDBCA;
  font-weight: 700;
}

/* --- Speech bubble --- */
.cube-speech {
  position: absolute;
  top: -40px; right: -100px;
  background: white;
  border-radius: 20px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #3A3F5C;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  opacity: 0;
  transform: scale(0.5) translateY(10px);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 30;
  white-space: nowrap;
}
.cube-speech::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 24px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 4px;
  transform: rotate(45deg);
}
.cube-speech.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* --- Hero text (after completion) --- */
.cube-hero-text {
  text-align: center;
  z-index: 5;
  margin-top: 30px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}
.cube-hero-text.show {
  opacity: 1;
  transform: translateY(0);
}
.cube-hero-text h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #3A3F5C;
  line-height: 1.3;
  margin-bottom: 12px;
}
.cube-highlight {
  background: linear-gradient(135deg, #7FDBCA, #7EB8E0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cube-hero-text p {
  font-size: 1.05rem;
  color: #7A7F9C;
  font-weight: 300;
}

/* ============================================
   NAV
   ============================================ */

[data-theme="cube"] .game-hud {
  background: rgba(240, 246, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(127, 219, 202, 0.2);
}

[data-theme="cube"] .hud-label {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #3A3F5C;
  letter-spacing: 1px;
  text-shadow: none;
}

[data-theme="cube"] .hud-link {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #7A7F9C;
  border-radius: 20px;
  padding: 6px 16px;
}

[data-theme="cube"] .hud-link:hover,
[data-theme="cube"] .hud-link.active {
  color: #3A3F5C;
  background: rgba(127, 219, 202, 0.15);
}

/* ============================================
   PORTFOLIO
   ============================================ */

[data-theme="cube"] .portfolio-section {
  background: #F8FBFF;
  max-width: none;
  margin: 0;
  padding-left: max(40px, calc((100vw - 1120px) / 2));
  padding-right: max(40px, calc((100vw - 1120px) / 2));
}

[data-theme="cube"] .section-header .stage-label {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.85rem;
  color: #7FDBCA;
  border: 1px solid rgba(127, 219, 202, 0.25);
  background: rgba(127, 219, 202, 0.06);
  text-shadow: none;
  letter-spacing: 5px;
}

[data-theme="cube"] .section-title {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #3A3F5C;
  text-shadow: none;
  -webkit-text-stroke: 0;
  letter-spacing: 3px;
}

[data-theme="cube"] .cat-btn {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid rgba(127, 219, 202, 0.2);
  background: white;
  color: #7A7F9C;
  padding: 10px 22px;
}

[data-theme="cube"] .cat-btn:hover {
  border-color: #7FDBCA;
  color: #3A3F5C;
  background: rgba(127, 219, 202, 0.06);
}

[data-theme="cube"] .cat-btn.active {
  background: linear-gradient(135deg, rgba(127,219,202,0.2), rgba(126,184,224,0.2));
  border-color: #7FDBCA;
  color: #3A3F5C;
  font-weight: 700;
}

[data-theme="cube"] .pf-card {
  background: white;
  border: 1px solid rgba(127, 219, 202, 0.12);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

[data-theme="cube"] .pf-card:hover {
  border-color: rgba(127, 219, 202, 0.3);
  box-shadow: 0 8px 30px rgba(127, 219, 202, 0.12);
  transform: translateY(-4px);
}

[data-theme="cube"] .pf-title {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #3A3F5C;
}

[data-theme="cube"] .pf-desc {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 300;
  color: #7A7F9C;
  line-height: 1.7;
}

[data-theme="cube"] .tag {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(127, 219, 202, 0.08);
  color: #5AAAA0;
  border: 1px solid rgba(127, 219, 202, 0.2);
  border-radius: 12px;
  padding: 5px 12px;
}

[data-theme="cube"] .pf-tags .tag {
  font-size: 0.75rem;
  padding: 5px 12px;
}

[data-theme="cube"] .pf-thumb {
  background: linear-gradient(135deg, #F0F6FF 0%, #E8F4FD 100%);
  border: none;
}

[data-theme="cube"] .pf-badge {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 10px;
}

[data-theme="cube"] .crt-mini::before { content: none; }

[data-theme="cube"] .pf-icon { filter: none; }

[data-theme="cube"] .sfx-text { display: none; }

/* ============================================
   CONTACT
   ============================================ */

[data-theme="cube"] #save-point {
  background: #F0F6FF;
  max-width: none;
  margin: 0;
  padding-left: max(40px, calc((100vw - 1120px) / 2));
  padding-right: max(40px, calc((100vw - 1120px) / 2));
}

[data-theme="cube"] .contact-panel {
  background: white;
  border: 1px solid rgba(127, 219, 202, 0.12);
  box-shadow: 0 4px 30px rgba(0,0,0,0.06);
  border-radius: 20px;
}

[data-theme="cube"] .speech-bubble {
  background: white;
  border: 1px solid rgba(127, 219, 202, 0.15);
  border-radius: 16px;
  color: #3A3F5C;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

[data-theme="cube"] .speech-bubble::after {
  border-top-color: white;
}

[data-theme="cube"] .speech-bubble strong {
  color: #7FDBCA;
}

[data-theme="cube"] .speech-bubble.npc {
  background: #FAFCFF;
  border-color: rgba(127, 219, 202, 0.2);
}

[data-theme="cube"] .speech-bubble.npc::after {
  border-top-color: #FAFCFF;
}

[data-theme="cube"] .npc-name {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #7FDBCA;
}

[data-theme="cube"] .save-crystal::before {
  background: linear-gradient(135deg, #7FDBCA, #7EB8E0, #C4B0FF);
  box-shadow: 0 0 30px rgba(127, 219, 202, 0.3), 0 0 60px rgba(127, 219, 202, 0.1);
  border-radius: 50%;
  animation: cube-crystal-spin 8s linear infinite;
}

[data-theme="cube"] .save-crystal::after {
  background: rgba(127, 219, 202, 0.5);
  border-radius: 50%;
}

@keyframes cube-crystal-spin {
  to { transform: translate(-50%, -50%) rotate(405deg); }
}

[data-theme="cube"] .rpg-label {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #5AAAA0;
  letter-spacing: 0.5px;
}

[data-theme="cube"] .rpg-input,
[data-theme="cube"] .rpg-textarea {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 0.85rem;
  background: #F8FBFF;
  border: 1px solid rgba(127, 219, 202, 0.2);
  border-radius: 12px;
  color: #3A3F5C;
  padding: 14px 18px;
  letter-spacing: 0;
}

[data-theme="cube"] .rpg-input::placeholder,
[data-theme="cube"] .rpg-textarea::placeholder {
  color: #B0B8CC;
}

[data-theme="cube"] .rpg-input:focus,
[data-theme="cube"] .rpg-textarea:focus {
  border-color: #7FDBCA;
  box-shadow: 0 0 16px rgba(127, 219, 202, 0.12);
  outline: none;
}

[data-theme="cube"] .pixel-btn {
  font-family: 'Gmarket Sans', sans-serif;
  font-weight: 700;
  background: linear-gradient(135deg, #7FDBCA, #7EB8E0);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  box-shadow: 0 4px 20px rgba(127, 219, 202, 0.25);
  letter-spacing: 1px;
}

[data-theme="cube"] .pixel-btn:hover {
  box-shadow: 0 8px 30px rgba(127, 219, 202, 0.35);
  transform: translateY(-2px);
}

[data-theme="cube"] .contact-link {
  color: #7A7F9C;
}

[data-theme="cube"] .contact-link:hover {
  color: #7FDBCA;
}

[data-theme="cube"] .link-icon {
  border-color: rgba(127, 219, 202, 0.2);
}

[data-theme="cube"] .contact-link:hover .link-icon {
  border-color: #7FDBCA;
  box-shadow: 0 0 12px rgba(127, 219, 202, 0.15);
}

/* ============================================
   FOOTER
   ============================================ */

[data-theme="cube"] .game-footer {
  background: #F0F6FF;
  border-top: 1px solid rgba(127, 219, 202, 0.12);
}

[data-theme="cube"] .game-footer p {
  color: #7A7F9C;
  font-family: 'Gmarket Sans', sans-serif;
}

[data-theme="cube"] .game-footer .blink {
  color: #7FDBCA;
}

[data-theme="cube"] ::-webkit-scrollbar-track { background: #F0F6FF; }
[data-theme="cube"] ::-webkit-scrollbar-thumb { background: rgba(127, 219, 202, 0.3); border-radius: 4px; }
[data-theme="cube"] ::-webkit-scrollbar-thumb:hover { background: rgba(127, 219, 202, 0.5); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  [data-theme="cube"] .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cube-grid {
    --cube-size: 90px;
    --half: 45px;
    width: 410px;
    height: 310px;
  }
  .cube-cell[data-col="1"] { left: 103px !important; }
  .cube-cell[data-col="2"] { left: 206px !important; }
  .cube-cell[data-col="3"] { left: 309px !important; }
  .cube-cell[data-row="1"] { top: 103px !important; }
  .cube-cell[data-row="2"] { top: 206px !important; }
  .cube-progress-wrap { width: 85vw; }
  .ca-cube.brand .front .ca-logo { width: 40px; height: 40px; }
  .ca-cube.brand .front .ca-label { font-size: 0.6rem; }
}

@media (max-width: 600px) {
  [data-theme="cube"] .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .cube-grid {
    --cube-size: 68px;
    --half: 34px;
    width: 310px;
    height: 235px;
  }
  .cube-cell[data-col="1"] { left: 78px !important; }
  .cube-cell[data-col="2"] { left: 156px !important; }
  .cube-cell[data-col="3"] { left: 234px !important; }
  .cube-cell[data-row="1"] { top: 78px !important; }
  .cube-cell[data-row="2"] { top: 156px !important; }
  .cube-hero-text h1 { font-size: 1.6rem; }
  .cube-hero-text p { font-size: 0.9rem; }
  .ca-cube.brand .front .ca-logo { width: 30px; height: 30px; }
  .ca-cube.brand .front .ca-label { font-size: 0.5rem; }
  [data-theme="cube"] .category-filter {
    flex-wrap: wrap;
    gap: 6px;
  }
  [data-theme="cube"] .cat-btn {
    font-size: 0.8rem;
    padding: 8px 16px;
  }
  [data-theme="cube"] .section-title {
    font-size: 1.8rem;
  }
  [data-theme="cube"] .pf-title {
    font-size: 1rem;
  }
  [data-theme="cube"] .tag,
  [data-theme="cube"] .pf-tags .tag {
    font-size: 0.7rem;
  }
}
