/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* Base CSS Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Theme Variables */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --accent: #007bff;
  --border: #e9ecef;
  --shadow: rgba(0, 0, 0, 0.1);
  --modal-bg: rgba(0, 0, 0, 0.5);

  /* Card Colors - 10 Gradients */
  --color-1: linear-gradient(135deg, #ddf6d2 0%, #e8fae0 100%);
  --color-2: linear-gradient(135deg, #ffe8cd 0%, #fff0da 100%);
  --color-3: linear-gradient(135deg, #fff2eb 0%, #fff8f2 100%);
  --color-4: linear-gradient(135deg, #ffdcdc 0%, #ffe6e6 100%);
  --color-5: linear-gradient(135deg, #e1d5ff 0%, #f0e8ff 100%);
  --color-6: linear-gradient(135deg, #d5f3ff 0%, #e8f9ff 100%);
  --color-7: linear-gradient(135deg, #ffe1d5 0%, #fff0e8 100%);
  --color-8: linear-gradient(135deg, #f5e1ff 0%, #fbf0ff 100%);
  --color-9: linear-gradient(135deg, #e1ffe1 0%, #f0fff0 100%);
  --color-10: linear-gradient(135deg, #fff5e1 0%, #fffbf0 100%);

  /* Floating Icon Base Rotations - 30 icons */
  --icon-1-rotation: 15deg;
  --icon-2-rotation: 45deg;
  --icon-3-rotation: -30deg;
  --icon-4-rotation: 60deg;
  --icon-5-rotation: -15deg;
  --icon-6-rotation: 30deg;
  --icon-7-rotation: -45deg;
  --icon-8-rotation: 75deg;
  --icon-9-rotation: -60deg;
  --icon-10-rotation: 90deg;
  --icon-11-rotation: -75deg;
  --icon-12-rotation: 105deg;
  --icon-13-rotation: 135deg;
  --icon-14-rotation: -90deg;
  --icon-15-rotation: 150deg;
  --icon-16-rotation: -105deg;
  --icon-17-rotation: 165deg;
  --icon-18-rotation: -120deg;
  --icon-19-rotation: 180deg;
  --icon-20-rotation: -135deg;
  --icon-21-rotation: 195deg;
  --icon-22-rotation: -150deg;
  --icon-23-rotation: 210deg;
  --icon-24-rotation: -165deg;
  --icon-25-rotation: 225deg;
  --icon-26-rotation: -180deg;
  --icon-27-rotation: 240deg;
  --icon-28-rotation: -195deg;
  --icon-29-rotation: 255deg;
  --icon-30-rotation: -210deg;

  --transition-speed: 0.3s;

  /* Card Colors - Updated */
  --card-color-1: #ddf6d2;
  --card-color-2: #ffe8cd;
  --card-color-3: #fff2eb;
  --card-color-4: #ffdcdc;
}

/* Light Theme */
.light-theme {
  --bg-color: var(--bg-primary);
  --text-color: var(--text-primary);
  --hover-bg: var(--accent);
  --modal-bg: var(--modal-bg);
  --border-color: var(--border);
}

/* Dark Theme */
.dark-theme {
  --bg-color: var(--bg-primary);
  --text-color: var(--text-primary);
  --hover-bg: var(--accent);
  --modal-bg: var(--modal-bg);
  --border-color: var(--border);
  --bg-primary: #31363f;
  --bg-secondary: #222831;
  --text-primary: #eeeeee;
  --text-secondary: #bbbbbb;
  --accent: #0d6efd;
  --border: #eeeeee;
  --shadow: rgba(255, 255, 255, 0.1);
}

/* Global Styles */
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
  transition:
    background-color var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

/* Floating Icons */
.floating-icons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: -1;
  overflow: hidden;
}

.floating-icons i {
  position: absolute;
  font-size: 2rem;
  color: var(--text-secondary);
  opacity: 0.15;
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  will-change: transform, opacity, filter;
}

/* Enhanced Dynamic Positioning with Diverse Animations for 30 icons */
.floating-icons i:nth-child(1) {
  top: 8%;
  left: 3%;
  animation: float-diagonal 6s infinite ease-in-out;
  font-size: 2.2rem;
}
.floating-icons i:nth-child(2) {
  top: 15%;
  left: 12%;
  animation: float-circular 7s infinite reverse ease-in-out;
  font-size: 1.8rem;
}
.floating-icons i:nth-child(3) {
  top: 25%;
  left: 22%;
  animation: float-wave 5s infinite ease-in-out;
  font-size: 2rem;
}
.floating-icons i:nth-child(4) {
  top: 35%;
  left: 32%;
  animation: float-spiral 8s infinite reverse ease-in-out;
  font-size: 2.3rem;
}
.floating-icons i:nth-child(5) {
  top: 45%;
  left: 42%;
  animation: pulse-float 4s infinite ease-in-out;
  font-size: 1.9rem;
}
.floating-icons i:nth-child(6) {
  top: 55%;
  left: 52%;
  animation: float-diagonal 7s infinite reverse ease-in-out;
  font-size: 2.1rem;
}
.floating-icons i:nth-child(7) {
  top: 65%;
  left: 62%;
  animation: float-circular 5s infinite ease-in-out;
  font-size: 2.4rem;
}
.floating-icons i:nth-child(8) {
  top: 75%;
  left: 72%;
  animation: float-wave 8s infinite reverse ease-in-out;
  font-size: 1.7rem;
}
.floating-icons i:nth-child(9) {
  top: 85%;
  left: 82%;
  animation: float-spiral 6s infinite ease-in-out;
  font-size: 2rem;
}
.floating-icons i:nth-child(10) {
  top: 12%;
  left: 88%;
  animation: pulse-float 7s infinite reverse ease-in-out;
  font-size: 2.2rem;
}
.floating-icons i:nth-child(11) {
  top: 22%;
  left: 6%;
  animation: float-wave 5s infinite reverse ease-in-out;
  font-size: 1.9rem;
}
.floating-icons i:nth-child(12) {
  top: 32%;
  left: 16%;
  animation: float-spiral 8s infinite ease-in-out;
  font-size: 2.3rem;
}
.floating-icons i:nth-child(13) {
  top: 42%;
  left: 26%;
  animation: pulse-float 6s infinite reverse ease-in-out;
  font-size: 1.8rem;
}
.floating-icons i:nth-child(14) {
  top: 52%;
  left: 36%;
  animation: float-diagonal 7s infinite ease-in-out;
  font-size: 2.1rem;
}
.floating-icons i:nth-child(15) {
  top: 62%;
  left: 46%;
  animation: float-circular 5s infinite reverse ease-in-out;
  font-size: 2rem;
}
.floating-icons i:nth-child(16) {
  top: 72%;
  left: 56%;
  animation: float-wave 8s infinite ease-in-out;
  font-size: 2.2rem;
}
.floating-icons i:nth-child(17) {
  top: 82%;
  left: 66%;
  animation: float-spiral 6s infinite reverse ease-in-out;
  font-size: 1.9rem;
}
.floating-icons i:nth-child(18) {
  top: 5%;
  left: 76%;
  animation: pulse-float 7s infinite ease-in-out;
  font-size: 2.4rem;
}
.floating-icons i:nth-child(19) {
  top: 92%;
  left: 86%;
  animation: float-diagonal 5s infinite reverse ease-in-out;
  font-size: 1.8rem;
}
.floating-icons i:nth-child(20) {
  top: 9%;
  left: 94%;
  animation: float-circular 8s infinite ease-in-out;
  font-size: 2.1rem;
}
.floating-icons i:nth-child(21) {
  top: 19%;
  left: 1%;
  animation: float-wave 6s infinite reverse ease-in-out;
  font-size: 2rem;
}
.floating-icons i:nth-child(22) {
  top: 29%;
  left: 11%;
  animation: float-spiral 7s infinite ease-in-out;
  font-size: 2.3rem;
}
.floating-icons i:nth-child(23) {
  top: 39%;
  left: 21%;
  animation: pulse-float 5s infinite reverse ease-in-out;
  font-size: 1.8rem;
}
.floating-icons i:nth-child(24) {
  top: 49%;
  left: 31%;
  animation: float-diagonal 8s infinite ease-in-out;
  font-size: 2.1rem;
}
.floating-icons i:nth-child(25) {
  top: 59%;
  left: 41%;
  animation: float-circular 6s infinite reverse ease-in-out;
  font-size: 1.9rem;
}
.floating-icons i:nth-child(26) {
  top: 69%;
  left: 51%;
  animation: float-wave 7s infinite ease-in-out;
  font-size: 2.2rem;
}
.floating-icons i:nth-child(27) {
  top: 79%;
  left: 61%;
  animation: float-spiral 5s infinite reverse ease-in-out;
  font-size: 2rem;
}
.floating-icons i:nth-child(28) {
  top: 89%;
  left: 71%;
  animation: pulse-float 8s infinite ease-in-out;
  font-size: 2.4rem;
}
.floating-icons i:nth-child(29) {
  top: 6%;
  left: 81%;
  animation: float-diagonal 6s infinite reverse ease-in-out;
  font-size: 1.7rem;
}
.floating-icons i:nth-child(30) {
  top: 16%;
  left: 93%;
  animation: float-circular 7s infinite ease-in-out;
  font-size: 2.1rem;
}

/* Dynamic Floating Animations */
@keyframes float-diagonal {
  0% {
    transform: translate(0px, 0px) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(20px, -30px) rotate(90deg) scale(1.1);
  }
  50% {
    transform: translate(-15px, -50px) rotate(180deg) scale(0.9);
  }
  75% {
    transform: translate(-30px, -20px) rotate(270deg) scale(1.05);
  }
  100% {
    transform: translate(0px, 0px) rotate(360deg) scale(1);
  }
}

@keyframes float-circular {
  0% {
    transform: translate(0px, 0px) rotate(0deg);
  }
  25% {
    transform: translate(30px, 30px) rotate(90deg);
  }
  50% {
    transform: translate(0px, 60px) rotate(180deg);
  }
  75% {
    transform: translate(-30px, 30px) rotate(270deg);
  }
  100% {
    transform: translate(0px, 0px) rotate(360deg);
  }
}

@keyframes float-wave {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-25px) translateX(15px) rotate(90deg);
  }
  50% {
    transform: translateY(-40px) translateX(0px) rotate(180deg);
  }
  75% {
    transform: translateY(-25px) translateX(-15px) rotate(270deg);
  }
}

@keyframes float-spiral {
  0% {
    transform: translate(0px, 0px) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(25px, -35px) rotate(120deg) scale(1.2);
  }
  66% {
    transform: translate(-25px, -35px) rotate(240deg) scale(0.8);
  }
  100% {
    transform: translate(0px, 0px) rotate(360deg) scale(1);
  }
}

@keyframes pulse-float {
  0%,
  100% {
    transform: scale(1) translateY(0px);
    opacity: 0.15;
  }
  50% {
    transform: scale(1.3) translateY(-20px);
    opacity: 0.3;
  }
}

@keyframes fall-mobile {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.15;
  }
  90% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Enhanced Mouse/Touch Interactions */
@media (hover: hover) {
  .floating-icons i:hover {
    opacity: 0.8 !important;
    transform: scale(2) rotate(180deg) !important;
    color: var(--accent) !important;
    text-shadow:
      0 0 30px var(--accent),
      0 0 60px var(--accent) !important;
    filter: brightness(1.5) saturate(1.8) !important;
    animation: none !important;
    z-index: 1000 !important;
  }
}

/* Mobile Device Shake/Tilt Effects */
@media (max-width: 768px) {
  .floating-icons i {
    animation-duration: 4s;
    font-size: 1.5rem;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  /* Touch interaction for mobile */
  .floating-icons i:active {
    opacity: 0.7 !important;
    transform: scale(1.8) rotate(90deg) !important;
    color: var(--accent) !important;
    text-shadow: 0 0 25px var(--accent) !important;
    filter: brightness(1.3) !important;
  }

  /* Falling animation triggered by device motion */
  .floating-icons i.falling {
    animation: fall-mobile 3s ease-in forwards !important;
    animation-delay: calc(var(--fall-delay, 0) * 0.1s) !important;
  }

  /* Enhanced mobile effects */
  .floating-icons i.shake-effect {
    animation: shake-intense 0.8s ease-in-out infinite !important;
    opacity: 0.4 !important;
  }

  /* Staggered mobile animations */
  .floating-icons i:nth-child(4n + 1) {
    animation-delay: 0.1s;
    --fall-delay: 1;
  }

  .floating-icons i:nth-child(4n + 2) {
    animation-delay: 0.3s;
    --fall-delay: 3;
  }

  .floating-icons i:nth-child(4n + 3) {
    animation-delay: 0.5s;
    --fall-delay: 5;
  }

  .floating-icons i:nth-child(4n) {
    animation-delay: 0.7s;
    --fall-delay: 7;
  }
}

/* Additional shake animation for intense effects */
@keyframes shake-intense {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  10% {
    transform: translateX(-8px) rotate(-5deg);
  }
  20% {
    transform: translateX(8px) rotate(5deg);
  }
  30% {
    transform: translateX(-6px) rotate(-3deg);
  }
  40% {
    transform: translateX(6px) rotate(3deg);
  }
  50% {
    transform: translateX(-4px) rotate(-2deg);
  }
  60% {
    transform: translateX(4px) rotate(2deg);
  }
  70% {
    transform: translateX(-2px) rotate(-1deg);
  }
  80% {
    transform: translateX(2px) rotate(1deg);
  }
  90% {
    transform: translateX(-1px) rotate(-0.5deg);
  }
}

/* ===== GSAP ENHANCED STYLES ===== */

/* GSAP Loader */
.gsap-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.loader-content {
  text-align: center;
  color: white;
}

.loader-text {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, #fff, #f0f0f0, #fff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.loader-progress {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 2rem;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
  background-size: 400% 100%;
  animation: gradient-flow 2s infinite;
  border-radius: 2px;
}

.loader-particles {
  position: relative;
  width: 200px;
  height: 50px;
  margin: 0 auto;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* GSAP Background Animation */
.gsap-bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.geometric-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shape {
  position: absolute;
  opacity: 0.1;
  filter: blur(1px);
}

.triangle {
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 50px solid var(--accent);
  top: 20%;
  left: 10%;
}

.circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent), transparent);
  top: 60%;
  right: 15%;
}

.square {
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, var(--accent), transparent);
  transform: rotate(45deg);
  top: 30%;
  right: 30%;
}

.hexagon {
  width: 60px;
  height: 34.64px;
  background: var(--accent);
  position: relative;
  top: 70%;
  left: 20%;
}

.hexagon:before,
.hexagon:after {
  content: "";
  position: absolute;
  width: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
}

.hexagon:before {
  bottom: 100%;
  border-bottom: 17.32px solid var(--accent);
}

.hexagon:after {
  top: 100%;
  border-top: 17.32px solid var(--accent);
}

/* GSAP Enhanced Link Cards */
.link-card {
  position: relative;
  overflow: hidden;
}

.link-card::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, var(--accent), transparent);
  border-radius: 14px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.link-card:hover::after {
  opacity: 0.3;
}

/* GSAP Text Animations */
.gsap-text-reveal {
  overflow: hidden;
}

.gsap-text-reveal span {
  display: inline-block;
  transform: translateY(100%);
}

/* GSAP Scroll Trigger Elements */
.gsap-fade-in {
  opacity: 0;
  transform: translateY(50px);
}

.gsap-slide-in-left {
  opacity: 0;
  transform: translateX(-100px);
}

.gsap-slide-in-right {
  opacity: 0;
  transform: translateX(100px);
}

.gsap-scale-in {
  opacity: 0;
  transform: scale(0.8);
}

.gsap-rotate-in {
  opacity: 0;
  transform: rotate(-45deg) scale(0.8);
}

/* GSAP Enhanced Floating Buttons */
.floating-btn {
  position: relative;
  overflow: hidden;
}

.floating-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.floating-btn:hover::before {
  width: 200%;
  height: 200%;
}

/* Dark theme enhancements for GSAP elements */
.dark-theme .shape.triangle {
  border-bottom-color: #eeeeee;
}

.dark-theme .shape.circle {
  background: radial-gradient(circle, #eeeeee, transparent);
}

.dark-theme .shape.square {
  background: linear-gradient(45deg, #eeeeee, transparent);
}

.dark-theme .hexagon,
.dark-theme .hexagon:before,
.dark-theme .hexagon:after {
  background: #eeeeee;
  border-bottom-color: #eeeeee;
  border-top-color: #eeeeee;
}

/* Header Layout */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 2rem;
  background: transparent;
  backdrop-filter: none;
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 2rem;
  text-align: center;
}

.title-section {
  flex-grow: 0;
}

.title-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin: 0 0 0.5rem 0;
}

.world-icon {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 2.5rem;
  animation: rotate-earth 8s linear infinite;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
}

/* Controls Layout */
.controls {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* View Toggle Button - Theme Adaptive */
.view-toggle {
  background: var(--bg-primary);
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow);
}

.view-toggle:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.view-toggle i {
  transition: transform 0.3s ease;
}

.view-toggle:hover i {
  transform: scale(1.1);
}

/* Dark theme view toggle */
.dark-theme .view-toggle {
  background: #31363f;
  border-color: #eeeeee;
  color: #eeeeee;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.dark-theme .view-toggle:hover {
  background: #eeeeee;
  color: #31363f;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Old button styles removed - now using floating action buttons */

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Link List Layouts */
.link-list {
  margin-bottom: 2rem;
}

/* Grid View */
.link-list.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* List View */
.link-list.list-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Link Card Styles */
.link-card {
  background: var(--color-1);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.link-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px var(--shadow);
  border-color: var(--text-primary);
}

/* Indicate card is clickable */
.link-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  transition: background 0.3s ease;
  pointer-events: none;
}

.link-card:hover::before {
  background: rgba(0, 0, 0, 0.02);
}

.dark-theme .link-card:hover::before {
  background: rgba(255, 255, 255, 0.05);
}

.link-card.color-1 {
  background: var(--color-1);
}
.link-card.color-2 {
  background: var(--color-2);
}
.link-card.color-3 {
  background: var(--color-3);
}
.link-card.color-4 {
  background: var(--color-4);
}
.link-card.color-5 {
  background: var(--color-5);
}
.link-card.color-6 {
  background: var(--color-6);
}
.link-card.color-7 {
  background: var(--color-7);
}
.link-card.color-8 {
  background: var(--color-8);
}
.link-card.color-9 {
  background: var(--color-9);
}
.link-card.color-10 {
  background: var(--color-10);
}

.link-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.link-icon {
  font-size: 2rem;
  margin-right: 1rem;
  color: var(--text-primary);
  opacity: 0.8;
  transition: all 0.3s ease;
}

/* Dark theme link icon */
.dark-theme .link-icon {
  color: #000000;
  opacity: 0.9;
}

.link-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.link-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.link-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.link-url {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.9rem;
  word-break: break-all;
  transition: all 0.2s ease;
}

.link-actions {
  display: flex;
  gap: 0.5rem;
  pointer-events: auto;
  z-index: 10;
  position: relative;
}

.link-actions button {
  background: var(--bg-primary);
  border: 2px solid var(--text-primary);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  color: var(--text-primary);
  box-shadow: 0 2px 6px var(--shadow);
  opacity: 0.8;
}

.link-actions button:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: scale(1.1);
  opacity: 1;
  box-shadow: 0 4px 10px var(--shadow);
}

.link-actions button i {
  transition: transform 0.3s ease;
}

.link-actions button:hover i {
  transform: scale(1.1);
}

/* Dark theme link actions */
.dark-theme .link-actions button {
  background: #31363f;
  border-color: #eeeeee;
  color: #eeeeee;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
}

.dark-theme .link-actions button:hover {
  background: #eeeeee;
  color: #31363f;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
}

/* Admin Controls */
.admin-controls {
  text-align: center;
  margin: 2rem 0;
}

.btn {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: 2px solid var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px var(--shadow);
}

.btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.btn i {
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: scale(1.1);
}

/* Dark theme button */
.dark-theme .btn {
  background: #eeeeee;
  color: #31363f;
  border-color: #eeeeee;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.dark-theme .btn:hover {
  background: #31363f;
  color: #eeeeee;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-bg);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--bg-primary);
  margin: 10% auto;
  padding: 2.5rem;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

/* Modal Header */
.modal-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.5rem;
}

.modal-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  opacity: 0.8;
}

.modal h2 {
  margin-bottom: 2rem;
  color: var(--text-primary);
  text-align: center;
  font-weight: 600;
}

/* Login Form Specific Styles */
#loginForm {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#loginForm input[type="password"] {
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  text-align: center;
}

