/* RIGLIFY STYLES - COPYRIGHT 2026 BY NOTHINGBUTTYLER. ALL RIGHTS RESERVED. */

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

body{
    font-family:'Inter',sans-serif;
    background:#0b0d12;
    color:white;
    overflow-x:hidden;
}

.navbar{
    width:100%;
    height:78px;

    display:flex;
    align-items:center;

    padding:0 18px;

    background:rgba(15,15,20,.82);
    backdrop-filter:blur(12px);

    border-bottom:1px solid rgba(255,255,255,.06);

    position:sticky;
    top:0;
    z-index:999;
}

.left-nav{
    flex:1;

    display:flex;
    align-items:center;
    gap:14px;

    min-width:0;
    overflow:hidden;
}

.nav-center{
    flex:1;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:40px;
}

.nav-right{
    flex:1;
    display:flex;
    justify-content:flex-end;
    align-items:center;
}

/* MENU BUTTON */

/* HIDE MENU BUTTON ON DESKTOP */

.menu-btn{
    display:none;
}

/* SHOW ON MOBILE/TABLET */

@media(max-width:900px){

    .menu-btn{
        display:flex;
        align-items:center;
        justify-content:center;
    }

}

.menu-btn{
    display:none;

    width:46px;
    height:46px;

    border:none;
    border-radius:14px;

    background:#171b24;
    color:white;

    font-size:18px;
    cursor:pointer;

    flex-shrink:0;

    border:1px solid rgba(255,255,255,.08);
}

/* MOBILE */

@media(max-width:900px){

    .menu-btn{
        display:flex;
        align-items:center;
        justify-content:center;
    }

}

/* LOGO */

.logo{
    width:52px;
    height:52px;
    border-radius:16px;
    overflow:hidden;
    flex-shrink:0;
}

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

/* BRAND */

.brand{
    min-width:0;

    overflow:hidden;
}

.brand h1{
    font-size:18px;
    font-weight:700;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.brand p{
    font-size:13px;
    color:#8d95a3;
    margin-top:3px;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}



.nav-center a {
    color: #d5d9e2;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color .2s, transform .2s;
    position: relative;
    padding: 10px 0;      /* Expanded clickable area */
    display: inline-block; /* Allows vertical padding to work properly */
}

/* Hover state for regular links */
.nav-center a:hover {
    color: white;
}

.nav-center a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;            /* Placed perfectly at the bottom of the text zone */
    width: 0%;
    height: 2px;
    border-radius: 999px;
    background: #7b8cff;
    transition: width .2s ease, height .2s ease, box-shadow .2s ease;
}

.nav-center a:hover::after {
    width: 100%;
}

/* ACTIVE PAGE STATE */
/* This keeps the underline at 100% width for the current page */
.nav-center a.active {
    color: white;
}

.nav-center a.active::after {
    width: 100%;
}

/* Interactive feedback when hovering over the ALREADY active link */
.nav-center a.active:hover::after {
    height: 3px;                                    /* Makes the line slightly thicker */
    background: #9caaff;                            /* Brightens the color slightly */
    box-shadow: 0 0 8px rgba(123, 140, 255, 0.6);   /* Adds a clean glowing effect */
}

/* ACCOUNT */

.account-btn{
    width:52px;
    height:52px;
    min-width:52px;
    min-height:52px;
    border:none;
    border-radius:50%;
    background:#171b24;
    color:white;
    font-size:18px;
    cursor:pointer;
    flex-shrink:0;
    border:1px solid rgba(255,255,255,.08);
}

/* TABLET */

@media(max-width:900px){

    .nav-center{
        display:none;
    }

}

/* MOBILE */

@media(max-width:500px){

    .brand-subtitle{
        display:none;
    }

    .navbar{
        padding:0 12px;
    }

    .left-nav{
        gap:10px;
    }

}

/* VERY SMALL */

@media(max-width:340px){

    .brand h1{
        font-size:16px;
    }

    .menu-btn,
    .account-btn{
        width:46px;
        height:46px;
        min-width:46px;
        min-height:46px;
    }

}



/* ACCOUNT BUTTON */

.account-btn{
    width:48px;
    height:48px;
    border:none;
    border-radius:50%;
    background:#171b24;
    color:white;
    font-size:18px;
    cursor:pointer;
    transition:.2s;
    border:1px solid rgba(255,255,255,.08);
}

