/* =========================================
   COMPONENT: PROFILE (Radiant Flow v10)
   Migrated from radiant_profile.css
   ========================================= */

/* Local Variables for Profile (Scoped to avoid global pollution if possible, 
   but keeping at root for now to ensure identical match as requested) */
:root {
    --profile-bg: #FAFAFA;
    --profile-glass: rgba(255, 255, 255, 0.85);
    --profile-blur: saturate(180%) blur(20px);
    --profile-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --profile-accent-1: #FF2E63;
    --profile-accent-2: #08D9D6;
    --profile-accent-3: #252A34;
    --profile-grad-1: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%);
}

/* 1. LAYOUT GRID (Universal) */
.app-shell {
    /* Previously body styles */
    position: fixed;
    /* Take over the viewport */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    background: #f8f8f8;
    color: var(--profile-accent-3);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
    overflow: hidden;
    z-index: 10;
    /* Ensure it sits on top of standard layout stuff if mixed */

    /* Grid Layout */
    display: grid;
    grid-template-columns: 1fr;
    /* Single column */
    grid-template-rows: 1fr 70px;
    /* Content + Mobile Nav */
    justify-items: center;
    /* Center the content */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

@media (min-width: 1024px) {
    .app-shell {
        grid-template-columns: 80px 1fr 320px;
        /* Restore 3 columns */
        grid-template-rows: 1fr;
        background: #fafafa;
    }

    /* Limit width of profile column when centered */
    .profile-col {
        width: 100%;
        max-width: 100%;
        /* Let it fill the center column, internal container handles width */
        padding: 40px;
        padding-bottom: 40px;
        background: transparent;
        /* Remove white background from column itself */
        box-shadow: none;
        /* Remove shadow from column */
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Center the internal card */
    }
}

/* 2. LEFT NAV (Desktop) */
.nav-col {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    background: white;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10;
}

@media (min-width: 1024px) {
    .nav-col {
        display: flex;
    }
}

.logo-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(45deg, var(--profile-accent-1), var(--profile-accent-2));
    margin-bottom: 40px;
    cursor: pointer;
    transition: 0.3s;
}

.logo-box:hover {
    transform: rotate(180deg);
}

.nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    color: #ccc;
    margin-bottom: 25px;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 12px;
}

.nav-btn:hover {
    color: var(--profile-accent-1);
    background: rgba(0, 0, 0, 0.03);
}

.nav-btn.active {
    color: white;
    background: var(--profile-accent-3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 3. CENTER: PROFILE SCROLL */
.profile-col {
    position: relative;
    overflow-y: scroll;
    scroll-behavior: smooth;
    border-radius: 0;
    padding-bottom: 80px;
}

.profile-col::-webkit-scrollbar {
    display: none;
}

@media (min-width: 1024px) {
    .profile-col {
        padding: 40px;
        padding-bottom: 40px;
    }
}

/* PROFILE HEADER */
.p-header {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    /* Make this the card on desktop */
    width: 100%;
}


.cover-art {
    width: 100%;
    height: 250px;
    border-radius: 0 0 40px 40px;
    background-position: center;
    background-size: cover;
    margin-bottom: -60px;
}

@media (min-width: 1024px) {
    .cover-art {
        border-radius: 30px;
        height: 300px;
        margin-bottom: -70px;
    }
}

.p-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid white;
    background-position: center;
    background-size: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
    cursor: pointer;
    transition: 0.3s;
    box-sizing: content-box !important;
    /* Force match with raw HTML template */
}

.p-avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

/* P-NAME */
.p-name {
    font-size: 2rem;
    font-weight: 800;
    margin: 15px 0 5px 0;
    color: #111;
    letter-spacing: -1px;
    line-height: 1.1;
    /* Tighten to match template defaults */
}

/* P-HANDLE */
.p-handle {
    font-size: 1rem;
    color: #888;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.2;
    /* Tighten to match template defaults */
}

/* STATS */
.p-stats {
    display: flex;
    justify-content: center;
    gap: 15px !important;
    margin-bottom: 25px !important;
    width: 100%;
}

.stat-pill {
    background: white;
    padding: 10px 20px !important;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px !important;
    cursor: pointer;
    transition: 0.2s;
    box-sizing: content-box !important;
    /* Force match with raw HTML template */
}

.stat-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-val {
    font-size: 1.1rem;
    color: #111;
    font-weight: 700;
    margin-bottom: 0px;
    line-height: normal;
}

.stat-lbl {
    font-size: 0.7rem;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
    letter-spacing: normal;
}

/* ACTIONS */
.p-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
    margin-bottom: 0px;
}

