/* ============================================
   MELBET Partner Landing - Same Visual Identity
   Light theme • Orange & Golden Yellow • Noto Sans Arabic
   ============================================ */

/* CSS Variables - Matching MELBET Partner Promocode */
:root {
  --bg-light: #f5f0e8;
  --bg-cream: #fedbbb;
  --bg-white: #ffffff;
  --orange: #ff7a00;
  --orange-dark: #e66d00;
  --gold: #f7bc19;
  --gold-bright: #ffbc00;
  --text-dark: #020202;
  --text-gray: #212121;
  --shadow-card: 0 0 1em 0 rgba(30, 30, 30, 0.3);
  --shadow-soft: 0 0 0.5em 0 rgba(155, 115, 4, 0.3);
  --font-main: 'Noto Sans Arabic', sans-serif;
  --transition: 0.3s ease;
  --radius: 2em;
  --radius-sm: 1em;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body.page {
  font-family: var(--font-main);
  background: linear-gradient(180deg, #fef8f0 0%, var(--bg-cream) 40%, #f5e6d3 100%);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 700;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== MELBET Animated Backgrounds ========== */
.main-bg-1,
.main-bg-2,
.main-bg-small,
.logo-bg,
.glow-bg,
.sparkles,
.deco-header-main,
.deco-header-ball-small,
.deco-dice-1-main,
.deco-dice-2-main,
.deco-promo-box,
.deco-promo-ball {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.main-bg-1 {
  width: 140%;
  height: 75vh;
  position: fixed;
  top: 45%;
  right: 50%;
  transform: translate(75%, -35%) scaleX(-1) translateZ(0);
  background: url(images/main-bg.png) no-repeat center center/contain;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

.main-bg-2 {
  width: 120%;
  height: 60vh;
  position: fixed;
  top: -15%;
  right: 50%;
  transform: translate(5%, 0) scaleX(-1) translateZ(0);
  background: url(images/main-bg-top.png) no-repeat center center/contain;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

.main-bg-small {
  width: 180%;
  height: 90vh;
  position: fixed;
  bottom: -25%;
  left: 50%;
  transform: translate(-50%, 0) translateZ(0);
  background: url(images/main-bg-small.png) no-repeat center center/contain;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

/* ========== MELBET Animated Decorations ========== */
/* MELBET Logo - prominent at top */
.melbet-logo {
  width: 100%;
  max-width: 200px;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s ease-out;
  position: relative;
  filter: drop-shadow(0 0 8px rgba(255, 188, 0, 0.3));
  transition: filter 0.4s ease;
}

.melbet-logo:hover {
  filter: drop-shadow(0 0 15px rgba(255, 188, 0, 0.5));
}

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

.deco-header-main {
  width: 55%;
  height: 280px;
  position: fixed;
  top: 12%;
  right: 0;
  transform: translateZ(0);
  z-index: 1;
  pointer-events: none;
}

.deco-header-main .deco-header-box,
.deco-header-main .deco-header-ball {
  position: absolute;
  inset: 0;
}

.deco-header-box {
  width: 100%;
  height: 100%;
  background: url(images/header-box.png) no-repeat center center/contain;
  background-size: contain;
  animation: melbet-header-box 10s infinite linear;
}

.deco-header-ball {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: url(images/header-ball.png) no-repeat center center/contain;
  background-size: contain;
  animation: melbet-header-ball 10s infinite linear;
  transform: scaleX(-1);
}

@keyframes melbet-header-box {
  from, 50%, to { transform: translate(0, 0) rotate(0) scale(1); }
  25% { transform: translate(0, 0) rotate(10deg) scale(1.05); }
  75% { transform: translate(-2%, 0) rotate(10deg) scale(1); }
}

@keyframes melbet-header-ball {
  from, 50%, to { transform: translate(0, 0) rotate(0) scale(-1, 1); }
  25% { transform: translate(-7%, 0) rotate(-10deg) scale(-1.05, 1.05); }
  75% { transform: translate(-2%, -2%) rotate(8deg) scale(-0.95, 0.95); }
}

.deco-header-ball-small {
  width: 140px;
  height: 140px;
  position: fixed;
  top: 5%;
  left: 2%;
  background: url(images/header-ball-small.png) no-repeat center center/contain;
  background-size: contain;
  z-index: 1;
  pointer-events: none;
  transform: scaleX(-1) translateZ(0);
  animation: melbet-ball-small 10s infinite linear;
}

@keyframes melbet-ball-small {
  from, to { transform: translate(0, 0) rotate(0) scale(-1, 1); }
  25% { transform: translate(10%, -10%) rotate(3deg) scale(-1, 1); }
  50% { transform: translate(20%, 10%) rotate(3deg) scale(-1, 1); }
  75% { transform: translate(-10%, 6%) rotate(0) scale(-1, 1); }
}

.deco-dice-1-main {
  width: 110px;
  height: 170px;
  position: fixed;
  top: 22%;
  right: 8%;
  transform: translateZ(0);
  z-index: 1;
  pointer-events: none;
}

.deco-dice-1-main .deco-dice-1,
.deco-dice-1-main .deco-dice-1-bg {
  position: absolute;
  inset: 0;
}

.deco-dice-1 {
  width: 100%;
  height: 100%;
  background: url(images/header-dice.png) no-repeat center center/contain;
  animation: melbet-dice-1 10s infinite linear;
}

.deco-dice-1-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: url(images/dice-bg.png) no-repeat center center/contain;
}

@keyframes melbet-dice-1 {
  from, 50%, to { transform: translate(0, 0) rotate(0) scale(1); }
  25% { transform: translate(1%, -6%) rotate(0) scale(1); }
  75% { transform: translate(-7%, -6%) rotate(0) scale(1); }
}

.deco-dice-2-main {
  width: 95px;
  height: 150px;
  position: fixed;
  bottom: 30%;
  right: -2%;
  transform: translateZ(0);
  z-index: 1;
  pointer-events: none;
}

.deco-dice-2 {
  width: 100%;
  height: 100%;
  background: url(images/header-dice.png) no-repeat center center/contain;
  animation: melbet-dice-2 10s infinite linear;
}

@keyframes melbet-dice-2 {
  from, 50%, to { transform: translate(0, 0) rotate(50deg) scale(1); }
  25% { transform: translate(3%, -3%) rotate(50deg) scale(1); }
  75% { transform: translate(-3%, -4%) rotate(50deg) scale(1); }
}

.deco-promo-box {
  width: 180px;
  height: 150px;
  position: fixed;
  bottom: 8%;
  right: -8%;
  transform: translateZ(0);
  background: url(images/promo-box.png) no-repeat center center/contain;
  background-size: contain;
  z-index: 1;
  pointer-events: none;
  animation: melbet-promo-box 10s infinite linear;
}

.deco-promo-ball {
  width: 180px;
  height: 150px;
  position: fixed;
  bottom: 5%;
  right: -5%;
  transform: translateZ(0);
  background: url(images/promo-ball.png) no-repeat center center/contain;
  background-size: contain;
  z-index: 1;
  pointer-events: none;
  animation: melbet-promo-ball 10s infinite linear;
}

@keyframes melbet-promo-box {
  from, 50%, to { transform: translate(0, 0) rotate(0) scale(1); }
  25% { transform: translate(-1%, 0) rotate(-2deg) scale(1); }
  75% { transform: translate(1%, 0) rotate(-5deg) scale(1); }
}

@keyframes melbet-promo-ball {
  from, 50%, to { transform: translate(0, 0) rotate(0) scale(1); }
  25% { transform: translate(-5%, -3%) rotate(10deg) scale(1); }
  75% { transform: translate(5%, -2%) rotate(-4deg) scale(1); }
}

@media (min-width: 480px) {
  .melbet-logo { max-width: 220px; margin-bottom: 1.75rem; }
  .deco-header-main { width: 50%; height: 260px; top: 10%; }
  .deco-header-ball-small { width: 160px; height: 160px; top: 4%; left: 1%; }
  .deco-dice-1-main { width: 130px; height: 200px; top: 18%; right: 5%; }
  .deco-dice-2-main { width: 110px; height: 170px; bottom: 25%; right: -3%; }
  .deco-promo-box, .deco-promo-ball { width: 220px; height: 180px; bottom: 5%; }
}

@media (min-width: 768px) {
  .melbet-logo { max-width: 260px; margin-bottom: 2rem; }
  .deco-header-main { width: 45%; height: 320px; top: 8%; right: 2%; }
  .deco-header-ball-small { width: 200px; height: 200px; top: 3%; left: 2%; }
  .deco-dice-1-main { width: 150px; height: 230px; top: 15%; right: 8%; }
  .deco-dice-2-main { width: 130px; height: 200px; bottom: 22%; right: 0; }
  .deco-promo-box, .deco-promo-ball { width: 260px; height: 220px; bottom: 3%; }
}

/* Logo Background - MELBET watermark */
.logo-bg {
  position: fixed;
  inset: 0;
  transform: translateZ(0);
  pointer-events: none;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: minmax(80px, 1fr);
  align-items: center;
  justify-items: center;
  padding: 1rem;
  gap: 0.25rem;
}

.logo-bg span {
  font-family: var(--font-main);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--gold);
  opacity: 0.08;
  letter-spacing: 0.08em;
  user-select: none;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .logo-bg {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(70px, 1fr);
  }
}

/* ========== Mobile View - تناسق الصور والنصوص ========== */
@media (max-width: 480px) {
  .melbet-logo {
    max-width: 160px;
    margin-bottom: 1rem;
  }

  .deco-header-main {
    width: 45%;
    height: 180px;
    top: 8%;
    right: -5%;
    opacity: 0.85;
  }

  .deco-header-ball-small {
    width: 90px;
    height: 90px;
    top: 6%;
    left: -2%;
    opacity: 0.9;
  }

  .deco-dice-1-main {
    width: 70px;
    height: 110px;
    top: 20%;
    right: 2%;
    opacity: 0.85;
  }

  .deco-dice-2-main {
    width: 55px;
    height: 90px;
    bottom: 38%;
    right: -5%;
    opacity: 0.85;
  }

  .deco-promo-box,
  .deco-promo-ball {
    width: 110px;
    height: 90px;
    bottom: 12%;
    right: -12%;
    opacity: 0.9;
  }

  .main-bg-1,
  .main-bg-2,
  .main-bg-small {
    opacity: 0.88;
  }

  .container {
    padding: 1.5rem 1rem 2.5rem;
  }

  .hero .name {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 900;
  }

  .hero .tagline {
    font-size: 0.85rem;
    color: var(--text-gray);
  }

  .flags-row .flag {
    font-size: 1.5rem;
  }

  .profile-wrapper {
    width: 100px;
    height: 100px;
  }

  .profile-picture {
    width: 100px;
    height: 100px;
    border-width: 2px;
    box-shadow: 0 0 15px rgba(255, 188, 0, 0.5), 0 0 30px rgba(255, 122, 0, 0.25);
  }

  .link-btn {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
    color: var(--text-dark);
  }

  .link-btn .icon {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
  }

  .link-btn .platform-name {
    color: var(--text-dark);
    font-weight: 900;
  }

  .footer p {
    font-size: 0.75rem;
    color: var(--text-gray);
  }
}

/* Background - MELBET style */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateZ(0);
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 218, 187, 0.6), transparent 60%),
    radial-gradient(ellipse 80% 50% at 80% 100%, rgba(255, 188, 0, 0.15), transparent),
    radial-gradient(ellipse 80% 50% at 20% 100%, rgba(255, 122, 0, 0.1), transparent);
  animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Floating sparkles */
.sparkles {
  position: fixed;
  inset: 0;
  transform: translateZ(0);
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(255, 188, 0, 0.9) 0%, rgba(255, 122, 0, 0.5) 50%, transparent 100%);
  border-radius: 50%;
  animation: sparkleFloat 6s ease-in-out infinite;
}

.sparkle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 5s; }
.sparkle:nth-child(2) { left: 25%; top: 60%; animation-delay: 0.8s; animation-duration: 7s; }
.sparkle:nth-child(3) { left: 45%; top: 15%; animation-delay: 1.5s; animation-duration: 6s; }
.sparkle:nth-child(4) { left: 70%; top: 45%; animation-delay: 0.3s; animation-duration: 8s; }
.sparkle:nth-child(5) { left: 85%; top: 75%; animation-delay: 2s; animation-duration: 5.5s; }
.sparkle:nth-child(6) { left: 15%; top: 85%; animation-delay: 1.2s; animation-duration: 6.5s; }
.sparkle:nth-child(7) { left: 55%; top: 90%; animation-delay: 0.5s; animation-duration: 7.5s; }
.sparkle:nth-child(8) { left: 90%; top: 25%; animation-delay: 1.8s; animation-duration: 5.8s; }

@keyframes sparkleFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translate(15px, -20px) scale(1.3);
    opacity: 1;
  }
  50% {
    transform: translate(-10px, 15px) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translate(20px, 10px) scale(1.2);
    opacity: 1;
  }
}