.account-btn:hover{
    transform:scale(1.06);
    background:#202634;
}

/* MOBILE */

@media(max-width:850px){

    .nav-center{
        display:none;
    }

    .nav-left{
        min-width:auto;
    }

    .nav-right{
        min-width:auto;
    }

}


/* HERO */

.hero{
    width:100%;
    padding:70px 20px 40px;
    text-align:center;
}

.hero h2{
    font-size:42px;
    font-weight:800;
    line-height:1.1;
}

.hero span{
    background:linear-gradient(90deg,#7ba8ff,#8c72ff);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.hero p{
    margin-top:18px;
    color:#9ca3af;
    font-size:15px;
    max-width:600px;
    margin-inline:auto;
    line-height:1.6;
}

/* SEARCH */

.search-box{
    margin-top:35px;
    display:flex;
    justify-content:center;
    position:relative;
}

.search-wrapper{
    width:100%;
    max-width:750px;
    background:#141821;
    border-radius:20px;
    padding:10px;
    border:1px solid rgba(255,255,255,.08);
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.search-wrapper input{
    flex:1;
    min-width:180px;
    background:transparent;
    border:none;
    outline:none;
    color:white;
    padding:14px;
    font-size:15px;
}

.search-wrapper button{
    border:none;
    background:linear-gradient(135deg,#5b8cff,#785cff);
    color:white;
    padding:14px 20px;
    border-radius:14px;
    cursor:pointer;
    font-weight:600;
}

/* PLACEHOLDER SECTION */

.section{
    padding:20px;
    margin-top:30px;
}

.section-title{
    font-size:22px;
    margin-bottom:20px;
    font-weight:700;
}

/* GRID */

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:18px;
}

.card{
    background:#141821;
    border-radius:22px;
    padding:20px;
    border:1px solid rgba(255,255,255,.08);
    transition:.2s;
}

.card:hover{
    transform:translateY(-3px);
    border-color:rgba(123,168,255,.25);
}

.placeholder-img{
    width:100%;
    height:130px;
    border-radius:16px;
    background:linear-gradient(135deg,#1d2330,#2a3244);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#8fa3d1;
    font-size:30px;
}

.card h3{
    margin-top:16px;
    font-size:18px;
}

.card p{
    margin-top:10px;
    color:#99a0ae;
    font-size:14px;
    line-height:1.5;
}

/* FOOTER */

/* FOOTER */

.footer{
    margin-top:70px;
    padding:45px 20px 25px;
    border-top:1px solid rgba(255,255,255,.06);
    background:#0d1017;
}

/* TOP */

.footer-top{
    display:flex;
    justify-content:space-between;
    gap:40px;
    flex-wrap:wrap;
}

/* BRAND */

.footer-brand{
    display:flex;
    align-items:flex-start;
    gap:18px;
    max-width:320px;
}

.footer-logo{
    width:52px;
    height:52px;
    border-radius:16px;
    background:linear-gradient(135deg,#5b8cff,#785cff);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
    font-size:20px;
    box-shadow:0 0 25px rgba(91,140,255,.3);
}

.footer-brand h3{
    font-size:20px;
    margin-bottom:8px;
}

.footer-brand p{
    color:#9ba3b1;
    line-height:1.6;
    font-size:14px;
}

/* LINKS */

.footer-links{
    display:flex;
    gap:50px;
    flex-wrap:wrap;
}

.footer-column{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.footer-column h4{
    margin-bottom:6px;
    font-size:15px;
    color:white;
}

.footer-column a{
    color:#98a0ae;
    text-decoration:none;
    transition:.2s;
    font-size:14px;
    position:relative;
    width:fit-content;
}

.footer-column a:hover{
    color:white;
}

.footer-column a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-4px;
    width:0%;
    height:2px;
    border-radius:999px;
    background:#7b8cff;
    transition:width .2s ease;
}

.footer-column a:hover::after{
    width:100%;
}

/* SOCIALS */

.footer-socials{
    margin-top:35px;
    display:flex;
    gap:14px;
}

.footer-socials a{
    width:46px;
    height:46px;
    border-radius:14px;
    background:#151925;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    color:white;
    font-size:18px;
    border:1px solid rgba(255,255,255,.07);
    transition:.2s;
}

.footer-socials a:hover{
    transform:translateY(-3px);
    background:#1b2130;
    border-color:rgba(123,168,255,.3);
}

/* BOTTOM */

.footer-bottom{
    margin-top:35px;
    padding-top:20px;
    border-top:1px solid rgba(255,255,255,.06);
    display:flex;
    justify-content:space-between;
    gap:15px;
    flex-wrap:wrap;
}

.footer-bottom p{
    color:#7f8795;
    font-size:13px;
    line-height:1.6;
}

/* MOBILE */

@media(max-width:700px){

    .footer-top{
        flex-direction:column;
    }

    .footer-links{
        gap:35px;
    }

    .footer-bottom{
        flex-direction:column;
    }

}
    
    .footer-logo{
    width:58px;
    height:58px;
    border-radius:18px;
    overflow:hidden;
    flex-shrink:0;
}

.footer-logo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

  
 
  
  /* ABOUT SECTION */

.about-box{
    background:#141821;
    border-radius:24px;
    padding:28px;
    border:1px solid rgba(255,255,255,.08);
}

.about-box p{
    color:#a4acb9;
    line-height:1.8;
    margin-bottom:18px;
    font-size:15px;
}

.about-box p:last-child{
    margin-bottom:0;
}
    
    
    
    
    
    
    
    
    /* AUTH OVERLAY */

#auth-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.7);
    backdrop-filter:blur(10px);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:5000;
    padding:20px;
    overflow-y:auto;
}

/* BOX */

#auth-box{
    width:100%;
    max-width:430px;
    background:#11151d;
    border:1px solid rgba(255,255,255,.08);
    border-radius:28px;
    position:relative;
    overflow:hidden;
    box-shadow:0 0 50px rgba(0,0,0,.5);
    max-height:90vh;
overflow-y:auto;
}

/* CONTENT */

.auth-content{
    padding:40px 32px;
    text-align:center;
}

/* CLOSE */

#auth-close{
    position:absolute;
    top:18px;
    right:18px;
    width:42px;
    height:42px;
    border:none;
    border-radius:14px;
    background:#1a1f2b;
    color:white;
    cursor:pointer;
    font-size:18px;
}

/* LOGO */

.auth-logo{
    width:84px;
    height:84px;
    border-radius:24px;
    margin-bottom:22px;
}

/* TEXT */

.auth-content h1{
    font-size:28px;
    margin-bottom:14px;
}

.auth-content p{
    color:#9ca3af;
    line-height:1.7;
    font-size:15px;
}

/* BUTTONS */

.auth-buttons{
    margin-top:30px;
    display:flex;
    flex-direction:column;
    gap:14px;
}

.auth-buttons button{
    height:58px;
    border:none;
    border-radius:18px;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    transition:.2s;
}

/* DISCORD */

.discord-btn{
    background:#5865F2;
    color:white;
}

.discord-btn:hover{
    transform:translateY(-2px);
}

/* ROBLOX */

.roblox-btn{
    background:#1c2330;
    color:white;
    border:1px solid rgba(255,255,255,.08);
}

.roblox-btn:hover{
    background:#252d3d;
}

/* GUEST */

.guest-btn{
    background:transparent;
    color:#9ca3af;
}

.guest-btn:hover{
    color:white;
}

/* TERMS */

.auth-terms{
    display:block;
    margin-top:26px;
    color:#707887;
    font-size:13px;
    line-height:1.6;
}
    
    
    /* Fix for the anchor tag wrapping the card */
.grid a {
    text-decoration: none;
    color: inherit;
    display: block; /* Makes the whole card clickable */
}
    
/* Active Page State */
.nav-center a.active {
    color: white;
    display: inline-block;
    transition: transform .2s ease, color .2s ease;
}

.nav-center a.active::after {
    width: 100%;
}
    
    /* When hovering over the already active link */
.nav-center a.active:hover {
    transform: scale(1.05);
}

.account-wrapper{
    position:relative;

    display:flex;
    justify-content:flex-end;
}

#account-menu{
    position:absolute;
    top:60px;
    right:0;
    width:220px;
    background:#141821;
    border:1px solid rgba(255,255,255,.08);
    border-radius:20px;
    padding:10px;
    display:none;
    flex-direction:column;
    gap:6px;
    z-index:9999;
}