.act-btn-p {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    border: none;
    font-size: 1rem;
    min-width: auto;
    box-sizing: content-box !important;
    /* Force match with raw HTML template */
}

.btn-primary {
    background: var(--profile-accent-3);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: scale(1.05);
    background: black;
}

.act-btn-p.btn-primary {
    background: var(--profile-accent-3);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.act-btn-p.btn-primary:hover {
    transform: scale(1.05);
    background: black;
}

.act-btn-p.btn-primary:active {
    transform: scale(0.96);
    /* Standard active state */
}

.act-btn-p.btn-secondary {
    background: white;
    color: #333;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.act-btn-p.btn-secondary:hover {
    background: #f0f0f0;
}

.btn-secondary {
    background: white;
    color: #333;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f0f0f0;
}


/* CONTENT GRID */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 0;
    }
}

.grid-item {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
    background: #f0f0f0;
}

.grid-item:hover {
    transform: scale(1.02);
    z-index: 5;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: white;
    opacity: 0;
    transition: 0.2s;
    display: flex;
    gap: 15px;
}

.grid-item:hover .grid-overlay {
    opacity: 1;
}

.ov-stat {
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}


/* 4. RIGHT: CHAT (Desktop) */
.chat-col {
    display: none;
    background: white;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    flex-direction: column;
    padding: 25px;
}

@media (min-width: 1024px) {
    .chat-col {
        display: flex;
    }
}

.c-title {
    font-weight: 700;
    color: #ccc;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.c-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.c-row {
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: 0.2s;
}

.c-row:hover {
    background: #f5f5f5;
}

.c-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    border: 1px solid #eee;
}

.c-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.c-sub {
    font-size: 0.8rem;
    color: #888;
}


/* 5. MOBILE BOTTOM NAV */
.mob-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.02);
}

@media (min-width: 1024px) {
    .mob-nav {
        display: none;
    }
}

.mn-item {
    font-size: 1.5rem;
    color: #ccc;
    transition: 0.2s;
}

.mn-item.active {
    color: var(--profile-accent-1);
    transform: translateY(-2px);
}

.profile-col {
    /* If the view is wrapped in .profile-col by the Controller/View, 
       we ensure it takes full height/width of the center grid cell */
    height: 100vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-bottom: 100px;
}

/* Hide Scrollbar */
.profile-col::-webkit-scrollbar {
    display: none;
}

.v10-theme-wrapper::-webkit-scrollbar {
    display: none;
}

/* 2. SECTIONS (Full Screen Snapping or continuous) */
.section {
    position: relative;
    width: 100%;
    min-height: 80vh;
    /* Make sections substantial */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Bottom aligned content like TikTok/Reels */
    padding: 20px;
    margin-bottom: 2px;
    /* Tiny gap */
    border-radius: var(--radius-lg);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .section {
        min-height: 85vh;
        /* Slightly taller on desktop */
        border-radius: 30px;
        margin-bottom: 20px;
    }
}

/* Overlay Gradient */
.section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8));
    z-index: 1;
}

/* 3. PROFILE HERO (Header Section) */
.profile-hero {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding-bottom: 60px;
}

.avatar-glow {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    margin-bottom: 15px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

/* 4. CONTENT SECTIONS (Posts) */
.content-info {
    position: relative;
    z-index: 2;
    color: white;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* 5. ACTIONS (Floating Side Bar or Bottom) */
.action-bar {
    position: absolute;
    right: 20px;
    bottom: 100px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.action-label {
    font-size: 0.75rem;
    color: white;
    margin-top: 5px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* 6. SCROLL HINT */
.scroll-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    animation: bounce 2s infinite;
    z-index: 10;
    font-size: 1.5rem;
    opacity: 0.7;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}