:root {
    --bg: #050505;
    --accent: #ace35c;
    --accent-dark: #8bc34a;
    --text: #f8faf9;
    --text-dim: rgba(248, 250, 249, 0.6);
    --text-muted: rgba(248, 250, 249, 0.3);
    --border: rgba(255, 255, 255, 0.1);
    --card-bg: #0d0d0d;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    /* Academy /leaderboard hero stat-pill accents */
    --lb-automation: #a855f7;
    --lb-ops: #f59e0b;
    --lb-sales: #38bdf8;
    --lb-ai: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
}

body.scroll-mode {
    align-items: flex-start;
}

/* Noise Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Ffilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: 10;
}

.container {
    width: 100%;
    max-width: 480px;
    text-align: center;
    position: relative;
    z-index: 20;
    padding-top: 20px; /* Added padding to prevent clipping at the top */
}

.brand-logo {
    width: 44px;
    height: 44px;
    margin: 0 auto 1.25rem;
    display: block;
}

h1 {
    font-family: 'Instrument Serif', serif;
    margin-bottom: 0.5rem;
    line-height: 1.05;
    font-weight: 400;
}

#selection-screen h1 {
    font-size: clamp(1.85rem, 5vw, 2.35rem);
}

#va-screen h1 {
    font-size: clamp(2rem, 5.8vw, 2.55rem);
}

#client-screen h1 {
    font-size: clamp(1.9rem, 5.2vw, 2.4rem);
}

p.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* Screens */
.screen {
    display: none;
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: var(--transition);
}

.screen.active {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
    padding-top: 20px; /* Ensure content starts with a gap from the top */
}

/* Buttons & Links */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#selection-screen .btn-group {
    gap: 12px;
    max-width: 380px;
    margin: 0 auto;
}

.link-card {
    display: block;
    padding: 20px 28px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    outline: none;
    text-align: center;
}

.link-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    background: rgba(172, 227, 92, 0.08);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

.link-card.primary {
    background: var(--accent);
    color: #000;
    border: none;
}

.link-card.primary:hover {
    background: var(--accent-dark);
    box-shadow: 0 10px 25px rgba(172, 227, 92, 0.2);
}

/* Selection — compact stat-pills */
.selection-btn {
    padding: 20px 26px;
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.25rem, 4.5vw, 1.6rem);
    font-weight: 400;
    line-height: 1.15;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.selection-btn span {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 700;
    color: var(--text-muted);
}

/* Selection screen: same stat-pill look as academy /leaderboard hero-stats */
#selection-screen .btn-group .selection-btn.stat-pill {
    color: #fff;
    border-width: 1px;
    border-radius: 999px;
    box-shadow: none;
    overflow: hidden;
}

#selection-screen .btn-group .selection-btn.stat-pill span {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 0.12em;
}

#selection-screen .btn-group .stat-sales {
    border-color: color-mix(in srgb, var(--lb-sales) 45%, rgba(255, 255, 255, 0.1));
    background: color-mix(in srgb, var(--lb-sales) 12%, rgba(255, 255, 255, 0.03));
}

#selection-screen .btn-group .stat-ops {
    border-color: color-mix(in srgb, var(--lb-ops) 45%, rgba(255, 255, 255, 0.1));
    background: color-mix(in srgb, var(--lb-ops) 12%, rgba(255, 255, 255, 0.03));
}

#selection-screen .btn-group .selection-btn.stat-pill:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

#selection-screen .btn-group .stat-sales:hover {
    border-color: color-mix(in srgb, var(--lb-sales) 55%, rgba(255, 255, 255, 0.15));
    background: color-mix(in srgb, var(--lb-sales) 20%, rgba(255, 255, 255, 0.05));
}

#selection-screen .btn-group .stat-ops:hover {
    border-color: color-mix(in srgb, var(--lb-ops) 55%, rgba(255, 255, 255, 0.15));
    background: color-mix(in srgb, var(--lb-ops) 20%, rgba(255, 255, 255, 0.05));
}

#selection-screen .btn-group .selection-btn.stat-pill:active {
    transform: translateY(-1px);
}

/* VA + Client link stacks — same lane tints as academy leaderboard stat pills */
#va-screen .btn-group .link-card,
#client-screen .btn-group .link-card {
    color: #fff;
    border-width: 1px;
}