#account-menu a,
#account-menu button{
    width:100%;
    border:none;
    background:transparent;
    color:white;
    text-align:left;
    padding:14px;
    border-radius:14px;
    cursor:pointer;
    text-decoration:none;

    font-size:14px;
    font-family:'Inter',sans-serif;
}

#account-menu a:hover,
#account-menu button:hover{
    background:#1d2432;
}

#avatar-popup-overlay{
    animation:fadeOverlay .2s ease;
}

@keyframes fadeOverlay{

    from{
        opacity:0;
    }

    to{
        opacity:1;
    }

}

/* SIDEBAR */

#mobile-sidebar{
    position:fixed;
    top:0;
    left:-280px;

    width:280px;
    height:100vh;

    background:#11151d;

    z-index:99999;

    padding:24px;

    transition:.25s ease;

    display:flex;
    flex-direction:column;

    gap:18px;

    border-right:1px solid rgba(255,255,255,.08);
}

#mobile-sidebar.active{
    left:0;
}

.sidebar-top{
    display:flex;
    align-items:center;
    justify-content:space-between;

    margin-bottom:12px;
}

.sidebar-top button{
    width:42px;
    height:42px;

    border:none;
    border-radius:12px;

    background:#1a1f2b;
    color:white;

    cursor:pointer;
}

