/* ===== MOBILE FIRST DESIGN ===== */
/* Base styles for mobile devices (320px+) */

:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  /* Force dark theme */
  --background-color: #0f172a;
  --surface-color: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #334155;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-heavy: 0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.background-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  z-index: -1;
  overflow: hidden;
}

.background-pattern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    /* Numbers scattered across the background */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ctext x='20' y='30' font-family='Inter' font-size='16' fill='%23ffffff' opacity='0.1'%3E1%3C/text%3E%3Ctext x='60' y='20' font-family='Inter' font-size='14' fill='%23ffffff' opacity='0.08'%3E7%3C/text%3E%3Ctext x='10' y='70' font-family='Inter' font-size='12' fill='%23ffffff' opacity='0.06'%3E3%3C/text%3E%3Ctext x='80' y='60' font-family='Inter' font-size='18' fill='%23ffffff' opacity='0.1'%3E9%3C/text%3E%3Ctext x='40' y='80' font-family='Inter' font-size='15' fill='%23ffffff' opacity='0.07'%3E5%3C/text%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ctext x='30' y='40' font-family='Inter' font-size='14' fill='%23ffffff' opacity='0.09'%3E2%3C/text%3E%3Ctext x='90' y='30' font-family='Inter' font-size='16' fill='%23ffffff' opacity='0.08'%3E8%3C/text%3E%3Ctext x='20' y='90' font-family='Inter' font-size='13' fill='%23ffffff' opacity='0.06'%3E4%3C/text%3E%3Ctext x='70' y='80' font-family='Inter' font-size='17' fill='%23ffffff' opacity='0.1'%3E6%3C/text%3E%3Ctext x='50' y='60' font-family='Inter' font-size='12' fill='%23ffffff' opacity='0.05'%3E11%3C/text%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Ctext x='15' y='25' font-family='Inter' font-size='11' fill='%23ffffff' opacity='0.07'%3E22%3C/text%3E%3Ctext x='50' y='15' font-family='Inter' font-size='13' fill='%23ffffff' opacity='0.08'%3E33%3C/text%3E%3Ctext x='10' y='60' font-family='Inter' font-size='10' fill='%23ffffff' opacity='0.06'%3E44%3C/text%3E%3Ctext x='60' y='70' font-family='Inter' font-size='14' fill='%23ffffff' opacity='0.09'%3E55%3C/text%3E%3C/svg%3E");
  background-size: 200px 200px, 250px 250px, 150px 150px;
  background-position: 0 0, 100px 50px, 50px 100px;
  animation: floatNumbers 30s linear infinite;
}

@keyframes floatNumbers {
  0% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(-20px) translateY(-30px);
  }
  50% {
    transform: translateX(20px) translateY(-60px);
  }
  75% {
    transform: translateX(-10px) translateY(-30px);
  }
  100% {
    transform: translateX(0) translateY(0);
  }
}

.container {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px 16px;
  position: relative;
  z-index: 1;
}

/* ===== PROFILE SECTION ===== */
.profile-section {
  text-align: center;
  margin-bottom: 32px;
}

.avatar-container {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--surface-color);
  box-shadow: var(--shadow-medium);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

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

.avatar-ring {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: var(--gradient-primary);
  z-index: 1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 0.4; }
  100% { transform: scale(1); opacity: 0.7; }
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bio {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 8px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== LINKS SECTION ===== */
.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.link-item {
  display: flex;
  align-items: center;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.link-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.link-item:hover::before {
  left: 100%;
}

.link-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
  border-color: var(--primary-color);
}

.link-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
}

.link-content {
  flex: 1;
}

.link-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.link-description {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
}

.link-arrow {
  color: var(--text-muted);
  font-size: 14px;
  transition: transform 0.3s ease;
}

.link-item:hover .link-arrow {
  transform: translateX(4px);
  color: var(--primary-color);
}