#va-screen .btn-group .link-card.stat-sales,
#client-screen .btn-group .link-card.stat-sales {
    border-color: color-mix(in srgb, var(--lb-sales) 45%, rgba(255, 255, 255, 0.1));
    background: color-mix(in srgb, var(--lb-sales) 12%, rgba(255, 255, 255, 0.03));
}

#va-screen .btn-group .link-card.stat-ops,
#client-screen .btn-group .link-card.stat-ops {
    border-color: color-mix(in srgb, var(--lb-ops) 45%, rgba(255, 255, 255, 0.1));
    background: color-mix(in srgb, var(--lb-ops) 12%, rgba(255, 255, 255, 0.03));
}

#va-screen .btn-group .link-card.stat-automation,
#client-screen .btn-group .link-card.stat-automation {
    border-color: color-mix(in srgb, var(--lb-automation) 45%, rgba(255, 255, 255, 0.1));
    background: color-mix(in srgb, var(--lb-automation) 12%, rgba(255, 255, 255, 0.03));
}

#va-screen .btn-group .link-card.stat-ai,
#client-screen .btn-group .link-card.stat-ai {
    border-color: color-mix(in srgb, var(--lb-ai) 45%, rgba(255, 255, 255, 0.1));
    background: color-mix(in srgb, var(--lb-ai) 12%, rgba(255, 255, 255, 0.03));
}

#va-screen .btn-group .link-card:hover,
#client-screen .btn-group .link-card:hover {
    transform: translateY(-3px);
    box-shadow: none;
}

#va-screen .btn-group .link-card.stat-sales:hover,
#client-screen .btn-group .link-card.stat-sales:hover {
    border-color: color-mix(in srgb, var(--lb-sales) 55%, rgba(255, 255, 255, 0.15));
    background: color-mix(in srgb, var(--lb-sales) 20%, rgba(255, 255, 255, 0.05));
}

#va-screen .btn-group .link-card.stat-ops:hover,
#client-screen .btn-group .link-card.stat-ops:hover {
    border-color: color-mix(in srgb, var(--lb-ops) 55%, rgba(255, 255, 255, 0.15));
    background: color-mix(in srgb, var(--lb-ops) 20%, rgba(255, 255, 255, 0.05));
}

#va-screen .btn-group .link-card.stat-automation:hover,
#client-screen .btn-group .link-card.stat-automation:hover {
    border-color: color-mix(in srgb, var(--lb-automation) 55%, rgba(255, 255, 255, 0.15));
    background: color-mix(in srgb, var(--lb-automation) 20%, rgba(255, 255, 255, 0.05));
}

#va-screen .btn-group .link-card.stat-ai:hover,
#client-screen .btn-group .link-card.stat-ai:hover {
    border-color: color-mix(in srgb, var(--lb-ai) 55%, rgba(255, 255, 255, 0.15));
    background: color-mix(in srgb, var(--lb-ai) 20%, rgba(255, 255, 255, 0.05));
}

/* Media Components */
.media-section {
    margin-top: 2rem;
    text-align: left;
    padding: 0 10px;
}

.media-section h2 {
    display: none;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

.image-grid img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.image-grid .img-large {
    grid-column: span 2;
    height: 180px;
}

.image-grid img:hover {
    transform: scale(1.03);
    border-color: var(--accent);
}

/* VA + Client — article / external link preview cards */
#va-screen .article-preview-grid,
#client-screen .article-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

#va-screen .article-preview-card,
#client-screen .article-preview-card {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
    text-align: left;
    min-width: 0;
}

#va-screen .article-preview-card.is-featured,
#client-screen .article-preview-card.is-featured {
    grid-column: span 2;
}

#va-screen .article-preview-card.is-span-full {
    grid-column: span 2;
}

#va-screen .article-preview-card.is-span-full .article-preview-thumb {
    height: 128px;
}

#va-screen .article-preview-card:hover,
#client-screen .article-preview-card:hover {
    border-color: color-mix(in srgb, var(--lb-sales) 50%, var(--border));
    transform: translateY(-2px);
}

#va-screen .article-preview-thumb,
#client-screen .article-preview-thumb {
    overflow: hidden;
    background: var(--card-bg);
}

#va-screen .article-preview-card.is-featured .article-preview-thumb,
#client-screen .article-preview-card.is-featured .article-preview-thumb {
    height: 160px;
}