#loginForm input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
  background: var(--bg-primary);
}

#loginForm input[type="password"]::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
}

#loginForm .btn {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#loginForm .btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow);
}

/* Dark theme login button */
.dark-theme #loginForm .btn {
  background: #eeeeee;
  color: #31363f;
  border-color: #eeeeee;
}

.dark-theme #loginForm .btn:hover {
  background: #31363f;
  color: #eeeeee;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Icon Selector */
.icon-selector {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.icon-selector input {
  flex: 1;
}

.selected-icon {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  min-width: 50px;
  text-align: center;
}

.selected-icon i {
  font-size: 1.25rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

/* Dark theme selected icon */
.dark-theme .selected-icon i {
  color: #eeeeee;
}

.icon-suggestions {
  display: none;
  position: absolute;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  z-index: 10;
  box-shadow: 0 4px 12px var(--shadow);
}

.icon-suggestions.show {
  display: block;
}

.icon-suggestion {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background 0.2s ease;
}

.icon-suggestion:hover {
  background: var(--bg-secondary);
}

.icon-suggestion:last-child {
  border-bottom: none;
}

.icon-suggestion i {
  color: var(--text-primary);
  width: 20px;
  text-align: center;
  transition: color 0.3s ease;
}

/* Dark theme icon suggestions */
.dark-theme .icon-suggestion i {
  color: #eeeeee;
}

/* Color Picker */
.color-picker {
  margin-top: 0.5rem;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

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

.color-option:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

.color-option.selected {
  border-color: var(--accent);
  transform: scale(1.1);
}

.color-option::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.color-option.selected::after {
  opacity: 1;
}

.selected-color-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.color-preview {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 2px solid var(--border);
}

#selectedColorName {
  font-weight: 500;
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    position: relative; /* Reset position for mobile */
  }

  .controls {
    position: static; /* Reset absolute positioning */
    transform: none; /* Reset transform */
    width: 100%;
    justify-content: center;
  }

  .title-section h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .link-list.grid-view {
    grid-template-columns: 1fr;
  }

  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }

  .color-options {
    grid-template-columns: repeat(5, 1fr);
  }

  /* Mobile floating buttons */
  .floating-buttons {
    bottom: 1rem;
    right: 1rem;
    gap: 0.75rem;
  }

  .floating-btn {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.link-card {
  animation: fadeIn 0.5s ease forwards;
}

/* Dark theme specific adjustments */
.dark-theme .floating-icons i {
  opacity: 0.15;
  color: #eeeeee;
}

.dark-theme .modal {
  background: rgba(0, 0, 0, 0.8);
}

.dark-theme .modal-content {
  background: #31363f;
  color: #eeeeee;
}

.dark-theme .modal h2,
.dark-theme .modal-header h2 {
  color: #eeeeee;
}

.dark-theme .modal-subtitle {
  color: #bbbbbb;
}

.dark-theme input:focus,
.dark-theme textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.dark-theme .form-group label {
  color: #eeeeee;
}

.dark-theme .form-group input,
.dark-theme .form-group textarea {
  background: #222831;
  color: #eeeeee;
  border-color: #eeeeee;
}

.dark-theme .selected-icon {
  background: #222831;
  border-color: #eeeeee;
}

.dark-theme .link-card {
  color: #eeeeee;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
}

.dark-theme .link-card:hover {
  box-shadow: 0 12px 40px rgba(255, 255, 255, 0.1);
}

.dark-theme .card-icon {
  color: #eeeeee;
}

.dark-theme .card-content h3 {
  color: #eeeeee;
}

.dark-theme .card-content p {
  color: #bbbbbb;
}

/* Dark theme text elements - Black text on cards */
.dark-theme .link-title {
  color: #000000 !important;
}

.dark-theme .link-description {
  color: #333333 !important;
}

.dark-theme .link-url {
  color: #666666 !important;
}

/* Dark theme world icon filter */
.dark-theme .world-icon {
  filter: brightness(1.2) contrast(1.1);
}

/* Dark theme automatically handled by CSS variables */

/* Add keyframe for earth rotation */
@keyframes rotate-earth {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Floating Action Buttons - Updated for Theme Adaptation */
.floating-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
}

.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--text-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow);
  transition: all var(--transition-speed) ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* Remove specific colors - use theme adaptive colors */

.floating-btn i {
  transition: transform var(--transition-speed) ease;
}

.floating-btn:hover i {
  transform: scale(1.1);
}

/* Dark theme floating buttons */
.dark-theme .floating-btn {
  background: #31363f;
  color: #eeeeee;
  border-color: #eeeeee;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.dark-theme .floating-btn:hover {
  background: #eeeeee;
  color: #31363f;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* Admin and theme buttons now inherit base floating button styles */

/* Update existing theme toggle styles */
.dark-theme .floating-btn.theme-toggle i::before {
  content: "\f185"; /* sun icon */
}

/* Loading Indicator */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-indicator p {
  color: var(--text-secondary);
  margin: 0;
}

/* General Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Comprehensive Dark Theme Text Fixes */
.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme h4,
.dark-theme h5,
.dark-theme h6 {
  color: #eeeeee !important;
}

.dark-theme p {
  color: #bbbbbb !important;
}

.dark-theme .subtitle {
  color: #bbbbbb !important;
}

.dark-theme .loading-indicator p {
  color: #bbbbbb !important;
}

.dark-theme #selectedColorName {
  color: #eeeeee;
}

.dark-theme .icon-suggestions {
  background: #31363f;
  border-color: #eeeeee;
  color: #eeeeee;
}

.dark-theme .icon-suggestion {
  color: #eeeeee;
  border-bottom-color: #eeeeee;
}

.dark-theme .icon-suggestion:hover {
  background: #222831;
}

/* Sync Notification Styles */
.sync-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  max-width: 350px;
  backdrop-filter: blur(10px);
}