/* Main Container */
.container {
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========== Hero Section ========== */
.hero {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1.25rem;
  width: 120px;
  height: 120px;
}

.profile-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 188, 0, 0.4) 0%, rgba(255, 122, 0, 0.2) 40%, transparent 70%);
  animation: profileGlow 3s ease-in-out infinite;
  z-index: -1;
}

@keyframes profileGlow {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.profile-picture {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 0 25px rgba(255, 188, 0, 0.6), 0 0 50px rgba(255, 122, 0, 0.3);
  transition: var(--transition);
  display: block;
  animation: profileShine 4s ease-in-out infinite;
}

@keyframes profileShine {
  0%, 100% { box-shadow: 0 0 25px rgba(255, 188, 0, 0.6), 0 0 50px rgba(255, 122, 0, 0.3); }
  50% { box-shadow: 0 0 35px rgba(255, 188, 0, 0.8), 0 0 70px rgba(255, 122, 0, 0.4); }
}

.profile-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bg-white);
  border: 3px solid var(--gold);
  color: var(--orange);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

.profile-placeholder.show {
  display: flex;
}

.profile-placeholder svg {
  width: 60px;
  height: 60px;
}

.profile-picture:hover {
  transform: scale(1.08);
  box-shadow: 0 0 40px rgba(255, 188, 0, 0.9), 0 0 80px rgba(255, 122, 0, 0.5);
  animation: none;
}