#mobile-sidebar a{
    color:white;
    text-decoration:none;

    padding:14px;
    border-radius:14px;

    transition:.2s;
}

#mobile-sidebar a:hover{
    background:#1b2130;
}

/* OVERLAY */

#sidebar-overlay{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.5);

    z-index:99998;

    display:none;
}

#sidebar-overlay.active{
    display:block;
}
    
#search-suggestions{
    position:absolute;

    top:100%;
    left:50%;
    transform:translateX(-50%);

    width:100%;
    max-width:750px;

    margin-top:10px;

    background:#141821;
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;

    overflow:hidden;

    display:none;

    box-shadow:0 10px 30px rgba(0,0,0,.35);

    z-index:998;
}

.search-suggestion{
    padding:16px 18px;

    cursor:pointer;

    transition:.15s;

    border-bottom:1px solid rgba(255,255,255,.05);

    color:#d5d9e2;
}

.search-suggestion:last-child{
    border-bottom:none;
}

.search-suggestion:hover{
    background:#1c2330;
}

.search-suggestion span{
    color:#7ba8ff;
    font-weight:700;
}
    
/* When hovering over the already active link */
.nav-center a.active:hover::after {
    height: 3px; /* Makes the line slightly thicker */
    background: #9caaff; /* Lightens the blue color a bit */
    box-shadow: 0 0 8px rgba(123, 140, 255, 0.6); /* Adds a subtle glow */
}

/* Active Page State */
.nav-center a.active {
    color: white;
}

.nav-center a.active::after {
    width: 100%;
}

#avatar-popup-overlay{
    display:none;

    position:fixed;
    inset:0;

    background:rgba(0,0,0,.75);
    backdrop-filter:blur(8px);

    z-index:9999;

    align-items:center;
    justify-content:center;
}

#avatar-popup-overlay.active{
    display:flex;
}

#avatar-popup{
    width:90%;
    max-width:700px;

    background:#141821;

    border:1px solid rgba(255,255,255,.08);
    border-radius:24px;

    padding:24px;

    position:relative;
}

#avatar-close{
    position:absolute;
    top:16px;
    right:16px;

    width:42px;
    height:42px;

    border:none;
    border-radius:12px;

    background:#1a1f2b;
    color:white;

    cursor:pointer;
}

/* TOOL STATUS */

.tool-status{
    margin-top:18px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 14px;
    border-radius:999px;
    font-size:13px;
    font-weight:600;
}

/* WORKING */

.tool-status.working{
    background:rgba(123,255,168,.12);
    color:#8effb0;
    border:1px solid rgba(123,255,168,.18);
}

/* DEVELOPMENT */

.tool-status.dev{
    background:rgba(255,200,90,.12);
    color:#ffd66e;
    border:1px solid rgba(255,200,90,.18);
}

