/* ═══════════════════════════════════════════════════════════════════
   THEME VARIABLES
   ═══════════════════════════════════════════════════════════════════ */
:root {
    --page-bg:       #F9F9F9;
    --surface:       #fff;
    --surface-hover: #f2f2f2;
    --border:        #ddd;
    --text-1:        #111;
    --text-2:        #444;
    --text-3:        #666;
    --icon:          #B6B6B6;
    --accent:        #1DA1F2;
    --accent-hover:  #1A8CD8;
    --shadow:        0 4px 12px rgba(0,0,0,0.1);
    --glass-bg:      rgba(255,255,255,0.6);
    --glass-tag:     rgba(255,255,255,0.3);
    --glass-text:    #111;
    --glass-muted:   #5f5f5f;
    --glass-icon:    #222;
    --glass-shadow:  none;
}

.dm, .dark-mode {
    --page-bg:       #121212;
    --surface:       #1e1e1e;
    --surface-hover: #2a2a2a;
    --border:        #444;
    --text-1:        #f5f5f5;
    --text-2:        #b0b0b0;
    --text-3:        #aaa;
    --icon:          #d3d3d3;
    --accent:        #3B82F6;
    --accent-hover:  #2563EB;
    --shadow:        0 4px 12px rgba(0,0,0,0.6);
    --glass-bg:      rgba(30,30,30,0.6);
    --glass-tag:     rgba(20,20,20,0.45);
    --glass-text:    #fff;
    --glass-muted:   #626262;
    --glass-icon:    #eee;
    --glass-shadow:  inset 0 1px 0 rgba(255,255,255,0.06);
}

.blue {
    --page-bg:       #6AA3F0;
    --surface:       #B8D4F5;
    --surface-hover: #C8DEF8;
    --border:        #9EC2F0;
    --text-1:        #1a3350;
    --text-2:        #3D6088;
    --text-3:        #6888A8;
    --icon:          #6888A8;
    --accent:        #2468C0;
    --accent-hover:  #1A5098;
    --shadow:        0 4px 14px rgba(30,70,130,0.15);
    --glass-bg:      rgba(255,255,255,0.28);
    --glass-tag:     rgba(255,255,255,0.22);
    --glass-text:    #fff;
    --glass-muted:   rgba(255,255,255,0.65);
    --glass-icon:    rgba(255,255,255,0.75);
    --glass-shadow:  none;
}

.pink {
    --page-bg:       #F07088;
    --surface:       #F8BCC8;
    --surface-hover: #FACCD5;
    --border:        #F0A0B0;
    --text-1:        #4A1520;
    --text-2:        #7A3848;
    --text-3:        #A06070;
    --icon:          #A06070;
    --accent:        #C03558;
    --accent-hover:  #A02848;
    --shadow:        0 4px 14px rgba(180,50,80,0.12);
    --glass-bg:      rgba(255,255,255,0.28);
    --glass-tag:     rgba(255,255,255,0.22);
    --glass-text:    #fff;
    --glass-muted:   rgba(255,255,255,0.65);
    --glass-icon:    rgba(255,255,255,0.75);
    --glass-shadow:  none;
}

.purple {
    --page-bg:       #9680E8;
    --surface:       #C8BCF0;
    --surface-hover: #D4CAF5;
    --border:        #B0A0E8;
    --text-1:        #221550;
    --text-2:        #4A3878;
    --text-3:        #7060A0;
    --icon:          #7060A0;
    --accent:        #6040C8;
    --accent-hover:  #4E30A8;
    --shadow:        0 4px 14px rgba(80,40,160,0.12);
    --glass-bg:      rgba(255,255,255,0.25);
    --glass-tag:     rgba(255,255,255,0.20);
    --glass-text:    #fff;
    --glass-muted:   rgba(255,255,255,0.65);
    --glass-icon:    rgba(255,255,255,0.75);
    --glass-shadow:  none;
}

.red {
    --page-bg:       #E87068;
    --surface:       #F5BAB5;
    --surface-hover: #F8C8C5;
    --border:        #F0A09A;
    --text-1:        #4A1510;
    --text-2:        #783830;
    --text-3:        #A06058;
    --icon:          #A06058;
    --accent:        #C03830;
    --accent-hover:  #A02820;
    --shadow:        0 4px 14px rgba(180,50,40,0.12);
    --glass-bg:      rgba(255,255,255,0.28);
    --glass-tag:     rgba(255,255,255,0.22);
    --glass-text:    #fff;
    --glass-muted:   rgba(255,255,255,0.65);
    --glass-icon:    rgba(255,255,255,0.75);
    --glass-shadow:  none;
}