.hero .name {
  font-family: var(--font-main);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero .tagline {
  font-size: 0.95rem;
  color: var(--text-gray);
  font-weight: 600;
}

.flags-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.flag {
  font-size: 1.75rem;
  line-height: 1;
  transition: transform var(--transition);
}

.flag:hover {
  transform: scale(1.2);
}

/* ========== Social Links Section - MELBET Slider Style ========== */
.social-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--orange) 0%, #ff8c1a 50%, var(--orange) 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  border: none;
  border-radius: var(--radius);
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 900;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft), 0 2px 8px rgba(255, 122, 0, 0.2);
  text-transform: uppercase;
  animation: fadeInUp 0.6s ease-out backwards, btnShine 4s ease-in-out infinite;
}

@keyframes btnShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.link-btn:nth-child(1) { animation-delay: 0.1s; }
.link-btn:nth-child(2) { animation-delay: 0.15s; }
.link-btn:nth-child(3) { animation-delay: 0.2s; }
.link-btn:nth-child(4) { animation-delay: 0.25s; }
.link-btn:nth-child(5) { animation-delay: 0.3s; }
.link-btn:nth-child(6) { animation-delay: 0.35s; }
.link-btn:nth-child(7) { animation-delay: 0.4s; }
.link-btn:nth-child(8) { animation-delay: 0.45s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Yellow accent line on hover */
.link-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--gold-bright));
  transform: scaleY(0);
  transition: var(--transition);
  border-radius: 4px 0 0 4px;
}