/* OFFLINE */

.tool-status.offline{
    background:rgba(255,90,90,.12);
    color:#ff9b9b;
    border:1px solid rgba(255,90,90,.18);
}

/* UPDATE ITEMS */
.update-item{ padding-bottom:22px; margin-bottom:22px; border-bottom:1px solid rgba(255,255,255,.06);}
.update-item:last-child{ margin-bottom:0; padding-bottom:0; border-bottom:none;}
.update-item h3{ font-size:18px; margin-bottom:10px;}
.update-item p{ color:#a4acb9; line-height:1.7; font-size:15px;}

/* VIDEO PLAYER */
/* VIDEO PLAYER */
.video-player{ width:100%; background:#0f131b; border-radius:24px; overflow:hidden; border:1px solid rgba(255,255,255,.08);}
/* VIDEO */
.video-player video{ width:100%; aspect-ratio:16/9; display:block; background:black; object-fit:cover;}
/* CONTROLS */
.video-controls{ display:flex; align-items:center; gap:14px; padding:16px; background:#141821;}
.video-controls button{ width:42px; height:42px; border:none; border-radius:12px; background:#1d2432; color:white; cursor:pointer; font-size:15px;}
/* SEEK BAR */
/* WEBKIT */
.video-controls input[type="range"]{ flex:1; appearance:none; -webkit-appearance:none; height:6px; border-radius:999px; background:#2a3244; overflow:hidden; cursor:pointer;}
/* WEBKIT */
.video-controls input[type="range"]::-webkit-slider-thumb{ -webkit-appearance:none; appearance:none; width:14px; height:14px; border-radius:50%; background:#ffffff; border:none; cursor:pointer; box-shadow:-1000px 0 0 1000px #7b8cff;}
/* FIREFOX */
.video-controls input[type="range"]::-moz-range-thumb{ width:14px; height:14px; border:none; border-radius:50%; background:#ffffff; cursor:pointer;}
#time{ color:#a4acb9; font-size:14px; min-width:90px; text-align:right;}

#logout-overlay{
    display:none;

    position:fixed;
    inset:0;

    background:rgba(0,0,0,.7);
    backdrop-filter:blur(8px);

    align-items:center;
    justify-content:center;

    z-index:99999;
}

#logout-box{
    width:90%;
    max-width:400px;

    background:#141821;

    border-radius:24px;

    padding:28px;

    border:1px solid rgba(255,255,255,.08);

    text-align:center;
}

#logout-box h2{
    margin-bottom:12px;
}

#logout-box p{
    color:#9ca3af;
}

.logout-actions{
    margin-top:24px;

    display:flex;
    gap:12px;
}

.logout-actions button{
    flex:1;

    height:48px;

    border:none;
    border-radius:14px;

    cursor:pointer;

    font-family:'Inter',sans-serif;
}

.cancel-btn{
    background:#1d2432;
    color:white;
}

.logout-btn{
    background:#ef4444;
    color:white;
}

/* ==========================================================================
   RIGLIFY TOTAL CLEANUP - COMBINED DARK THEME & RESPONSIVE LAYOUT
   ========================================================================== */

/* --- 1. OVERLAY & POPUP CONTAINER --- */
#avatar-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

#avatar-popup-overlay.active {
    display: flex;
}

#avatar-popup {
    width: 95vw;
    max-width: 1100px;
    height: auto;
    max-height: 90vh;
    background: #141821;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow-y: auto;
}

/* Update the grid container to support the top row header spanning across */
.avatar-layout-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    row-gap: 16px; /* Explicit control over vertical gaps */
    column-gap: 28px;
    width: 100%;
}

/* Ensure the top header block stays clean and acts as a single container row */
.grid-top-header {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Adjust the banner margin to work nicely with the grid's top location */
.mobile-scroll-hint {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: rgba(91, 140, 255, 0.1);
    border: 1px solid rgba(91, 140, 255, 0.2);
    padding: 12px 16px;
    border-radius: 12px;
    color: #93b3ff;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    margin-bottom: 12px; /* Extra room below banner before content split */
}

/* --- 4. LEFT SIDE STYLING (PREVIEW & EXPORTS) --- */
.preview-box {
    width: 100%;
    background: #1a1f2b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.preview-avatar {
    width: 100% !important;
    height: 250px !important;
    object-fit: contain !important;
    display: block;
}

.preview-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    width: 100%;
    justify-content: center;
    background: #141821; 
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-toggle .toggle-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #8d95a3;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-toggle .toggle-btn.active-toggle {
    background: #1a1f2b;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.grid-download-types {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; 
    width: 100%;
}

