/* ==========================================================================
   ARTDEVATA - Ultra-Premium Linktree Styling & Design Tokens
   Style: Modern, Minimalist, Professional, High-End Digital Studio
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
    --color-primary: #1B463E;
    --color-secondary: #14433B;
    --color-accent: #21C9A4;
    --color-accent-glow: rgba(33, 201, 164, 0.35);
    --color-bg: #F5F7F6;
    
    --color-text-white: #FFFFFF;
    --color-text-secondary: #D8E5E1;
    
    /* Dark text tokens for light background */
    --color-text-dark-title: #0A221C;
    --color-text-dark-body: #2B453F;
    --color-text-dark-muted: #5C7A72;

    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;

    --radius-btn: 16px;
    --radius-card: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 4px 12px rgba(27, 70, 62, 0.05);
    --shadow-md: 0 8px 24px rgba(27, 70, 62, 0.09);
    --shadow-lg: 0 20px 40px rgba(27, 70, 62, 0.15);
    --shadow-card-hover: 0 14px 32px rgba(20, 67, 59, 0.3), 0 0 24px rgba(33, 201, 164, 0.3);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-dark-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 20px 56px;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   3. Ambient Animated Background Grid & Floating Spheres
   -------------------------------------------------------------------------- */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(rgba(27, 70, 62, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.8;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    will-change: transform;
}

.glow-1 {
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(33, 201, 164, 0.22) 0%, rgba(27, 70, 62, 0.08) 60%, transparent 100%);
    animation: floatOrb 12s ease-in-out infinite alternate;
}

.glow-2 {
    bottom: -100px;
    right: -80px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(20, 67, 59, 0.15) 0%, transparent 70%);
    animation: floatOrb 16s ease-in-out infinite alternate-reverse;
}

.glow-3 {
    top: 40%;
    left: -120px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(33, 201, 164, 0.12) 0%, transparent 70%);
    animation: floatOrb 14s ease-in-out infinite alternate;
}

@keyframes floatOrb {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.08); }
}

/* --------------------------------------------------------------------------
   4. Main Container (Mobile-First, Max 520px)
   -------------------------------------------------------------------------- */
.linktree-container {
    width: 100%;
    max-width: 520px; /* Max 520px desktop view requirement */
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header Action Buttons (Share & QR Code) */
.header-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 12px;
}

.action-btn {
    background: #FFFFFF;
    border: 1px solid rgba(27, 70, 62, 0.14);
    color: var(--color-primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
    position: relative;
}

.action-btn:hover {
    background: var(--color-primary);
    color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md), 0 0 14px rgba(33, 201, 164, 0.25);
}

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

/* Tooltip */
.action-btn-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--color-primary);
    color: #FFFFFF;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

.action-btn:hover .action-btn-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

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

.logo-wrapper {
    position: relative;
    margin-bottom: 18px;
    display: inline-block;
}

.logo-aura {
    position: absolute;
    inset: -6px;
    border-radius: 32px;
    background: radial-gradient(circle, rgba(33, 201, 164, 0.4) 0%, transparent 70%);
    filter: blur(12px);
    animation: auraPulse 3s ease-in-out infinite alternate;
}

@keyframes auraPulse {
    0% { opacity: 0.5; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1.06); }
}

.logo-circle {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: #FFFFFF;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(27, 70, 62, 0.16);
    border: 2.5px solid rgba(33, 201, 164, 0.4);
    transition: transform var(--transition-bounce), border-color var(--transition-fast);
    overflow: hidden;
}

.logo-wrapper:hover .logo-circle {
    transform: scale(1.05) rotate(-2deg);
    border-color: var(--color-accent);
}

.logo-circle svg,
.logo-circle img {
    width: 100%;
    height: 100%;
    border-radius: 23px;
    object-fit: cover;
}

.verified-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--color-accent);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--color-bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-text-dark-title);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.username-pill {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
}

.username-pill .handle {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-accent);
    background: var(--color-primary);
    padding: 4px 16px;
    border-radius: var(--radius-full);
    letter-spacing: 0.03em;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(33, 201, 164, 0.2);
}

