@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --fire-red: #e63946;
  --flame-orange: #f4a261;
  --golden: #f7c948;
  --amber: #e8a838;
  --dark: #0d0500;
  --dark-card: rgba(12, 5, 1, 0.65);
  --cream: #fff9f0;
  --glow-red: rgba(230, 57, 70, 0.45);
  --glow-orange: rgba(244, 162, 97, 0.4);
  --glow-golden: rgba(247, 201, 72, 0.4);
  --glass-border: rgba(255, 200, 100, 0.12);
  --glass-border-hover: rgba(247, 201, 72, 0.35);
  --radius-card: 20px;
  --radius-icon: 14px;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dark);
  color: #fff;
}

/* ===== VIDEO BACKGROUND ===== */
.video-bg-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--dark);
}

.video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.7;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(230, 57, 70, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(13, 5, 0, 0.95) 0%, transparent 70%),
    linear-gradient(
      to bottom,
      rgba(13, 5, 0, 0.55) 0%,
      rgba(13, 5, 0, 0.25) 25%,
      rgba(13, 5, 0, 0.30) 50%,
      rgba(13, 5, 0, 0.60) 75%,
      rgba(13, 5, 0, 0.85) 100%
    );
}

/* ===== DECORATIVE ELEMENTS ===== */
.decorative-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 1;
  pointer-events: none;
  will-change: transform, opacity;
}

.orb-1 {
  width: 300px;
  height: 300px;
  top: -80px;
  left: -80px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.25), transparent 70%);
  animation: orbFloat 12s ease-in-out infinite;
}

.orb-2 {
  width: 250px;
  height: 250px;
  bottom: -60px;
  right: -60px;
  background: radial-gradient(circle, rgba(247, 201, 72, 0.2), transparent 70%);
  animation: orbFloat 15s ease-in-out infinite reverse;
}

.orb-3 {
  width: 180px;
  height: 180px;
  top: 40%;
  right: -40px;
  background: radial-gradient(circle, rgba(244, 162, 97, 0.15), transparent 70%);
  animation: orbFloat 10s ease-in-out infinite 3s;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.7;
  }
  33% {
    transform: translate(15px, -20px) scale(1.15);
    opacity: 1;
  }
  66% {
    transform: translate(-10px, 10px) scale(0.95);
    opacity: 0.8;
  }
}

/* ===== MAIN LAYOUT ===== */
.linktree-root {
  min-height: 100svh;
  min-height: -webkit-fill-available;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vh, 3rem) 1.25rem clamp(1.2rem, 3vh, 2rem);
  min-height: 100svh;
  min-height: -webkit-fill-available;
  gap: clamp(1.4rem, 3.5vh, 2.2rem);
}

/* ===== HEADER ===== */
.header-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.6rem, 2vh, 1rem);
}

/* ===== LOGO ===== */
.logo-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.logo-glow-ring {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: transparent;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow:
      0 0 20px var(--glow-golden),
      0 0 50px var(--glow-orange),
      0 0 80px var(--glow-red);
    opacity: 0.6;
  }
  50% {
    box-shadow:
      0 0 35px var(--glow-golden),
      0 0 70px var(--glow-orange),
      0 0 120px var(--glow-red);
    opacity: 1;
  }
}

.logo-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(247, 201, 72, 0.4);
  box-shadow:
    0 0 15px var(--glow-golden),
    0 0 35px var(--glow-orange),
    0 0 60px rgba(230, 57, 70, 0.25),
    inset 0 0 25px rgba(0, 0, 0, 0.5);
  animation: logoBorderGlow 4s ease-in-out infinite;
}

@keyframes logoBorderGlow {
  0%, 100% { border-color: rgba(247, 201, 72, 0.4); }
  50% { border-color: rgba(244, 162, 97, 0.7); }
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== BRAND TEXT ===== */
.brand-text {
  text-align: center;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 7vw, 2.1rem);
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 25px var(--glow-golden),
    0 0 50px var(--glow-orange),
    0 2px 12px rgba(0, 0, 0, 0.9);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: clamp(0.6rem, 2.5vw, 0.72rem);
  font-weight: 600;
  color: var(--flame-orange);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 0.35rem;
  opacity: 0.85;
}

.brand-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.divider-line {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247, 201, 72, 0.45), transparent);
}

.divider-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--golden);
  box-shadow: 0 0 8px var(--glow-golden);
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.6); }
}

/* ===== LINKS CONTAINER ===== */
.links-container {
  display: flex;
  flex-direction: column;
  gap: clamp(0.7rem, 2vh, 0.9rem);
  width: 100%;
}