.link-btn:hover {
  background: linear-gradient(135deg, var(--orange-dark) 0%, #d95f00 50%, var(--orange-dark) 100%);
  transform: translateX(4px) scale(1.02);
  box-shadow: 0 0 0.8em rgba(255, 164, 0, 0.6), 0 0 1.5em rgba(255, 188, 0, 0.3);
}

.link-btn:hover::before {
  transform: scaleY(1);
}

.link-btn:active {
  transform: translateX(2px) scale(0.99);
}

/* Icon styling */
.link-btn .icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  transition: var(--transition);
}

.link-btn .icon svg {
  width: 100%;
  height: 100%;
}

.link-btn:hover .icon {
  color: var(--text-dark);
  transform: scale(1.1);
}

.platform-name {
  flex: 1;
  text-align: left;
}

/* ========== Footer - MELBET Footer Style ========== */
.footer {
  margin-top: auto;
  padding-top: 2.5rem;
  text-align: center;
  animation: fadeIn 0.8s ease-out 0.5s backwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-gray);
  font-weight: 600;
}

/* ========== Responsive Design ========== */
@media (min-width: 480px) {
  .container {
    padding: 3rem 2rem 4rem;
  }

  .profile-wrapper {
    width: 140px;
    height: 140px;
  }

  .profile-picture {
    width: 140px;
    height: 140px;
  }

  .hero .name {
    font-size: 2rem;
  }

  .link-btn {
    padding: 1.125rem 1.5rem;
    font-size: 1.05rem;
  }

  .link-btn .icon {
    width: 32px;
    height: 32px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 520px;
    padding: 4rem 2rem 5rem;
  }

  .hero {
    margin-bottom: 3rem;
  }

  .profile-wrapper {
    width: 160px;
    height: 160px;
  }

  .profile-picture {
    width: 160px;
    height: 160px;
  }

  .hero .name {
    font-size: 2.25rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .social-links {
    gap: 1rem;
  }

  .link-btn {
    padding: 1.25rem 1.75rem;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after,
  .deco-header-box,
  .deco-header-ball,
  .deco-header-ball-small,
  .deco-dice-1,
  .deco-dice-2,
  .deco-promo-box,
  .deco-promo-ball,
  .profile-glow,
  .profile-picture,
  .sparkle,
  .link-btn,
  .glow-bg {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