.export-buttons .export-btn {
    flex: 1 1 auto; /* Fix: Allows buttons to grow automatically to fit text labels */
    padding: 12px 18px; /* Boosted padding keeps lettering locked inside safely */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: #1a1f2b;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap !important; 
    text-align: center;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.export-buttons .export-btn:hover {
    background: #232a3a;
    border-color: rgba(123, 168, 255, 0.3);
    transform: translateY(-2px);
}

.export-buttons .export-btn.secondary-export {
    background: linear-gradient(135deg, #5b8cff, #785cff);
    border: none;
}

.export-buttons .export-btn.secondary-export:hover {
    box-shadow: 0 4px 15px rgba(91, 140, 255, 0.2);
}

#moreFormats .export-btn {
    padding: 10px 16px;
    background: #1a1f2b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #d5d9e2;
    cursor: pointer;
    font-size: 14px;
}

/* --- 5. RIGHT SIDE STYLING (ASSET LIST & CARDS) --- */
.asset-scroll {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 6px;
}

.asset-card {
    display: flex;
    flex-direction: row; 
    align-items: center;
    gap: 16px;
    background: #141821; 
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 16px;
}

.asset-thumb {
    width: 90px;
    height: 90px;
    background: #1a1f2b;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 6px;
}

.asset-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.asset-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.asset-info h3 {
    margin: 0;
    font-size: 16px;
    color: white;
    font-weight: 600;
}

.asset-info button {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #5b8cff, #785cff);
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    width: fit-content;
    transition: transform .2s ease, box-shadow .2s ease;
}

.asset-info button:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 15px rgba(91, 140, 255, 0.2);
}

/* --- 6. RESPONSIVE MOBILE ADJUSTMENTS --- */
@media (max-width: 850px) {
    .avatar-layout-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    
    .preview-box {
        min-height: 280px;
    }
    
    .preview-avatar {
        height: 200px !important;
    }
    
    #avatar-popup {
        padding: 16px;
    }

    /* Activates the navigation helper bar cleanly on small browser spaces */
    .mobile-scroll-hint {
        display: flex;
    }
}

/* ==========================================================================
   RIGLIFY FORMATS OVERLAY CLEANUP - MATCHES WEBSITE DARK THEME
   ========================================================================== */

/* Dark blurred fullscreen modal mask background overlay */
.formats-overlay-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;   /* Forces full viewport width tracking */
    height: 100vh;  /* Forces full viewport height tracking */
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
}

/* Fluid capsule card container layout - Scales dynamically with window resizing */
.formats-pill-card {
    width: 100%;
    /* Dynamically calculates a smooth fluid size between 320px and 480px based on page width */
    max-width: clamp(320px, 85vw, 480px); 
    /* Ensures it never overflows the top/bottom of the page if the browser height is small */
    max-height: 85vh; 
    background: #11151d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 28px 32px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.55);
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Keeps the outer capsule container perfectly locked */
}

/* Modal Title bar layout */
.formats-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 18px; /* Increased slightly for visual hierarchy matching h3 rules */
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06); /* Changed from gray to your fine white divider */
    padding-bottom: 14px;
    margin-bottom: 18px;
}

/* Capsule cross X toggle button layout */
.formats-modal-close-x {
    background: #1a1f2b !important; /* Set to your system secondary button backdrop */
    border: none !important;
    border-radius: 12px; /* Smooth card style corners instead of plain unstyled vector */
    color: white !important;
    font-size: 18px !important;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    transition: background 0.2s, transform 0.2s;
}

.formats-modal-close-x:hover {
    color: #ef4444 !important; /* Retained your micro-feedback warning color indicator */
    background: #232a3a !important;
    transform: scale(1.05);
}