/* ===== LINK BUTTON - PREMIUM GLASS CARD ===== */
.link-button {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: var(--radius-card);
  overflow: hidden;
  background:
    linear-gradient(135deg,
      rgba(20, 10, 2, 0.7) 0%,
      rgba(30, 14, 4, 0.75) 50%,
      rgba(20, 10, 2, 0.7) 100%
    );
  border: 1px solid var(--glass-border);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  animation: slideInCard 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 220, 130, 0.06) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset;
  will-change: transform;
}

.link-button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(247, 201, 72, 0.15) 0%,
    rgba(244, 162, 97, 0.08) 40%,
    transparent 60%,
    rgba(247, 201, 72, 0.1) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.link-button:nth-child(1) { animation-delay: 0.08s; }
.link-button:nth-child(2) { animation-delay: 0.16s; }
.link-button:nth-child(3) { animation-delay: 0.24s; }
.link-button:nth-child(4) { animation-delay: 0.32s; }
.link-button:nth-child(5) { animation-delay: 0.40s; }

@keyframes slideInCard {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hover - Desktop */
.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--glass-border-hover);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(247, 201, 72, 0.15),
    0 0 40px rgba(244, 162, 97, 0.12),
    0 1px 0 rgba(255, 220, 130, 0.12) inset;
}

.link-button:hover::before {
  opacity: 1;
}

.link-button:hover .link-shine {
  left: 130%;
  transition: left 0.6s ease;
}

.link-button:hover .link-icon-wrap svg {
  transform: rotate(6deg) scale(1.1);
}

.link-button:hover .arrow-icon {
  transform: translateX(4px);
  color: var(--golden);
}

.link-button:hover .link-icon-wrap {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(var(--accent-r, 247), var(--accent-g, 201), var(--accent-b, 72), 0.15);
}

/* Active - touch feedback for mobile */
.link-button:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
  border-color: rgba(247, 201, 72, 0.5);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(244, 162, 97, 0.15),
    0 0 0 1px rgba(247, 201, 72, 0.25);
}

/* ===== LINK INNER LAYOUT ===== */
.link-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1rem);
  padding: clamp(0.9rem, 3vw, 1.1rem) clamp(0.9rem, 3vw, 1.15rem);
}

/* ===== LINK ICON - PREMIUM ===== */
.link-icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-icon);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.link-icon-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 60%);
  pointer-events: none;
}

.link-icon-wrap svg {
  width: 22px;
  height: 22px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block;
  position: relative;
  z-index: 1;
}

/* ===== LINK TEXT ===== */
.link-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.link-label {
  font-size: clamp(0.95rem, 4vw, 1.05rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
}

.link-desc {
  font-size: clamp(0.7rem, 2.8vw, 0.78rem);
  color: rgba(255, 210, 150, 0.55);
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* ===== ARROW ===== */
.link-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: rgba(247, 201, 72, 0.35);
  padding-left: 0.2rem;
}

.arrow-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease, color 0.3s ease;
}

/* ===== SHINE EFFECT ===== */
.link-shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 100%
  );
  z-index: 3;
  transition: left 0s;
  pointer-events: none;
}

/* ===== ACCENT GLOW PER BUTTON ===== */
.link-button[data-accent="golden"] .link-icon-wrap {
  box-shadow: 0 0 0 rgba(247, 201, 72, 0);
}
.link-button[data-accent="golden"]:active .link-icon-wrap,
.link-button[data-accent="golden"]:hover .link-icon-wrap {
  box-shadow: 0 0 18px rgba(247, 201, 72, 0.2);
}

.link-button[data-accent="orange"] .link-icon-wrap {
  box-shadow: 0 0 0 rgba(244, 162, 97, 0);
}
.link-button[data-accent="orange"]:active .link-icon-wrap,
.link-button[data-accent="orange"]:hover .link-icon-wrap {
  box-shadow: 0 0 18px rgba(244, 162, 97, 0.2);
}

.link-button[data-accent="red"] .link-icon-wrap {
  box-shadow: 0 0 0 rgba(230, 57, 70, 0);
}
.link-button[data-accent="red"]:active .link-icon-wrap,
.link-button[data-accent="red"]:hover .link-icon-wrap {
  box-shadow: 0 0 18px rgba(230, 57, 70, 0.2);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  animation: fadeInUp 0.8s ease-out 0.8s both;
  padding-bottom: env(safe-area-inset-bottom, 0.5rem);
}

.footer p {
  font-size: 0.6rem;
  color: rgba(244, 162, 97, 0.25);
  letter-spacing: 0.06em;
  font-weight: 400;
}

/* ===== MOBILE-FIRST RESPONSIVE ===== */