.green {
    --page-bg:       #50C070;
    --surface:       #A8E0B8;
    --surface-hover: #B8E8C8;
    --border:        #88D0A0;
    --text-1:        #0E3018;
    --text-2:        #285838;
    --text-3:        #508060;
    --icon:          #508060;
    --accent:        #208840;
    --accent-hover:  #187030;
    --shadow:        0 4px 14px rgba(30,120,50,0.12);
    --glass-bg:      rgba(255,255,255,0.28);
    --glass-tag:     rgba(255,255,255,0.22);
    --glass-text:    #fff;
    --glass-muted:   rgba(255,255,255,0.65);
    --glass-icon:    rgba(255,255,255,0.75);
    --glass-shadow:  none;
}

.orange {
    --page-bg:       #F0983E;
    --surface:       #F8CCA0;
    --surface-hover: #FAD8B0;
    --border:        #F0B880;
    --text-1:        #3A2010;
    --text-2:        #6A4828;
    --text-3:        #987048;
    --icon:          #987048;
    --accent:        #C87018;
    --accent-hover:  #A85C10;
    --shadow:        0 4px 14px rgba(160,80,20,0.12);
    --glass-bg:      rgba(255,255,255,0.28);
    --glass-tag:     rgba(255,255,255,0.22);
    --glass-text:    #fff;
    --glass-muted:   rgba(255,255,255,0.65);
    --glass-icon:    rgba(255,255,255,0.75);
    --glass-shadow:  none;
}

.yellow {
    --page-bg:       #E8C84A;
    --surface:       #F5E4A0;
    --surface-hover: #F8EAB0;
    --border:        #EED880;
    --text-1:        #302808;
    --text-2:        #5A4818;
    --text-3:        #887038;
    --icon:          #887038;
    --accent:        #C0A018;
    --accent-hover:  #A08810;
    --shadow:        0 4px 14px rgba(160,130,20,0.12);
    --glass-bg:      rgba(255,255,255,0.28);
    --glass-tag:     rgba(255,255,255,0.22);
    --glass-text:    #fff;
    --glass-muted:   rgba(255,255,255,0.65);
    --glass-icon:    rgba(255,255,255,0.75);
    --glass-shadow:  none;
}

.teal {
    --page-bg:       #40C0B8;
    --surface:       #A0E0D8;
    --surface-hover: #B0E8E0;
    --border:        #80D0C8;
    --text-1:        #0E3030;
    --text-2:        #285858;
    --text-3:        #508080;
    --icon:          #508080;
    --accent:        #1A9890;
    --accent-hover:  #128078;
    --shadow:        0 4px 14px rgba(30,130,120,0.12);
    --glass-bg:      rgba(255,255,255,0.28);
    --glass-tag:     rgba(255,255,255,0.22);
    --glass-text:    #fff;
    --glass-muted:   rgba(255,255,255,0.65);
    --glass-icon:    rgba(255,255,255,0.75);
    --glass-shadow:  none;
}


/* ═══════════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--page-bg);
    color: var(--text-2);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ── Glass link button (.lbg) ──────────────────────────────────── */

.lbg {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    padding: 16px 25px;
    border: none;
    border-radius: 14px;
    box-sizing: border-box;
    background: var(--glass-bg);
    color: var(--glass-text);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    will-change: transform, opacity;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.90),
                opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.90);
}

.lbg .socialLinkText { color: var(--glass-muted); }

.lbg .iconSVG svg,
.lbg .iconSVG svg * { stroke: var(--glass-icon); color: var(--glass-icon); }

.lbg .iconSVG svg path[fill="currentColor"],
.lbg .iconSVG svg *[fill="currentColor"] { fill: var(--glass-icon); }

/* ── Icons ─────────────────────────────────────────────────────── */

.lbtText { flex: 0 0 55%; min-width: 0; text-align: left; }

.iconSVG svg,
.iconSVG svg * {
    flex: 0 0 24px; stroke: var(--icon); flex-shrink: 0;
    width: 24px; height: 24px; opacity: 1;
    display: flex; justify-content: flex-end;
}

.iconSVG svg path[fill="currentColor"],
.iconSVG svg *[fill="currentColor"] { fill: var(--icon) !important; }