/* Live Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78125rem;
    font-weight: 600;
    color: #124D41;
    background: rgba(33, 201, 164, 0.12);
    border: 1px solid rgba(33, 201, 164, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
    animation: blinkDot 1.8s ease-in-out infinite;
}

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

.tagline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(27, 70, 62, 0.06);
    border: 1px solid rgba(27, 70, 62, 0.12);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 14px;
}

.tagline-badge svg {
    color: var(--color-primary);
}

.bio-text {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--color-text-dark-body);
    max-width: 440px;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   6. Link Buttons List & Cards
   -------------------------------------------------------------------------- */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px; /* Required 12-14px gap constraint */
    margin-bottom: 34px;
}

.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 62px; /* Required 56-64px height constraint */
    padding: 14px 18px;
    background: linear-gradient(135deg, #1B463E 0%, #153C35 100%); /* Primary #1B463E with depth */
    border: 1px solid rgba(33, 201, 164, 0.25); /* Required 1px solid rgba(33,201,164,0.25) */
    border-radius: var(--radius-btn); /* Required 16px */
    text-decoration: none;
    color: var(--color-text-white);
    box-shadow: 0 4px 16px rgba(27, 70, 62, 0.12);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Shimmer Light Sweep Overlay */
.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.6s ease;
}

.link-card:hover::before {
    left: 140%;
}

/* Featured Badge */
.featured-link {
    border-color: rgba(33, 201, 164, 0.45);
}

.badge-featured {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
    background: var(--color-accent);
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(33, 201, 164, 0.3);
}

/* Hover State */
.link-card:hover {
    background: #14433B; /* Required hover #14433B */
    border-color: var(--color-accent); /* Accent hover #21C9A4 */
    transform: translateY(-3px) scale(1.008);
    box-shadow: var(--shadow-card-hover);
}

.link-card:active {
    transform: translateY(0) scale(0.99);
}

/* Icon Box Left */
.link-icon-box {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: rgba(33, 201, 164, 0.12);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    transition: all var(--transition-bounce);
}

.link-card:hover .link-icon-box {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 0 16px rgba(33, 201, 164, 0.4);
}

/* Link Content Text */
.link-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 12px;
}

.link-title {
    font-size: 0.96875rem;
    font-weight: 700;
    color: var(--color-text-white);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.link-desc {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--color-text-secondary); /* Secondary text #D8E5E1 */
    line-height: 1.35;
    margin-top: 3px;
    transition: color var(--transition-fast);
}

.link-card:hover .link-desc {
    color: #FFFFFF;
}

/* Arrow Right */
.link-arrow {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.link-card:hover .link-arrow {
    color: var(--color-accent);
    transform: translateX(5px);
}

/* --------------------------------------------------------------------------
   7. Social Media Section
   -------------------------------------------------------------------------- */
.social-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 34px;
}

.social-title {
    font-size: 0.78125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dark-muted);
    margin-bottom: 16px;
}

.social-icons-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.social-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #FFFFFF;
    border: 1px solid rgba(27, 70, 62, 0.14);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
}

.social-icon-btn:hover {
    background: var(--color-primary);
    color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 10px 22px rgba(27, 70, 62, 0.18), 0 0 16px rgba(33, 201, 164, 0.2);
}

.social-icon-btn:active {
    transform: translateY(0) scale(0.95);
}

/* --------------------------------------------------------------------------
   8. Footer Section
   -------------------------------------------------------------------------- */
.footer-section {
    width: 100%;
    text-align: center;
    padding-top: 18px;
    border-top: 1px solid rgba(27, 70, 62, 0.09);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.copyright {
    font-size: 0.8125rem;
    color: var(--color-text-dark-muted);
    font-weight: 500;
}

.built-with {
    font-size: 0.8125rem;
    color: var(--color-text-dark-body);
    display: flex;
    align-items: center;
    gap: 5px;
}

.brand-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-fast);
}

