/* ==========================================================================
   ALDIMAS PRODUCTION - LINKTREE CLONE (1:1 Clean Custom Theme)
   ========================================================================== */

:root {
  --bg-color: #000000;
  --text-primary: #ffffff;
  --text-secondary: #d8d8d8;
  --btn-bg: #d6d6d6;
  --btn-bg-hover: #e2e2e2;
  --btn-text: #000000;
  --btn-radius: 8px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow-x: hidden;
  position: relative;
}

/* --- Mobile-Centric App Container (Phone layout on desktop) --- */
.app-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background-color: #000000;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}

/* --- Background & Gradient (Contained within mobile layout) --- */
.bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.bg-img {
  position: absolute;
  top: -25%;
  left: 0;
  width: 100%;
  height: 110%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.bg-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    #000000 0%,
    #000000 20%,
    rgba(0, 0, 0, 0.92) 35%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.15) 68%,
    rgba(0, 0, 0, 0) 85%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* --- Top Bar --- */
.top-bar {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 16px 20px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-placeholder {
  width: 40px;
  height: 40px;
}

.top-bar-btn {
  width: auto;
  height: auto;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9));
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.top-bar-btn:hover {
  transform: scale(1.15);
  opacity: 0.85;
}

/* --- Main Profile Container --- */
.profile-container {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 20px 16px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

/* --- Profile Header --- */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  margin-bottom: 28px;
}

.avatar-wrapper {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: block;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  z-index: 20;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
  -webkit-touch-callout: none;
  user-select: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

@media (hover: hover) {
  .avatar-wrapper:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
  }
}

.avatar-wrapper:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  opacity: 0.9;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
}

.profile-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
}

.profile-bio {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 18px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
}

/* --- Social Icons --- */
.social-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.social-icon-link {
  color: var(--text-primary);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.social-icon-link:hover {
  transform: scale(1.12);
  opacity: 0.9;
}

/* --- Links List --- */
.links-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.link-card-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--btn-radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: transform var(--transition-fast);
}

.link-card-wrapper:hover {
  transform: scale(1.015);
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border-radius: var(--btn-radius);
  text-decoration: none;
  padding: 12px 56px;
  position: relative;
  transition: background-color var(--transition-fast);
}

.link-card:hover {
  background-color: var(--btn-bg-hover);
}

.link-icon-box {
  position: absolute;
  left: 12px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.08);
}

.link-icon-box svg {
  color: #000000;
}

.link-label {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--btn-text);
  text-align: center;
  letter-spacing: -0.01em;
}

/* --- Clean Footer --- */
.clean-footer {
  margin-top: auto;
  padding: 48px 16px 24px 16px;
  text-align: center;
  width: 100%;
}

.clean-footer p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  z-index: 999;
}

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

/* --- Responsive Adjustments --- */
@media (max-width: 480px) {
  .profile-container {
    padding: 10px 14px 0 14px;
  }

  .link-card {
    min-height: 58px;
    padding: 10px 46px;
  }

  .link-icon-box {
    width: 38px;
    height: 38px;
    left: 10px;
  }

  .link-icon-box svg {
    width: 22px;
    height: 22px;
  }

  .link-label {
    font-size: 0.95rem;
  }
}