.socialLinkText {
    flex: 1 1 35%; max-width: 35%; text-align: left;
    font-size: 14px; color: var(--icon);
    position: relative; top: 1px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Link buttons (.lbt) ───────────────────────────────────────── */

.lbt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-1);
    text-decoration: none;
    padding: 16px 25px;
    border: 0px solid var(--border);
    border-radius: 14px;
    background-color: var(--surface);
    box-sizing: border-box;
    will-change: transform, opacity;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-tap-highlight-color: transparent;
}

.lbt:hover {
    background-color: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ── Glass text overlay ────────────────────────────────────────── */

.text-glass-outline {
    display: inline-block;
    position: relative;
    padding: 2px 6px;
    line-height: 1.2;
    background: var(--glass-tag);
    box-shadow: var(--glass-shadow);
    color: var(--glass-text);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border-radius: 8px;
}

.text-glass-outline.email a { color: var(--glass-text) !important; }
.text-glass-outline:empty { display: none; }

/* ── Featured border ───────────────────────────────────────────── */

.fat {
    border: 2px solid var(--accent) !important;
    font-weight: 700 !important;
}

/* ── Layout ────────────────────────────────────────────────────── */

.container {
    max-width: 400px;
    width: 100%;
    text-align: center;
    padding: 0.3rem;
    position: relative;
    z-index: 20;
}

#heart-canvas {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none; z-index: 10;
}

/* ── Name ──────────────────────────────────────────────────────── */

#previewNameWrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.name {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-1);
    display: inline-block;
    text-align: center;
}

/* ── Verified badge ────────────────────────────────────────────── */

.verify-badge {
    display: inline-block;
    width: 32px; height: 32px;
    vertical-align: middle;
    position: relative; top: -3px;
    transform-origin: center center;
    transform: scale(7);
    opacity: 0;
}

.verify-badge.animate {
    animation: stampIn 1.15s cubic-bezier(.2,.9,.3,1.2) forwards;
    animation-delay: 0.1s;
}

@keyframes stampIn {
    0%   { opacity: 0; transform: scale(7); }
    40%  { opacity: 1; }
    70%  { transform: scale(0.92); }
    85%  { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.badge-rays {
    fill: var(--accent);
    transform-origin: 50% 50%;
    transform-box: fill-box;
    transition: fill 0.25s ease;
    animation: sunspin 60s linear infinite;
}

.badge-core { fill: var(--accent); transition: fill 0.25s ease; }

.badge-check {
    fill: none; stroke: #fff; stroke-width: 6;
    stroke-linecap: round; stroke-linejoin: round;
}

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

/* ── Profile image ─────────────────────────────────────────────── */

#profileImage {
    display: block;
    position: relative;
    width: 100%; max-width: 128px;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto 20px auto;
    align-self: center;
    transition: background 0.3s;
}

#profileImage:hover { background-color: var(--surface-hover); color: var(--text-1); }

/* ── Description ───────────────────────────────────────────────── */

.description {
    font-size: 0.95rem;
    color: var(--text-2);
    line-height: 1.6;
    margin: 0 25px 35px;
}

#previewDescription { white-space: pre-line; }

/* ── Links ─────────────────────────────────────────────────────── */

.links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.link-btn {
    padding: 15px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-1);
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    background-color: var(--surface);
}

.link-btn:hover {
    background-color: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ── Email ─────────────────────────────────────────────────────── */

.email { font-size: 0.9rem; color: var(--text-3); }
.email a { text-decoration: none; color: var(--text-3); transition: color 0.2s ease-in-out; }
.email a:hover { color: var(--text-1); }

/* ── Audio player ──────────────────────────────────────────────── */

.audio-card {
    width: 90%; margin: 20px auto; padding: 15px;
    border-radius: 16px; background: var(--surface);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: left; animation: fadeIn 0.4s ease;
}

.audio-label { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }

.audio-player { display: flex; align-items: center; gap: 12px; }

.audio-play-btn {
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: var(--accent); color: #fff;
    font-size: 18px; cursor: pointer;
}

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

.audio-progress { flex-grow: 1; height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.audio-progress-fill { height: 100%; background: var(--accent); width: 0%; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .name { font-size: 1.6rem; margin-bottom: 15px; }
    .description { font-size: 0.9rem; margin-bottom: 25px; }
    .link-btn { padding: 12px 15px; font-size: 0.95rem; }
    .email { font-size: 0.85rem; }
}