/* Featured card in the old “video between links” slot — 16:9 */
#va-screen .article-preview-card.is-featured.article-preview-video-slot,
#client-screen .article-preview-card.is-featured.article-preview-video-slot {
    margin-top: 1.5rem;
}

#va-screen .article-preview-card.is-featured.article-preview-video-slot .article-preview-thumb,
#client-screen .article-preview-card.is-featured.article-preview-video-slot .article-preview-thumb {
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
}

#va-screen .article-preview-card.is-featured.article-preview-video-slot .article-preview-thumb img,
#client-screen .article-preview-card.is-featured.article-preview-video-slot .article-preview-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#va-screen .article-preview-card:not(.is-featured):not(.is-span-full) .article-preview-thumb,
#client-screen .article-preview-card:not(.is-featured) .article-preview-thumb {
    height: 100px;
}

#va-screen .article-preview-thumb img,
#client-screen .article-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

#va-screen .article-preview-card:hover .article-preview-thumb img,
#client-screen .article-preview-card:hover .article-preview-thumb img {
    transform: scale(1.04);
}

#va-screen .article-preview-meta,
#client-screen .article-preview-meta {
    padding: 8px 10px 10px;
}

#va-screen .article-preview-card.is-featured .article-preview-meta,
#client-screen .article-preview-card.is-featured .article-preview-meta {
    padding: 10px 12px 12px;
}

#va-screen .article-preview-meta h3,
#client-screen .article-preview-meta h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#va-screen .article-preview-card.is-featured .article-preview-meta h3,
#client-screen .article-preview-card.is-featured .article-preview-meta h3 {
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
}

#va-screen .article-preview-cta,
#client-screen .article-preview-cta {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

#va-screen .article-preview-card:not(.is-featured):not(.is-apply) .article-preview-cta,
#client-screen .article-preview-card:not(.is-featured) .article-preview-cta {
    display: none;
}

#va-screen .article-preview-card.is-apply .article-preview-cta {
    display: block;
}

.podcast-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.podcast-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--lb-automation);
}

.podcast-icon {
    width: 40px;
    height: 40px;
    background: var(--lb-automation);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: #000;
}

.podcast-info h3 {
    font-size: 0.95rem;
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.podcast-info p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 2px 0 0;
}

#va-screen .youtube-channel-card:hover {
    border-color: color-mix(in srgb, #ff0033 50%, var(--border));
}

#va-screen .youtube-channel-card .podcast-icon {
    background: #ff0033;
    color: #fff;
}

.video-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none; /* Firefox */
}

.video-gallery::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.video-thumb {
    flex: 0 0 140px;
    height: 80px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.video-thumb:hover {
    border-color: var(--accent);
}

.video-thumb::after {
    content: '▶';
    color: var(--accent);
    font-size: 1.2rem;
    opacity: 0.7;
}

/* Profile Header */
.profile {
    margin-bottom: 1.5rem;
    position: relative;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px; /* Squircle */
    background: var(--accent);
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    color: #000;
    transform: rotate(-3deg);
    transition: var(--transition);
    overflow: hidden;
}

/* Logo mark: full asset visible, no lime bleed or crop */
.avatar:has(> img) {
    background: #000;
    border: 2px solid var(--border);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 6px;
    display: block;
}

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

/* Back Button */
.back-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    transition: var(--transition);
    margin: 0 0 1.25rem 0; /* Clear margin from top, spacing to content below */
    font-size: 20px;
}

.back-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateX(-4px);
}

a.back-btn {
    text-decoration: none;
}

/* Social Icons */
.socials {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 0.5rem 0 1rem;
}

.social-icon {
    color: var(--text-dim);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 18px;
}

.social-icon i {
    display: flex;
}

.social-icon:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-5px) rotate(5deg);
    background: rgba(172, 227, 92, 0.05);
}

/* Micro-animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen.active .link-card {
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.screen.active .link-card:nth-child(1) { animation-delay: 0.1s; }
.screen.active .link-card:nth-child(2) { animation-delay: 0.2s; }
.screen.active .link-card:nth-child(3) { animation-delay: 0.3s; }
.screen.active .link-card:nth-child(4) { animation-delay: 0.4s; }

/* Background Glows */
.glow-1 {
    position: fixed;
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(172, 227, 92, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.glow-2 {
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(172, 227, 92, 0.08) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
