:root {
    --primary-color: #9637ae; /* Medium violet requested */
    --bg-page: #FAF9FF; /* Even lighter, nearly white with a lavender tint */
    --card-bg: #FFFFFF;
    --text-main: #1A1A1A;
    --text-grey: #6B7280;
    --border-color: #E5E7EB;
    --pill-bg: #F3F4F6;
    
    --shadow-soft: 0px 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-floating: 0px 8px 24px rgba(0, 0, 0, 0.1);
    
    --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden !important;
}

/* Background Pattern */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: var(--bg-page);
    background-image: url('premium-bg-light-violet.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* Sidebar structure */
.sidebar {
    position: sticky;
    top: 48px;
    width: 380px;
    flex-shrink: 0;
    align-self: flex-start;
    padding-top: 100px; /* Space for avatar overhang */
}

/* Base Card Styles */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0px 2px 4px -1px rgba(0,0,0,0.05), 0px 4px 5px 0px rgba(0,0,0,0.02);
    padding: 24px;
}

/* Profile specific card */
.profile-card {
    background: var(--card-bg);
    border-radius: 32px;
    box-shadow: var(--shadow-soft);
    padding: 24px;
    padding-top: 110px; /* Space for avatar */
    text-align: center;
    position: relative;
    /* margin-top moved to sidebar padding */
}

/* Overlapping Avatar */
.avatar-wrapper {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    /* Creatorsjet has an inner container style but effectively uses a white border then colored border */
    background: white;
    padding: 8px; /* White gap */
}

.avatar-wrapper img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.creator-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.verified-icon {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

.location {
    color: var(--text-grey);
    font-size: 16px;
    margin-bottom: 16px;
}

.total-followers-row {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-grey);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.total-followers-count {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--primary-color), #4F46E5);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.counter-pulse {
    animation: counter-pulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes counter-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: var(--primary-color); }
    100% { transform: scale(1); }
}

.social-icons-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.social-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px 12px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.social-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    opacity: 0.6;
}

.social-stat.tiktok::before { background: #000; }
.social-stat.instagram::before { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-stat.youtube::before { background: #FF0000; }

.social-stat:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    border-color: transparent;
}

.social-stat img {
    transition: transform 0.3s ease;
    z-index: 1;
}

.social-stat:hover img {
    transform: scale(1.1);
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    z-index: 1;
}

.social-stat .count {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.social-stat .stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo-wrapper {
    height: 72px; /* Providing space for the enlarged focal logos */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    margin-bottom: 8px;
}

/* Specific Logo Sizes - Enlarge Instagram while keeping others same */
.stat-logo-tk { height: 32px; width: auto; border-radius: 6px; }
.stat-logo-ig { height: 60px; width: auto; border-radius: 12px; }
.stat-logo-yt { height: 60px; width: auto; } /* Keeping YouTube at 60px as requested */

/* Enhanced Counting State */
.social-stat .count.counting {
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(150, 55, 174, 0.2);
}

.bio-text {
    color: var(--text-grey);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Primary Button */
.btn-contact {
    display: block;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    text-transform: none;
    padding: 14px 28px;
    border-radius: 100px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-contact:hover {
    box-shadow: 0px 4px 12px rgba(150, 55, 174, 0.4);
    transform: translateY(-2px);
}

/* Secondary Button (Contact links) */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--pill-bg);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #E5E7EB;
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

/* Tags and Pills */
.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    background-color: var(--pill-bg);
    color: #4B5563;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Main Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0; /* Safety against widening */
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
}

/* Grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 16px;
}

.stat-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* About Text inside card */
.about-card p {
    color: var(--text-grey);
    font-size: 16px;
    line-height: 1.7;
}
.about-card strong {
    color: var(--text-main);
    font-weight: 700;
}
/* Insights & Data */
.platform-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.platform-tab {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-grey);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: var(--font-family);
}
.platform-tab:hover {
    background: #f9fafb;
}
.platform-tab.active {
    border-color: var(--primary-color);
    color: var(--text-main);
    box-shadow: 0 0 0 1px var(--primary-color);
}
.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.last-updated {
    font-size: 13px;
    color: var(--text-grey);
}
.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
}

.detailed-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.d-stat-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.d-icon-info {
    position: absolute;
    top: 20px; right: 20px;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 1px solid #ccc;
    color: #ccc;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: bold; font-family: sans-serif;
}
.d-stat-lbl {
    font-size: 14px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.d-stat-val {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -1px;
    transition: all 0.3s ease;
}

.d-stat-val.counting {
    color: var(--primary-color);
    transform: scale(1.05);
}
.d-stat-sub {
    font-size: 12px;
    color: #10B981;
    font-weight: 600;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Audience Grid */
.audience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.audience-card {
    padding: 24px;
}
.a-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Donut Chart */
.donut-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 32px auto;
    position: relative;
    background: conic-gradient(var(--primary-color) 0% 79%, #FDE68A 79% 99%, #E5E7EB 99% 100%);
}
.donut-inner {
    position: absolute;
    top: 45px; left: 45px; right: 45px; bottom: 45px;
    background: white;
    border-radius: 50%;
}
.gender-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.g-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}
.g-label { display: flex; align-items: center; gap: 8px; color: var(--text-grey); }
.g-dot { width: 10px; height: 10px; border-radius: 50%; }
.g-val { font-weight: 700; color: var(--text-main); }

/* Progress Bars */
.a-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    position: relative;
    padding: 8px 12px;
}
.a-row:last-child { margin-bottom: 0; }
.a-bg {
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    border-radius: 6px;
    z-index: 0;
    background: #FFFBEB;
}
.a-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: #FDE68A;
    border-radius: 6px;
    z-index: 1;
}
.a-name { position: relative; z-index: 2; font-weight: 600; color: var(--text-main); }
.a-perc { position: relative; z-index: 2; font-weight: 700; color: var(--text-main); }

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.carousel-nav {
    display: flex !important;
    gap: 12px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(150, 55, 174, 0.3);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-main);
    transition: fill 0.2s;
}

