/* ===================================
   ĐỖ THÀNH STORE - BIO LINK STYLES
   Premium Dark Theme with Glassmorphism
   =================================== */

/* --- CSS Variables (Design Tokens) --- */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f2e;
    --bg-card: rgba(20, 20, 50, 0.6);
    --bg-card-hover: rgba(30, 30, 70, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);

    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --text-muted: #6a6a8e;

    --accent-primary: #7c3aed;
    --accent-secondary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #7c3aed, #3b82f6, #06b6d4);
    --accent-glow: rgba(124, 58, 237, 0.4);

    --color-zalo: #0068FF;
    --color-tiktok: #fe2c55;
    --color-download: #10b981;
    --color-guide: #f59e0b;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(124, 58, 237, 0.3);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

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

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

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

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Animated Background --- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
    bottom: 20%;
    left: -10%;
    animation-delay: -7s;
}

.bg-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #06b6d4, transparent 70%);
    top: 40%;
    right: 20%;
    animation-delay: -14s;
}

.bg-orb-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #ec4899, transparent 70%);
    bottom: -5%;
    left: 30%;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 30px) scale(1.02); }
}

/* --- Container --- */
.container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    min-height: 100vh;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 40px 0 32px;
    position: relative;
}

.hero-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
}

/* Avatar */
.avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    z-index: 2;
    animation: avatarPulse 3s infinite ease-in-out;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--accent-gradient);
    z-index: 1;
    animation: ringRotate 4s infinite linear;
}

.avatar-ring-2 {
    inset: -8px;
    opacity: 0.3;
    animation: ringRotate 6s infinite linear reverse;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes avatarPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.status-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    z-index: 3;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* Name & Bio */
.display-name {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.verified-badge {
    flex-shrink: 0;
}

.username {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.bio-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 320px;
    margin: 0 auto 24px;
}

/* Stats */
.stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-number {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border-subtle);
}

/* --- Links Section --- */
.links-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.link-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-smooth);
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.link-card:hover::before {
    opacity: 1;
}

.link-card:hover {
    transform: translateY(-3px) scale(1.01);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-md);
}

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

.link-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, transparent 30%, transparent);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

/* Card-specific glows */
.link-card-primary:hover .link-card-glow {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(0, 104, 255, 0.08), transparent 60%);
}

.link-card-primary {
    border-color: rgba(0, 104, 255, 0.2);
}

.link-card-primary:hover {
    border-color: rgba(0, 104, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 104, 255, 0.15);
}

.link-card-download:hover .link-card-glow {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.08), transparent 60%);
}

.link-card-download:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.15);
}

.link-card-guide:hover .link-card-glow {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.08), transparent 60%);
}

.link-card-guide:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.15);
}

.link-card-tiktok:hover .link-card-glow {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(254, 44, 85, 0.08), transparent 60%);
}

.link-card-tiktok:hover {
    border-color: rgba(254, 44, 85, 0.4);
    box-shadow: 0 8px 32px rgba(254, 44, 85, 0.15);
}

.link-card-youtube:hover .link-card-glow {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(255, 0, 0, 0.08), transparent 60%);
}

.link-card-youtube:hover {
    border-color: rgba(255, 0, 0, 0.4);
    box-shadow: 0 8px 32px rgba(255, 0, 0, 0.15);
}

.link-card-facebook:hover .link-card-glow {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(24, 119, 242, 0.08), transparent 60%);
}

.link-card-facebook:hover {
    border-color: rgba(24, 119, 242, 0.4);
    box-shadow: 0 8px 32px rgba(24, 119, 242, 0.15);
}

/* Link Icons */
.link-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition-spring);
}

.link-card:hover .link-icon-wrapper {
    transform: scale(1.1) rotate(-3deg);
}

.link-icon-zalo {
    background: linear-gradient(135deg, rgba(0, 104, 255, 0.2), rgba(0, 104, 255, 0.05));
}

.link-icon-download {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
    color: var(--color-download);
}

.link-icon-guide {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
    color: var(--color-guide);
}

.link-icon-tiktok {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.2), rgba(254, 44, 85, 0.05));
    color: var(--color-tiktok);
}

.link-icon-youtube {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.05));
    color: #ff0000;
}

.link-icon-facebook {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.2), rgba(24, 119, 242, 0.05));
    color: #1877f2;
}

/* Link Content */
.link-content {
    flex: 1;
    min-width: 0;
}

.link-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.link-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-arrow {
    color: var(--text-muted);
    transition: all var(--transition-smooth);
    flex-shrink: 0;
}

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

/* Link Badges */
.link-badge {
    position: absolute;
    top: -1px;
    right: 16px;
    padding: 2px 10px 4px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
    border-radius: 0 0 8px 8px;
    animation: badgePulse 2s infinite;
}

.link-badge-new {
    background: linear-gradient(135deg, var(--color-download), #06b6d4);
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* --- Features Section --- */
.features-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.section-icon {
    font-size: 1.2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.feature-card {
    padding: 20px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-smooth);
    cursor: default;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-4px);
    background: var(--bg-glass-hover);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.feature-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 20px 0;
}

.footer-line {
    width: 60px;
    height: 2px;
    background: var(--accent-gradient);
    margin: 0 auto 16px;
    border-radius: var(--radius-full);
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

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

.modal {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, rgba(20, 20, 50, 0.95), rgba(10, 10, 30, 0.98));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-spring);
    box-shadow: var(--shadow-lg);
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-glass);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-smooth);
}

.modal-item:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-accent);
    transform: translateX(4px);
}

.modal-item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-item-info {
    flex: 1;
    min-width: 0;
}

.modal-item-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-item-ver {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.modal-item-size,
.modal-item-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 3px 8px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.modal-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

/* --- Animations on Scroll --- */
.link-card,
.feature-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }
.link-card:nth-child(4) { animation-delay: 0.4s; }
.link-card:nth-child(5) { animation-delay: 0.5s; }
.link-card:nth-child(6) { animation-delay: 0.6s; }

.feature-card:nth-child(1) { animation-delay: 0.7s; }
.feature-card:nth-child(2) { animation-delay: 0.8s; }
.feature-card:nth-child(3) { animation-delay: 0.9s; }
.feature-card:nth-child(4) { animation-delay: 1.0s; }

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

/* Hero entrance */
.hero {
    animation: heroEntrance 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Responsive --- */
@media (max-width: 400px) {
    .container {
        padding: 16px 12px 32px;
    }

    .display-name {
        font-size: 1.4rem;
    }

    .stats-row {
        gap: 14px;
        padding: 14px 18px;
    }

    .features-grid {
        gap: 8px;
    }

    .feature-card {
        padding: 16px 12px;
    }
}

/* --- Scrollbar Custom --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* --- Selection --- */
::selection {
    background: rgba(124, 58, 237, 0.3);
    color: white;
}