/* Very small phones (iPhone SE, etc.) */
@media (max-height: 680px) {
  .content-wrapper {
    gap: clamp(0.8rem, 2vh, 1.2rem);
    padding: 1rem 1rem 0.8rem;
    justify-content: flex-start;
    padding-top: clamp(1rem, 3vh, 1.5rem);
  }
  .logo-wrapper {
    width: 100px;
    height: 100px;
  }
  .logo-glow-ring {
    width: 135px;
    height: 135px;
  }
  .brand-title {
    font-size: 1.35rem;
  }
  .link-inner {
    padding: 0.75rem 0.85rem;
  }
  .link-icon-wrap {
    width: 42px;
    height: 42px;
  }
  .links-container {
    gap: 0.55rem;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .content-wrapper {
    padding: 1.2rem 0.9rem 0.8rem;
  }
  .logo-wrapper {
    width: 110px;
    height: 110px;
  }
  .logo-glow-ring {
    width: 145px;
    height: 145px;
  }
  .link-inner {
    padding: 0.8rem 0.85rem;
    gap: 0.7rem;
  }
  .link-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }
  .link-icon-wrap svg {
    width: 19px;
    height: 19px;
  }
  .links-container {
    gap: 0.6rem;
  }
}

/* Standard phones (375-428px) */
@media (min-width: 381px) and (max-width: 428px) {
  .content-wrapper {
    padding: 1.5rem 1.1rem 1.2rem;
  }
}

/* Large phones / small tablets */
@media (min-width: 429px) {
  .content-wrapper {
    padding: 2rem 1.5rem;
  }
  .logo-wrapper {
    width: 140px;
    height: 140px;
  }
  .logo-glow-ring {
    width: 180px;
    height: 180px;
  }
}

/* Tablets & Desktop */
@media (min-width: 600px) {
  .content-wrapper {
    padding: 2.5rem 1.5rem;
    max-width: 460px;
  }
  .logo-wrapper {
    width: 150px;
    height: 150px;
  }
  .logo-glow-ring {
    width: 190px;
    height: 190px;
  }
  .link-icon-wrap {
    width: 54px;
    height: 54px;
  }
  .link-icon-wrap svg {
    width: 24px;
    height: 24px;
  }
}

/* Touch devices - better active states, no hover */
@media (hover: none) and (pointer: coarse) {
  .link-button:hover {
    transform: none;
    box-shadow:
      0 4px 20px rgba(0, 0, 0, 0.4),
      0 1px 0 rgba(255, 220, 130, 0.06) inset;
    border-color: var(--glass-border);
  }
  .link-button:hover::before {
    opacity: 0;
  }
  .link-button:hover .link-icon-wrap {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }
  .link-button:hover .link-icon-wrap svg {
    transform: none;
  }
  .link-button:hover .arrow-icon {
    transform: none;
    color: rgba(247, 201, 72, 0.35);
  }

  .link-button:active {
    transform: scale(0.97);
    border-color: rgba(247, 201, 72, 0.45);
    background:
      linear-gradient(135deg,
        rgba(30, 14, 4, 0.85) 0%,
        rgba(40, 18, 6, 0.9) 50%,
        rgba(30, 14, 4, 0.85) 100%
      );
    box-shadow:
      0 0 30px rgba(244, 162, 97, 0.15),
      0 0 0 1px rgba(247, 201, 72, 0.2),
      0 1px 0 rgba(255, 220, 130, 0.1) inset;
    transition-duration: 0.08s;
  }
  .link-button:active::before {
    opacity: 1;
  }
  .link-button:active .link-icon-wrap {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
  }
}

/* Safe area for notch phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .content-wrapper {
    padding-bottom: calc(clamp(1rem, 3vh, 2rem) + env(safe-area-inset-bottom));
    padding-top: calc(clamp(1.5rem, 4vh, 3rem) + env(safe-area-inset-top));
  }
}

/* Landscape on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .content-wrapper {
    min-height: auto;
    padding: 1rem;
    gap: 0.6rem;
    justify-content: flex-start;
  }
  .logo-wrapper {
    width: 70px;
    height: 70px;
  }
  .logo-glow-ring {
    width: 95px;
    height: 95px;
  }
  .brand-title {
    font-size: 1.2rem;
  }
  .brand-subtitle {
    font-size: 0.55rem;
  }
  .brand-divider {
    margin-top: 0.3rem;
  }
  .link-inner {
    padding: 0.6rem 0.8rem;
  }
  .link-icon-wrap {
    width: 36px;
    height: 36px;
  }
  .link-icon-wrap svg {
    width: 16px;
    height: 16px;
  }
  .links-container {
    gap: 0.4rem;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