.formats-modal-scrollable-body {
    max-height: 380px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Category Grid Structure Layout */
.formats-grid-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .formats-grid-box {
        grid-template-columns: 1fr; /* Drop into single stacked list row on mobile screens */
    }
}

.modal-section-block {
    margin-bottom: 16px;
}

.modal-section-block h4 {
    font-size: 12px;
    font-weight: 700;
    color: #8d95a3; /* Reset color scheme to match your generic subtitle styles */
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-section-block button {
    display: block;
    width: 100%;
    background: #141821; /* Card backgrounds matching .account-menu dynamic buttons */
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #d5d9e2;
    text-align: left;
    font-size: 14px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    margin-bottom: 6px;
}

.modal-section-block button:hover {
    background: #1d2432;
    color: white;
    border-color: #7b8cff; /* Applies your accent color accenting hover outlines */
}

/* ==========================================================================
   RIGLIFY 3D MODEL VIEWER CONTAINER STYLES
   ========================================================================== */

/* The main container holding the 3D canvas environment */
.preview-3d-container {
    width: 100%;
    height: 350px; /* Aligns with your minimum box height limits */
    background: #0f131b; /* Matches your site's video-player baseline fill */
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The actual 3D rendering engine canvas element */
model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent; /* Prevents white flashing while loading model */
    --progress-bar-color: #7b8cff; /* Uses your iconic accent purple-blue */
    --progress-bar-height: 4px;
    cursor: grab;
}

model-viewer:active {
    cursor: grabbing;
}

/* Smooth glow effect behind the 3D avatar to bring out details in a dark space */
.preview-3d-container::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(123, 140, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: 10%;
    pointer-events: none; /* Keeps it from blocking click/drag rotations */
    z-index: 1;
}

/* Custom UI loading slot override to keep it styled natively */
.threed-loading-slot {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #8d95a3;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Small loading ring using your accent color */
.threed-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top-color: #7b8cff;
    border-radius: 50%;
    animation: spin3d 0.8s linear infinite;
}

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

/* =========================================================
   DOWNLOAD POPUP
========================================================= */

.download-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;

    justify-content: center;
    align-items: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
}

.download-popup {
    width: min(520px, 100%);

    max-height: 90vh;
    overflow-y: auto;

    padding: 32px;

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            #161b22,
            #0d1117
        );

    border: 1px solid rgba(255, 255, 255, 0.1);

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6);

    color: white;

    text-align: center;

    animation: downloadPopupIn 0.25s ease;
}

@keyframes downloadPopupIn {

    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

}

.download-popup-icon {

    width: 64px;
    height: 64px;

    margin: 0 auto 16px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(142, 68, 173, 0.18);

    color: #c084fc;

    font-size: 28px;

}

.download-popup h2 {

    margin: 0;

    font-size: 25px;

}

.download-popup-subtitle {

    color: #9ca3af;

    margin: 10px 0 25px;

}

.download-checklist {

    display: flex;

    flex-direction: column;

    gap: 12px;

    text-align: left;

    padding: 18px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.04);

}

.download-step {

    display: flex;

    align-items: center;

    gap: 12px;

    color: #9ca3af;

    transition: 0.25s ease;

}

.download-step i {

    width: 20px;

    text-align: center;

    font-size: 18px;

}

.download-step.completed {

    color: #22c55e;

}

.download-step.completed i {

    color: #22c55e;

}

.download-progress-note {

    color: #6b7280;

    font-size: 13px;

    margin-top: 18px;

}

.success-icon {

    background: rgba(34, 197, 94, 0.15);

    color: #22c55e;

}

.failure-icon {

    background: rgba(239, 68, 68, 0.15);

    color: #ef4444;

}

.download-popup-section {

    margin-top: 24px;

    text-align: left;

}

.download-popup-section h3 {

    margin-bottom: 12px;

    font-size: 16px;

}

.download-popup-buttons {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

}

.download-popup-buttons a,

.download-popup-buttons button,

.download-popup-close {

    border: none;

    border-radius: 10px;

    padding: 10px 14px;

    background: #8e44ad;

    color: white;

    text-decoration: none;

    cursor: pointer;

    font-family: inherit;

    transition: 0.2s ease;

}

.download-popup-buttons a:hover,

.download-popup-buttons button:hover,

.download-popup-close:hover {

    transform: translateY(-2px);

    background: #a855f7;

}