.brand-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   9. Modals & Toast UI Components
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 34, 28, 0.65);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #FFFFFF;
    width: 100%;
    max-width: 360px;
    border-radius: var(--radius-card);
    padding: 26px;
    position: relative;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s var(--transition-bounce);
    border: 1px solid rgba(27, 70, 62, 0.12);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(27, 70, 62, 0.06);
    border: none;
    color: var(--color-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(27, 70, 62, 0.14);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--color-text-dark-title);
    margin-bottom: 6px;
}

.modal-header p {
    font-size: 0.8125rem;
    color: var(--color-text-dark-muted);
}

.qr-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.qr-image {
    width: 190px;
    height: 190px;
    border-radius: 14px;
    padding: 10px;
    background: #FFFFFF;
    border: 1px solid rgba(27, 70, 62, 0.12);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    width: 100%;
    background: var(--color-primary);
    color: var(--color-text-white);
    border: none;
    padding: 13px 18px;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--color-secondary);
    box-shadow: 0 6px 18px rgba(27, 70, 62, 0.2);
    transform: translateY(-2px);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--color-primary);
    color: var(--color-text-white);
    border: 1px solid var(--color-accent);
    padding: 11px 20px;
    border-radius: var(--radius-full);
    font-size: 0.84375rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(33, 201, 164, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.35s var(--transition-bounce);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   10. Staggered Entrance Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-item {
    opacity: 0;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.staggered-item {
    opacity: 0;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Delays */
.staggered-item:nth-child(1) { animation-delay: 0.08s; }
.staggered-item:nth-child(2) { animation-delay: 0.14s; }
.staggered-item:nth-child(3) { animation-delay: 0.20s; }
.staggered-item:nth-child(4) { animation-delay: 0.26s; }
.staggered-item:nth-child(5) { animation-delay: 0.32s; }
.staggered-item:nth-child(6) { animation-delay: 0.38s; }
.staggered-item:nth-child(7) { animation-delay: 0.44s; }
.staggered-item:nth-child(8) { animation-delay: 0.50s; }
.staggered-item:nth-child(9) { animation-delay: 0.56s; }

/* --------------------------------------------------------------------------
   10.1 Accordion Sub-menu Styling
   -------------------------------------------------------------------------- */
.link-card-accordion {
    width: 100%;
    background: linear-gradient(135deg, #1B463E 0%, #153C35 100%);
    border: 1px solid rgba(33, 201, 164, 0.25);
    border-radius: var(--radius-btn);
    box-shadow: 0 4px 16px rgba(27, 70, 62, 0.12);
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.link-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.link-card-header:hover {
    background: #14433B;
}

.chevron-icon {
    transition: transform var(--transition-bounce), color var(--transition-fast);
}

.link-card-accordion.active {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-card-hover);
}

.link-card-accordion.active .chevron-icon {
    transform: rotate(180deg);
    color: var(--color-accent);
}

.submenu-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
    background: rgba(12, 38, 33, 0.95);
    border-top: 1px solid rgba(33, 201, 164, 0.15);
    display: flex;
    flex-direction: column;
    padding: 0 12px;
}

.link-card-accordion.active .submenu-list {
    max-height: 240px;
    padding: 8px 12px 14px;
}

.submenu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--color-text-white);
    text-decoration: none;
    transition: all var(--transition-fast);
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.submenu-item:hover {
    background: rgba(33, 201, 164, 0.16);
    border-color: rgba(33, 201, 164, 0.35);
    transform: translateX(4px);
}

.submenu-icon {
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.submenu-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.submenu-text > div:first-child {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-white);
}

.submenu-item-desc {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 400;
    margin-top: 2px;
}

.submenu-arrow {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.submenu-item:hover .submenu-arrow {
    color: var(--color-accent);
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   11. Responsive Tweaks
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    body {
        padding: 16px 16px 40px;
    }

    .brand-title {
        font-size: 1.625rem;
    }

    .bio-text {
        font-size: 0.875rem;
    }

    .link-card {
        padding: 12px 14px;
        min-height: 58px;
    }

    .link-title {
        font-size: 0.90625rem;
    }

    .link-desc {
        font-size: 0.78125rem;
    }
}