.sync-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sync-icon {
  color: var(--accent);
  font-size: 20px;
  margin-top: 2px;
  animation: spin 2s linear infinite;
}

.sync-text {
  flex: 1;
}

.sync-text strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.sync-text p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.sync-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.sync-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.refresh-btn {
  background: var(--accent);
  color: white;
}

.refresh-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.dismiss-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.dismiss-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .sync-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* Drag and Drop Styles */
.link-card.draggable {
  cursor: grab;
  transition: all 0.3s ease;
}

.link-card.draggable:active {
  cursor: grabbing;
}

.link-card.dragging {
  opacity: 0.5;
  transform: rotate(5deg) scale(1.05);
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.link-card.drag-over {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
  border: 2px dashed var(--accent);
}

.link-list.sortable {
  min-height: 200px;
}

.drag-placeholder {
  height: 150px;
  border: 2px dashed var(--accent);
  border-radius: 12px;
  background: rgba(0, 123, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 500;
  margin: 1rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.drag-placeholder::before {
  content: "📦 Drop here to reorder";
  font-size: 1.1rem;
}

.link-card:not(.dragging) {
  transition: transform 0.3s ease;
}

/* Admin mode visual indicator */
.admin-mode .link-card.draggable::before {
  content: "⋮⋮";
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--text-secondary);
  font-size: 16px;
  opacity: 0.6;
  z-index: 1;
  pointer-events: none;
}

.admin-mode .link-card.draggable:hover::before {
  opacity: 1;
  color: var(--accent);
}

/* Dark theme adjustments */
.dark-theme .drag-placeholder {
  background: rgba(13, 110, 253, 0.1);
  border-color: var(--accent);
}

.dark-theme .link-card.drag-over {
  box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
}

/* Reorder Success Notification */
.reorder-notification {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.reorder-notification i {
  font-size: 16px;
}

/* Mobile drag and drop adjustments */
@media (max-width: 768px) {
  .drag-placeholder::before {
    content: "📱 Drop here";
    font-size: 1rem;
  }

  .admin-mode .link-card.draggable::before {
    top: 8px;
    right: 8px;
    font-size: 14px;
  }
}
