/* ==========================================
   3D Components & Effects
   Author: AI Web Development Assistant
   ========================================== */

/* ==========================================
   3D Variables
   ========================================== */
:root {
  /* 3D Perspective */
  --perspective-value: 1000px;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --rotate-z: 0deg;
  --translate-z: 0px;
  --scale-3d: 1;
  
  /* 3D Colors */
  --color-3d-primary: #ff6b6b;
  --color-3d-secondary: #4ecdc4;
  --color-3d-accent: #ffe66d;
  --color-3d-dark: #333;
  --color-3d-light: #fff;
  
  /* 3D Shadows */
  --shadow-3d-soft: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-3d-medium: 0 20px 40px rgba(0, 0, 0, 0.2);
  --shadow-3d-hard: 0 30px 60px rgba(0, 0, 0, 0.3);
  --shadow-3d-glow: 0 0 50px rgba(255, 107, 107, 0.3);
  
  /* 3D Transitions */
  --transition-3d-fast: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-3d-normal: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-3d-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-3d-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-3d-elastic: 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================
   3D Base Classes
   ========================================== */

/* 3D Container */
.container-3d {
  perspective: var(--perspective-value);
  perspective-origin: center center;
  transform-style: preserve-3d;
}

/* 3D Element */
.element-3d {
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transform: perspective(var(--perspective-value)) 
             rotateX(var(--rotate-x)) 
             rotateY(var(--rotate-y)) 
             rotateZ(var(--rotate-z))
             translateZ(var(--translate-z))
             scale(var(--scale-3d));
  transition: transform var(--transition-3d-normal);
}

/* 3D Face */
.face-3d {
  position: absolute;
  backface-visibility: hidden;
  transform-origin: center center;
}

/* ==========================================
   3D Cards
   ========================================== */

/* 3D Card Base */
.card-3d {
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 450px;
  margin: 20px auto;
  perspective: 1000px;
  cursor: pointer;
}

/* Card Inner Container */
.card-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--transition-3d-normal);
}

/* Card Hover Effect */
.card-3d:hover .card-3d-inner {
  transform: rotateY(15deg) rotateX(-10deg) translateZ(20px);
}

/* Card Faces */
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-3d-medium);
  overflow: hidden;
}

.card-face.front {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
}

.card-face.back {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
}

/* Card Content */
.card-3d-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-3d-description {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
}

.card-3d-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

/* ==========================================
   3D Cube
   ========================================== */

/* 3D Cube Container */
.cube-3d {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 50px auto;
  perspective: 1000px;
}

/* Cube Element */
.cube-3d-element {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: cube-rotate 10s infinite linear;
  transition: transform var(--transition-3d-normal);
}

.cube-3d:hover .cube-3d-element {
  animation-play-state: paused;
  transform: scale(1.1);
}

/* Cube Faces */
.cube-face-3d {
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.8), rgba(255, 138, 128, 0.8));
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