.tutorial-buttons a {

    background: #242b35;

}

.download-error-box {

    margin: 20px 0;

    padding: 14px;

    border-radius: 10px;

    background: rgba(239, 68, 68, 0.12);

    border: 1px solid rgba(239, 68, 68, 0.3);

    color: #fca5a5;

    word-break: break-word;

}

.download-error-box strong {

    display: block;

    margin-bottom: 6px;

    color: #ef4444;

}

.download-failure-message {

    color: #9ca3af;

    font-size: 14px;

    line-height: 1.6;

    margin-bottom: 20px;

}

.download-popup-close {

    margin-top: 25px;

    background: #242b35;

}


/* ============================================================
   RIGLIFY IMPORT / ERROR POPUPS
   ============================================================ */

.riglify-import-dialog {
    width: 100%;
    min-height: 330px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    box-sizing: border-box;

    padding: 50px 45px;
}

/* Main icon */
.riglify-dialog-icon {
    width: 76px;
    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 24px;

    border-radius: 22px;

    background: #111827;
    color: #38bdf8;

    font-size: 34px;
}

/* Error icon */
.riglify-dialog-icon.error-icon {
    color: #ef4444;
}

/* Title */
.riglify-import-dialog h2 {
    margin: 0;

    color: #f8fafc;

    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

/* Main description */
.riglify-import-dialog p {
    max-width: 470px;

    margin: 14px auto 0;

    color: #9ca3af;

    font-size: 15px;
    line-height: 1.6;
}

/* Error explanation */
.riglify-dialog-reason {
    color: #d1d5db !important;

    font-weight: 500;
}

/* Extra help text */
.riglify-dialog-help {
    max-width: 440px;

    margin-top: 22px !important;

    color: #6b7280 !important;

    font-size: 13px !important;
    line-height: 1.55 !important;
}


/* ============================================================
   SLOW IMPORT MESSAGE
   ============================================================ */

#slow-import-message {
    color: #6b7280 !important;

    font-size: 13px !important;
}


/* ============================================================
   RIGLIFY IMPORT / ERROR POPUP
   ============================================================ */

#avatar-popup:has(.riglify-import-dialog) {
    width: 540px !important;
    height: 540px !important;

    min-width: 0 !important;
    min-height: 0 !important;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);

    box-sizing: border-box;
}

#avatar-popup:has(.riglify-import-dialog) #avatar-popup-content {
    width: 100%;
    height: 100%;
}


/* ============================================================
   CONTENT
   ============================================================ */

.riglify-import-dialog {
    width: 100%;
    height: 100%;
    min-height: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    box-sizing: border-box;

    padding: 45px 40px;
}

.riglify-dialog-icon {
    width: 78px;
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 24px;

    border-radius: 22px;

    background: #111827;
    color: #38bdf8;

    font-size: 35px;
}

.riglify-dialog-icon.error-icon {
    color: #ef4444;
}

.riglify-import-dialog h2 {
    margin: 0;
    font-size: 31px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.riglify-import-dialog p {
    max-width: 500px;
    margin: 16px auto 0;

    color: #9ca3af;

    font-size: 17px;
    line-height: 1.6;
}

.riglify-dialog-reason {
    font-size: 17px !important;
    font-weight: 600;
    color: #d1d5db !important;
}

.riglify-dialog-help {
    max-width: 480px;
    margin-top: 25px !important;

    font-size: 14px !important;
    line-height: 1.6 !important;
}


/* ============================================================
   SPINNER
   ============================================================ */

.riglify-dialog-icon .fa-spin {
    animation: riglify-spin 1s linear infinite !important;
}

@keyframes riglify-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

    #avatar-popup:has(.riglify-import-dialog) {
        width: calc(100vw - 28px) !important;
        height: calc(100vw - 28px) !important;

        max-width: calc(100vw - 28px);
        max-height: calc(100vh - 28px);
    }

    .riglify-import-dialog {
        padding: 35px 22px;
    }

    .riglify-dialog-icon {
        width: 68px;
        height: 68px;
        font-size: 30px;
    }

    .riglify-import-dialog h2 {
        font-size: 25px;
    }

    .riglify-import-dialog p {
        font-size: 14px;
    }
}