/* Platform-specific colors */
.instagram .link-icon {
  background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

.tiktok .link-icon {
  background: linear-gradient(45deg, #b610c5, #0d8bd9);
}

.whatsapp .link-icon {
  background: linear-gradient(45deg, #25D366, #128C7E);
}

.telegram .link-icon {
  background: linear-gradient(45deg, #0088cc, #005577);
}

.website .link-icon {
  background: var(--gradient-accent);
}

.youtube .link-icon {
  background: linear-gradient(45deg, #FF0000, #cc0000);
}

.linkedin .link-icon {
  background: linear-gradient(45deg, #0077B5, #005885);
}

.email .link-icon {
  background: linear-gradient(45deg, #D44638, #A7160A);
}

/* Special link item with image on top */
.special-item {
  flex-direction: column;
  align-items: stretch;
}

.link-image {
  width: 100%;
  height: 160px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  margin-bottom: 16px;
}

.link-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.special-item:hover .link-image img {
  transform: scale(1.05);
}

.link-main-content {
  display: flex;
  align-items: center;
  width: 100%;
}

.special-item .link-icon {
  background: var(--gradient-primary);
}

/* Icon alignment fix for all link items */
.link-icon i {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* ===== PRODUCT MULTI-PLATFORM STYLES ===== */

/* Product with inline platform buttons */
.product-multi {
  flex-wrap: wrap;
}

.product-multi .product-platforms {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-left: 0;
  margin-top: 12px;
}

.product-platforms {
  display: flex;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}

.platform-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  text-decoration: none;
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.platform-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Platform-specific colors for buttons */
.platform-btn.shopee {
  background: linear-gradient(45deg, #ee4d2d, #ff6347);
}

.platform-btn.tokopedia {
  background: linear-gradient(45deg, #03ac0e, #42b883);
}

.platform-btn.bukalapak {
  background: linear-gradient(45deg, #e91e63, #ff4081);
}

.platform-btn.playstore {
  background: linear-gradient(45deg, #01875f, #4285f4);
}

.platform-btn.appstore {
  background: linear-gradient(45deg, #000000, #333333);
}

.platform-btn.tiktok {
  background: linear-gradient(45deg, #69c9d0, #ee1d52);
}

.platform-btn.website {
  background: var(--gradient-primary);
}

/* Product with expandable platforms */
.product-expandable {
  flex-direction: column;
  align-items: stretch;
  cursor: pointer;
}

.product-expandable .link-content {
  flex: 1;
}

.expand-arrow {
  transition: transform 0.3s ease;
}

.product-expandable.expanded .expand-arrow {
  transform: rotate(180deg);
}

.platform-links {
  width: 100%;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

.platform-links.hidden {
  display: none;
}

.platform-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  gap: 12px;
}

.platform-link:hover {
  background: var(--background-color);
  transform: translateX(4px);
}

.platform-link i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.platform-link.playstore i {
  color: #4285f4;
}

.platform-link.appstore i {
  color: #000000;
}

.platform-link.website i {
  color: var(--primary-color);
}

/* Product link main content styling */
.product-multi .link-content,
.product-expandable .link-content {
  margin-right: 16px;
}

.product-multi .link-icon,
.product-expandable .link-icon {
  background: linear-gradient(45deg, #ff6b6b, #feca57);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
}

.footer p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== TABLET STYLES (768px+) ===== */
@media (min-width: 768px) {
  .container {
    max-width: 480px;
    padding: 40px 24px;
  }
  
  .avatar {
    width: 140px;
    height: 140px;
  }
  
  .avatar-ring {
    width: 156px;
    height: 156px;
    top: -8px;
    left: -8px;
  }
  
  h1 {
    font-size: 32px;
  }
  
  .bio {
    font-size: 18px;
  }
  
  .stats {
    gap: 32px;
  }
  
  .stat-number {
    font-size: 20px;
  }
  
  .links {
    gap: 16px;
  }
  
  .link-item {
    padding: 20px;
  }
  
  .link-icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
  
  .link-title {
    font-size: 18px;
  }
  
  .link-description {
    font-size: 14px;
  }
  
  /* Special item responsive styles */
  .link-image {
    height: 180px;
  }
  
  /* Product platform responsive styles */
  .platform-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  .platform-link {
    padding: 14px 18px;
  }
}

/* ===== DESKTOP STYLES (1024px+) ===== */
@media (min-width: 1024px) {
  .container {
    max-width: 520px;
    padding: 60px 32px;
  }
  
  .avatar {
    width: 160px;
    height: 160px;
  }
  
  .avatar-ring {
    width: 176px;
    height: 176px;
  }
  
  h1 {
    font-size: 36px;
  }
  
  .bio {
    font-size: 20px;
  }
  
  .stats {
    gap: 40px;
  }
  
  .stat-number {
    font-size: 24px;
  }
  
  .stat-label {
    font-size: 13px;
  }
  
  .links {
    gap: 18px;
  }
  
  .link-item {
    padding: 24px;
  }
  
  .link-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  
  .link-title {
    font-size: 20px;
  }
  
  .link-description {
    font-size: 15px;
  }
  
  /* Special item desktop responsive styles */
  .link-image {
    height: 200px;
  }
  
  /* Product platform desktop responsive styles */
  .platform-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .platform-link {
    padding: 16px 20px;
    font-size: 16px;
  }
}

/* ===== ACCESSIBILITY & PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .avatar-ring {
    animation: none;
  }
}

/* Focus states for keyboard navigation */
.link-item:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.8);
    --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.8);
    --shadow-heavy: 0 8px 16px rgba(0, 0, 0, 0.8);
  }
}

/* Keep dark mode styles for documentation but they're already applied above */
/* @media (prefers-color-scheme: dark) {
  :root {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
  }
  
  .background-pattern {
    background: 
      radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
      radial-gradient(circle at 40% 60%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  }
} */