/* Individual Cube Face Positions */
.cube-face-3d.front {
  transform: translateZ(100px);
  background: linear-gradient(135deg, #ff6b6b, #ff8a80);
}

.cube-face-3d.back {
  transform: rotateY(180deg) translateZ(100px);
  background: linear-gradient(135deg, #4ecdc4, #26a69a);
}

.cube-face-3d.right {
  transform: rotateY(90deg) translateZ(100px);
  background: linear-gradient(135deg, #ffe66d, #ffd54f);
}

.cube-face-3d.left {
  transform: rotateY(-90deg) translateZ(100px);
  background: linear-gradient(135deg, #a8e6cf, #56ab2f);
}

.cube-face-3d.top {
  transform: rotateX(90deg) translateZ(100px);
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.cube-face-3d.bottom {
  transform: rotateX(-90deg) translateZ(100px);
  background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Cube Rotation Animation */
@keyframes cube-rotate {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* ==========================================
   3D Pyramid
   ========================================== */

/* Pyramid Container */
.pyramid-3d {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 50px auto;
  perspective: 1000px;
}

/* Pyramid Element */
.pyramid-3d-element {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: pyramid-rotate 8s infinite linear;
  transition: transform var(--transition-3d-normal);
}

.pyramid-3d:hover .pyramid-3d-element {
  animation-play-state: paused;
}

/* Pyramid Faces */
.pyramid-face-3d {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  backface-visibility: hidden;
}

/* Pyramid Base */
.pyramid-base-3d {
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #ff6b6b, #ff8a80);
  transform: rotateX(90deg) translateZ(-50px);
  opacity: 0.8;
}

/* Pyramid Side Faces */
.pyramid-side-1 {
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 173px solid #ff6b6b;
  transform: translateX(0px) translateZ(0px) rotateX(30deg);
}

.pyramid-side-2 {
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 173px solid #4ecdc4;
  transform: translateX(0px) translateZ(0px) rotateX(30deg) rotateY(90deg);
}

.pyramid-side-3 {
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 173px solid #ffe66d;
  transform: translateX(0px) translateZ(0px) rotateX(30deg) rotateY(180deg);
}

.pyramid-side-4 {
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 173px solid #a8e6cf;
  transform: translateX(0px) translateZ(0px) rotateX(30deg) rotateY(270deg);
}

/* Pyramid Rotation Animation */
@keyframes pyramid-rotate {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* ==========================================
   3D Sphere
   ========================================== */

/* Sphere Container */
.sphere-3d {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 50px auto;
  perspective: 1000px;
}

/* Sphere Element */
.sphere-3d-element {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: sphere-rotate 6s infinite linear;
  transition: transform var(--transition-3d-normal);
}

.sphere-3d:hover .sphere-3d-element {
  animation-play-state: paused;
  transform: scale(1.1);
}

/* Sphere Base */
.sphere-base-3d {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at 30% 30%, #ff8a80, #ff6b6b, #ff5252);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 
    0 20px 40px rgba(255, 107, 107, 0.4),
    inset -20px -20px 40px rgba(0, 0, 0, 0.2);
}

/* Sphere Highlights */
.sphere-highlight-3d {
  position: absolute;
  top: 20%;
  left: 20%;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent);
  border-radius: 50%;
  filter: blur(10px);
  animation: highlight-pulse 2s ease-in-out infinite;
}

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

/* Sphere Rotation Animation */
@keyframes sphere-rotate {
  0% { transform: rotateY(0deg) rotateX(0deg); }
  100% { transform: rotateY(360deg) rotateX(360deg); }
}

/* ==========================================
   3D Cylinder
   ========================================== */

/* Cylinder Container */
.cylinder-3d {
  position: relative;
  width: 150px;
  height: 200px;
  margin: 50px auto;
  perspective: 1000px;
}

/* Cylinder Element */
.cylinder-3d-element {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: cylinder-rotate 4s infinite linear;
  transition: transform var(--transition-3d-normal);
}

.cylinder-3d:hover .cylinder-3d-element {
  animation-play-state: paused;
}

/* Cylinder Body */
.cylinder-body-3d {
  position: absolute;
  top: 0;
  left: 50%;
  width: 150px;
  height: 200px;
  background: linear-gradient(135deg, #ff6b6b, #ff8a80);
  transform: translateX(-50%);
  border-radius: 75px;
  box-shadow: 
    inset -10px 0 20px rgba(0, 0, 0, 0.2),
    inset 10px 0 20px rgba(255, 255, 255, 0.2);
}

/* Cylinder Top */
.cylinder-top-3d {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 150px;
  height: 30px;
  background: linear-gradient(135deg, #ff8a80, #ff6b6b);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
}

/* Cylinder Bottom */
.cylinder-bottom-3d {
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 150px;
  height: 30px;
  background: linear-gradient(135deg, #ff5252, #ff6b6b);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Cylinder Rotation Animation */
@keyframes cylinder-rotate {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* ==========================================
   3D Torus (Donut)
   ========================================== */

/* Torus Container */
.torus-3d {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 50px auto;
  perspective: 1000px;
}

/* Torus Element */
.torus-3d-element {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: torus-rotate 8s infinite linear;
  transition: transform var(--transition-3d-normal);
}

.torus-3d:hover .torus-3d-element {
  animation-play-state: paused;
}

/* Torus Ring */
.torus-ring-3d {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border: 30px solid #ff6b6b;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 
    0 0 20px rgba(255, 107, 107, 0.5),
    inset 0 0 20px rgba(255, 107, 107, 0.3);
}

/* Torus Inner Ring */
.torus-inner-3d {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #4ecdc4, #26a69a);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Torus Rotation Animation */
@keyframes torus-rotate {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* ==========================================
   3D Pyramid with Base
   ========================================== */

/* Enhanced Pyramid Container */
.pyramid-enhanced-3d {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 50px auto;
  perspective: 1000px;
}

/* Enhanced Pyramid Element */
.pyramid-enhanced-element {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: pyramid-enhanced-rotate 6s infinite linear;
  transition: transform var(--transition-3d-normal);
}

.pyramid-enhanced-3d:hover .pyramid-enhanced-element {
  animation-play-state: paused;
  transform: scale(1.05);
}

/* Enhanced Pyramid Base */
.pyramid-enhanced-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #ff6b6b, #ff8a80);
  transform: translateX(-50%) rotateX(90deg);
  opacity: 0.8;
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.4);
}

/* Enhanced Pyramid Sides */
.pyramid-enhanced-side {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.pyramid-enhanced-side-1 {
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 173px solid #ff6b6b;
  transform: translateX(25px) translateZ(50px) rotateX(30deg);
}

.pyramid-enhanced-side-2 {
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 173px solid #4ecdc4;
  transform: translateX(125px) translateZ(50px) rotateX(30deg) rotateY(90deg);
}

.pyramid-enhanced-side-3 {
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 173px solid #ffe66d;
  transform: translateX(25px) translateZ(-50px) rotateX(30deg) rotateY(180deg);
}

.pyramid-enhanced-side-4 {
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 173px solid #a8e6cf;
  transform: translateX(-75px) translateZ(50px) rotateX(30deg) rotateY(270deg);
}

/* Enhanced Pyramid Rotation Animation */
@keyframes pyramid-enhanced-rotate {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* ==========================================
   3D Interactive Elements
   ========================================== */

/* 3D Hover Card */
.hover-card-3d {
  position: relative;
  width: 300px;
  height: 400px;
  margin: 20px auto;
  perspective: 1000px;
  cursor: pointer;
}

.hover-card-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--transition-3d-normal);
  border-radius: 20px;
  overflow: hidden;
}

/* Card Hover States */
.hover-card-3d:hover .hover-card-3d-inner {
  transform: rotateY(10deg) rotateX(-5deg) translateZ(30px);
}

.hover-card-3d[data-tilt='left']:hover .hover-card-3d-inner {
  transform: rotateY(-15deg) rotateX(-5deg) translateZ(30px);
}

.hover-card-3d[data-tilt='right']:hover .hover-card-3d-inner {
  transform: rotateY(15deg) rotateX(-5deg) translateZ(30px);
}

.hover-card-3d[data-tilt='up']:hover .hover-card-3d-inner {
  transform: rotateY(0deg) rotateX(-10deg) translateZ(30px);
}

.hover-card-3d[data-tilt='down']:hover .hover-card-3d-inner {
  transform: rotateY(0deg) rotateX(10deg) translateZ(30px);
}

/* Card Content */
.hover-card-3d-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 30px;
  transform: translateZ(20px);
}

.hover-card-3d-glow {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.3), transparent);
  filter: blur(20px);
  opacity: 0;
  transition: opacity var(--transition-3d-normal);
  z-index: -1;
}

.hover-card-3d:hover .hover-card-3d-glow {
  opacity: 1;
}

/* ==========================================
   3D Morphing Elements
   ========================================== */

/* 3D Morph Container */
.morph-3d {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 50px auto;
  perspective: 1000px;
}

/* Morph Element */
.morph-3d-element {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: all var(--transition-3d-bounce);
  border-radius: 20px;
  background: linear-gradient(135deg, #ff6b6b, #ff8a80);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Morph States */
.morph-3d-element[data-morph='circle']:hover {
  border-radius: 50%;
  transform: rotateY(180deg) scale(1.2);
  background: linear-gradient(135deg, #4ecdc4, #26a69a);
}

.morph-3d-element[data-morph='diamond']:hover {
  border-radius: 0;
  transform: rotate(45deg) scale(1.1);
  background: linear-gradient(135deg, #ffe66d, #ffd54f);
}

.morph-3d-element[data-morph='star']:hover {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  transform: rotate(180deg) scale(1.1);
  background: linear-gradient(135deg, #a8e6cf, #56ab2f);
}

/* ==========================================
   3D Particle System
   ========================================== */

/* Particle Container */
.particles-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

/* Individual Particle */
.particle-3d {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-3d-primary);
  border-radius: 50%;
  opacity: 0;
  transform-style: preserve-3d;
  animation: particle-float-3d 15s linear infinite;
}

.particle-3d:nth-child(2n) {
  background: var(--color-3d-secondary);
}

.particle-3d:nth-child(3n) {
  background: var(--color-3d-accent);
}

/* Particle Animation */
@keyframes particle-float-3d {
  0% {
    opacity: 0;
    transform: translateZ(-100px) translateY(100vh) scale(0);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateZ(100px) translateY(-100vh) scale(1);
  }
}

/* ==========================================
   3D Text Effects
   ========================================== */

/* 3D Text Base */
.text-3d {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 4rem;
  text-align: center;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* 3D Text Effect */
.text-3d-effect {
  position: relative;
  display: inline-block;
  color: var(--color-3d-primary);
  text-shadow: 
    0 1px 0 #ff5252,
    0 2px 0 #ff5252,
    0 3px 0 #ff5252,
    0 4px 0 #ff5252,
    0 5px 0 #ff5252,
    0 6px 0 #ff5252,
    0 7px 0 #ff5252,
    0 8px 0 #ff5252,
    0 9px 0 #ff5252,
    0 10px 0 #ff5252,
    0 11px 0 #ff5252,
    0 12px 0 #ff5252,
    0 13px 0 #ff5252,
    0 14px 0 #ff5252,
    0 15px 0 #ff5252,
    0 15px 10px rgba(0, 0, 0, 0.3),
    0 30px 30px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-3d-normal);
}

.text-3d-effect:hover {
  transform: translateY(-10px) rotateX(-10deg);
  color: var(--color-3d-secondary);
  text-shadow: 
    0 1px 0 #26a69a,
    0 2px 0 #26a69a,
    0 3px 0 #26a69a,
    0 4px 0 #26a69a,
    0 5px 0 #26a69a,
    0 6px 0 #26a69a,
    0 7px 0 #26a69a,
    0 8px 0 #26a69a,
    0 9px 0 #26a69a,
    0 10px 0 #26a69a,
    0 11px 0 #26a69a,
    0 12px 0 #26a69a,
    0 13px 0 #26a69a,
    0 14px 0 #26a69a,
    0 15px 0 #26a69a,
    0 15px 10px rgba(0, 0, 0, 0.3),
    0 30px 30px rgba(0, 0, 0, 0.2);
}

/* 3D Text Glow */
.text-3d-glow {
  position: relative;
  display: inline-block;
  color: var(--color-3d-light);
  text-shadow: 
    0 0 10px currentColor,
    0 0 20px currentColor,
    0 0 30px var(--color-3d-primary),
    0 0 40px var(--color-3d-primary),
    0 0 70px var(--color-3d-primary),
    0 0 80px var(--color-3d-primary),
    0 0 100px var(--color-3d-primary),
    0 0 150px var(--color-3d-primary);
  animation: text-glow-3d 1.5s ease-in-out infinite alternate;
}

@keyframes text-glow-3d {
  from {
    text-shadow: 
      0 0 10px currentColor,
      0 0 20px currentColor,
      0 0 30px var(--color-3d-primary),
      0 0 40px var(--color-3d-primary);
  }
  to {
    text-shadow: 
      0 0 20px currentColor,
      0 0 30px currentColor,
      0 0 40px var(--color-3d-primary),
      0 0 50px var(--color-3d-primary),
      0 0 60px var(--color-3d-primary),
      0 0 70px var(--color-3d-primary),
      0 0 80px var(--color-3d-primary);
  }
}

/* ==========================================
   3D Interactive Gallery
   ========================================== */

/* 3D Gallery Container */
.gallery-3d {
  position: relative;
  width: 100%;
  height: 400px;
  margin: 50px auto;
  perspective: 1000px;
  overflow: hidden;
}

/* Gallery Track */
.gallery-3d-track {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 300px;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateY(0deg);
  transition: transform var(--transition-3d-normal);
}

/* Gallery Items */
.gallery-3d-item {
  position: absolute;
  top: 50%;
  width: 200px;
  height: 250px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-3d-normal);
  box-shadow: var(--shadow-3d-medium);
}

.gallery-3d-item:hover {
  transform: translateZ(50px) scale(1.1);
  box-shadow: var(--shadow-3d-hard);
}

/* Individual Gallery Item Positions */
.gallery-3d-item:nth-child(1) {
  transform: translate(-50%, -50%) rotateY(0deg) translateZ(300px);
}

.gallery-3d-item:nth-child(2) {
  transform: translate(-50%, -50%) rotateY(60deg) translateZ(300px);
}

.gallery-3d-item:nth-child(3) {
  transform: translate(-50%, -50%) rotateY(120deg) translateZ(300px);
}

.gallery-3d-item:nth-child(4) {
  transform: translate(-50%, -50%) rotateY(180deg) translateZ(300px);
}

.gallery-3d-item:nth-child(5) {
  transform: translate(-50%, -50%) rotateY(240deg) translateZ(300px);
}

.gallery-3d-item:nth-child(6) {
  transform: translate(-50%, -50%) rotateY(300deg) translateZ(300px);
}

/* Gallery Navigation */
.gallery-3d-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: var(--color-3d-primary);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all var(--transition-3d-normal);
  z-index: 10;
}

.gallery-3d-nav:hover {
  background: var(--color-3d-secondary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-3d-glow);
}

.gallery-3d-nav.prev {
  left: 20px;
}

.gallery-3d-nav.next {
  right: 20px;
}

/* ==========================================
   Responsive 3D Design
   ========================================== */

@media (max-width: 768px) {
  .card-3d {
    max-width: 280px;
    height: 380px;
  }
  
  .cube-3d,
  .pyramid-3d,
  .sphere-3d,
  .cylinder-3d,
  .torus-3d {
    width: 150px;
    height: 150px;
  }
  
  .cube-face-3d {
    width: 150px;
    height: 150px;
  }
  
  .text-3d {
    font-size: 2.5rem;
  }
  
  .gallery-3d {
    height: 300px;
  }
  
  .gallery-3d-track {
    width: 600px;
    height: 200px;
  }
  
  .gallery-3d-item {
    width: 150px;
    height: 200px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .card-3d {
    max-width: 250px;
    height: 350px;
  }
  
  .cube-3d,
  .pyramid-3d,
  .sphere-3d,
  .cylinder-3d,
  .torus-3d {
    width: 120px;
    height: 120px;
  }
  
  .cube-face-3d {
    width: 120px;
    height: 120px;
  }
  
  .text-3d {
    font-size: 2rem;
  }
  
  .gallery-3d {
    height: 250px;
  }
  
  .gallery-3d-track {
    width: 400px;
    height: 150px;
  }
  
  .gallery-3d-item {
    width: 120px;
    height: 160px;
    font-size: 0.9rem;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .cube-3d-element,
  .pyramid-3d-element,
  .sphere-3d-element,
  .cylinder-3d-element,
  .torus-3d-element,
  .pyramid-enhanced-element {
    animation: none !important;
  }
  
  .card-3d-inner,
  .hover-card-3d-inner,
  .morph-3d-element,
  .gallery-3d-track {
    transition: none !important;
  }
}