.nav-btn:hover:not(:disabled) svg {
    fill: #fff;
}

.nav-btn:disabled {
    cursor: default;
}

/* Videos */
.videos-grid {
    display: flex;
    overflow-x: hidden;
    gap: 20px;
    padding: 10px 4px 15px 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
}

@media (max-width: 1024px) {
    .videos-grid {
        overflow-x: auto; /* Allow sliding on touch screens */
    }
}

.videos-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
}

.video-item {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 200px;
    max-width: 250px;
    aspect-ratio: 9/16;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #000;
    cursor: pointer;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.12);
    scroll-snap-align: start;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0px 12px 32px rgba(0, 0, 0, 0.18);
}

.video-wrapper {
    width: 100%;
    height: 100%;
}

.video-wrapper img, 
.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.video-item:hover img,
.video-item:hover video {
    transform: scale(1.05);
}

.play-btn-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.25s ease;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
}

.play-btn-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-btn-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #4F46E5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(150, 55, 174, 0.5), 0 0 0 6px rgba(255,255,255,0.15);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.play-btn-circle:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 32px rgba(150, 55, 174, 0.65), 0 0 0 8px rgba(255,255,255,0.2);
}

.play-btn-circle svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    margin-left: 3px;
}

.pause-btn-circle svg {
    margin-left: 0;
}

/* Loading spinner */
.video-loading .play-btn-circle {
    background: rgba(255,255,255,0.2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 6px rgba(255,255,255,0.1);
}

.spinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 16px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.v-title {
    color: white;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Social Links Grid */
.social-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.social-link-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 16px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-soft);
    border: 1px solid transparent;
}

.social-link-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-floating);
    background: #fff;
}

.social-link-card.instagram:hover { border-color: #E1306C; }
.social-link-card.tiktok:hover { border-color: #000; }
.social-link-card.youtube:hover { border-color: #FF0000; }

.social-link-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
    display: block;
}

/* Visual balance adjustments */
.social-link-card.instagram img { width: 44px; height: 44px; }
.social-link-card.tiktok img { width: 34px; height: 34px; }
.social-link-card.youtube img { width: 56px; height: 56px; }

.social-info {
    display: flex;
    flex-direction: column;
}

.social-name {
    font-weight: 800;
    color: var(--text-main);
    font-size: 18px;
    display: block;
}

.social-handle {
    font-size: 13px;
    color: var(--text-grey);
    font-weight: 500;
}

/* Responsive constraints */
@media (max-width: 1024px) {
    .container {
        display: block; /* Switch from flex to block for stability */
        padding: 16px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .sidebar {
        width: 100% !important;
        max-width: 100%;
        position: static;
        padding-top: 100px; /* Space for avatar overhang */
        margin-bottom: 40px;
    }
    
    .content-area {
        width: 100% !important;
        padding: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .two-col-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 18px; /* Slightly smaller to leave room for arrows */
        margin-bottom: 20px;
    }

    .content-header .section-title {
        margin-bottom: 0;
    }

    .content-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .video-item {
        flex: 0 0 calc(75% - 15px);
        min-width: 200px;
    }
    .avatar-wrapper {
        width: 130px;
        height: 130px;
        top: -65px;
    }
    .profile-card {
        margin-top: 65px;
        padding: 16px;
        padding-top: 75px;
    }
    .creator-name {
        font-size: 20px;
    }

    .social-links-grid {
        margin-top: 0;
    }
}

@media (max-width: 600px) {
    .social-links-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer Section */
.footer {
    width: 100%;
    padding: 32px 24px;
    background: transparent;
    border-top: 1px solid var(--border-color);
    margin-top: 48px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    color: var(--text-grey);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-separator {
    color: var(--border-color);
}

.mentions-link {
    cursor: pointer;
    opacity: 0.8;
}

.mentions-link:hover {
    opacity: 1;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #4F46E5;
    text-decoration: underline;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--card-bg);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-floating);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #FAF9FF, #FFFFFF);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.close-modal {
    background: var(--pill-bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-grey);
    transition: all 0.2s;
}

.close-modal:hover {
    background: #E5E7EB;
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-grey);
    margin-bottom: 12px;
    font-weight: 700;
}

.modal-section p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 4px;
}

.modal-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.modal-section a:hover {
    text-decoration: underline;
}
