/* ==========================================================================
   CSS Variables & Theme Settings
   ========================================================================== */
:root {
  /* Brand Crimson Palette (Persis warna referensi: #ad0101) */
  --bg-color: #ad0101;
  --bg-gradient-top: #ba0505;
  --bg-gradient-mid: #ad0101;
  --bg-gradient-deep: #8f0202;
  --bg-gradient-dark: #6e0101;
  
  /* Button styling: White shape with red text */
  --button-bg: #ffffff;
  --button-bg-hover: #fafafa;
  --button-border: transparent;
  --button-border-hover: transparent;
  --button-text: #ad0101;
  --button-text-hover: #880101;
  --button-radius: 22px;
  
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.75);
  --text-dim: rgba(255, 255, 255, 0.5);

  --modal-bg: rgba(46, 5, 8, 0.88);
  --modal-border: rgba(255, 255, 255, 0.15);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.15);

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-smooth: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Base & Reset Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-gradient-dark);
}

body {
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  /* Latar belakang merah presisi sesuai gambar referensi */
  background-color: var(--bg-color);
  background: radial-gradient(circle at 50% 15%, var(--bg-gradient-top) 0%, var(--bg-gradient-mid) 45%, var(--bg-gradient-deep) 85%, var(--bg-gradient-dark) 100%);
  background-attachment: fixed;
}

/* Ambient glow subtle lighting behind center */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 60, 70, 0.35) 0%, rgba(220, 30, 40, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Layout Container
   ========================================================================== */
.page-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  padding: 36px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================================
   Profile Section (Logo & Username)
   ========================================================================== */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  text-align: center;
  width: 100%;
}

/* Container for main brand logo (img/logo.png) */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
  width: 100%;
}

.brand-logo {
  max-width: 320px;
  width: 85%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.brand-logo:hover {
  transform: scale(1.04);
}

/* Optional circular avatar styling */
.avatar-frame {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.04);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.avatar-frame:hover {
  transform: scale(1.05);
}

.avatar-img {
  position: absolute;
  height: 155%;
  width: auto;
  max-width: none;
  left: -9%;
  top: -28%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Username handle */
.profile-handle {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Links Navigation Section
   ========================================================================== */
.links-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
}

/* Individual Link Item Container */
.link-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

/* Rounded Button Shape (Sesuai Gambar Referensi) */
.link-btn {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 15px 54px 15px 54px; /* Equal padding ensures dead-center text */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border-radius: var(--button-radius);
  border: none;
  background-color: var(--button-bg);
  /* Drop shadow pekat, rapat & tidak menyebar luas */
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.76), 0 2px 3px rgba(0, 0, 0, 0.55);
  color: var(--button-text);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}

/* Centered Label */
.link-label {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--button-text);
  text-shadow: none;
  transition: transform 0.2s ease, color 0.2s ease;
  pointer-events: none;
}

/* Hover & Focus State */
.link-btn:hover {
  background-color: var(--button-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.82), 0 3px 4px rgba(0, 0, 0, 0.6);
}

.link-btn:hover .link-label {
  color: var(--button-text-hover);
}

/* Click Active State */
.link-btn:active {
  transform: translateY(2px);
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.72);
}

/* Ripple effect container */
.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(173, 1, 1, 0.14);
  transform: scale(0);
  animation: ripple-anim 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ==========================================================================
   Three-Dots (Kebab) More Button
   ========================================================================== */
.more-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--button-text);
  opacity: 0.85;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 2;
}

.dots-icon {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.more-btn:hover {
  color: var(--button-text-hover);
  opacity: 1;
  background-color: rgba(173, 1, 1, 0.08);
  transform: translateY(-50%) scale(1.1);
}

.more-btn:active {
  transform: translateY(-50%) scale(0.92);
}

/* ==========================================================================
   Modal / Bottom Sheet (Kebab Options)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: flex-end; /* Bottom sheet on mobile */
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background-color: var(--modal-bg);
  border: 1px solid var(--modal-border);
  border-radius: 24px 24px 0 0;
  padding: 16px 20px 28px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-backdrop.is-active .modal-sheet {
  transform: translateY(0);
}

.modal-drag-indicator {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.25);
  margin: 0 auto 4px;
}

.modal-header {
  text-align: center;
  padding-bottom: 4px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-all;
  max-width: 90%;
  margin: 0 auto;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.modal-action-btn:active {
  transform: scale(0.98);
}

.modal-cancel-btn {
  width: 100%;
  padding: 13px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-cancel-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: rgba(20, 20, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 22px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  width: 18px;
  height: 18px;
  color: #4ade80; /* green checkmark */
  flex-shrink: 0;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (min-width: 600px) {
  .page-container {
    padding-top: 40px;
    padding-bottom: 60px;
  }

  .brand-logo {
    max-width: 360px;
  }

  .avatar-frame {
    width: 105px;
    height: 105px;
  }

  .profile-handle {
    font-size: 1.45rem;
  }

  .link-btn {
    min-height: 62px;
    font-size: 1.1rem;
  }

  /* Center modal on desktop instead of bottom sheet */
  .modal-backdrop {
    align-items: center;
  }

  .modal-sheet {
    border-radius: 20px;
    transform: translateY(20px) scale(0.96);
  }

  .modal-backdrop.is-active .modal-sheet {
    transform: translateY(0) scale(1);
  }

  .modal-drag-indicator {
    display: none;
  }
}

