@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@900&family=Outfit:wght@300;400;600;800&family=Inter:wght@400;500;700&display=swap');

:root {
    --primary: #5865f2;
    --primary-glow: rgba(88, 101, 242, 0.5);
    --secondary: #eb459e;
    --bg-dark: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --header-bg: rgba(10, 10, 12, 0.42);
}

/* Granular Text Dodging Styles */
.dodge-char {
    display: inline-block;
    transition: transform 0.1s ease-out, color 0.3s ease;
    cursor: text;
    will-change: transform;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

body.portal-loading {
    overflow-y: hidden;
}

body.portal-entrance-complete {
    overflow-y: auto;
}

/* Hide scrollbars while keeping wheel/touch/keyboard scrolling available. */
html,
body {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

* {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Hide content sections initially to orchestration entrance */
.glass-header {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}

body.portal-loading .glass-header,
body.portal-ready .glass-header {
    opacity: 0;
    transform: translateY(-120%);
}

body.portal-header-ready .glass-header {
    opacity: 1;
    transform: translateY(0);
}

.hero-content,
.preview-main-panel,
.preview-title-row,
.shop-hero-content {
    opacity: 1;
    transform: none;
    transition: none;
}

#hero-canvas {
    opacity: 0 !important;
    transition: opacity 1.5s ease !important;
}

body.portal-loading>main,
body.portal-loading>section,
body.portal-loading>footer,
body.portal-ready>main,
body.portal-ready>section,
body.portal-ready>footer,
body.portal-header-ready>main,
body.portal-header-ready>section,
body.portal-header-ready>footer {
    opacity: 0;
    transform: translateY(42px);
    filter: blur(10px);
    transition: opacity 0.75s ease, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), filter 0.75s ease;
}

body>main.stage-visible,
body>section.stage-visible,
body>footer.stage-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Shop Intro Header Reveal - Forced Hidden by default */
.shop-intro-header {
    opacity: 0 !important;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.shop-intro-header.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}


.shop-notice {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.15);
    animation: pulse-border 2s infinite alternate;
}

@keyframes pulse-border {
    0% {
        border-color: rgba(88, 101, 242, 0.2);
    }

    100% {
        border-color: rgba(88, 101, 242, 0.6);
    }
}


#hero.stage-visible #hero-canvas {
    opacity: 1 !important;
}

body.portal-loader-complete #loading-bar,
body.portal-loader-complete #loading-mascot {
    opacity: 0;
    pointer-events: none;
}

/* Sleek Top Loading Bar */
#loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    z-index: 10000;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 0.4s ease;
}

/* mascot character on loading bar */
#loading-mascot {
    position: fixed;
    top: 5px;
    /* Positioned slightly overlap or below the bar for a "weighted" feel */
    left: 0;
    width: 44px;
    height: 44px;
    z-index: 10001;
    transform: translateX(-50%);
    transition: left 0.4s ease, opacity 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

#loading-mascot.walking {
    animation: mascot-walk 0.5s infinite alternate ease-in-out;
}

@keyframes mascot-walk {
    0% {
        transform: translateX(-50%) translateY(0) rotate(-8deg);
    }

    100% {
        transform: translateX(-50%) translateY(-5px) rotate(8deg);
    }
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image: url('img/bg_pattern.png');
    background-repeat: repeat;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: 0 0;
    transition: opacity 0.6s ease;
}

body.portal-bg-ready::before {
    opacity: 0.2;
}

.community-page {
    background-color: var(--bg-dark);
    padding-top: 0;
}

.community-page .community-section {
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding: 0 0 4rem !important;
    min-height: auto;
}

.community-page .community-section::before {
    content: none;
}

.community-page .community-section>.container {
    position: relative;
    z-index: 1;
}

.community-page .community-section>.container {
    margin-top: 0;
    padding-top: 5.75rem;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
}

/* --- Layout --- */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Navigation --- */
.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-size: 1rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    border-radius: 2px;
}

section {
    padding: 4rem 0;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    padding: 0.4rem 0;
    transition: transform 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.header-center {
    display: flex;
    gap: 3rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* --- Mobile Drawer System --- */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10002;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    background: linear-gradient(165deg, rgba(15, 15, 20, 0.98) 0%, rgba(10, 10, 12, 0.98) 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 20001;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 2rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-content {
    padding: 0 1.5rem 3rem;
}

.drawer-row {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-section {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.drawer-user-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    flex: 0 0 48px;
}

.drawer-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.3rem;
}

.drawer-user-nick {
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
}

.drawer-user-status,
.points-label,
.lang-label,
.drawer-nav-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.drawer-points {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.points-display {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.drawer-coin-icon,
.drawer-points img {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    object-fit: contain;
}

.drawer-points .user-balance-val {
    font-size: 1.05rem !important;
    line-height: 1;
}

.drawer-lang {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.drawer-lang-selector select {
    width: 100%;
    background: #333;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    appearance: none;
}

.lang-selector select option,
.drawer-lang-selector select option {
    background: #333;
    color: white;
}

.drawer-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.drawer-nav-label {
    padding: 0.2rem 1.2rem 0.15rem;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.drawer-nav-item:hover,
.drawer-nav-item.active {
    background: rgba(88, 101, 242, 0.1);
    color: white;
}

.drawer-nav-item .nav-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.drawer-sub-menu {
    padding-left: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.drawer-sub-item {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.drawer-sub-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 980px) {
    .mobile-menu-btn {
        display: block;
    }

    .header-content {
        height: 60px;
        padding: 0 1rem;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0 !important;
    }

    .brand {
        flex: 0 0 auto !important;
        display: flex !important;
    }

    .header-center {
        display: contents !important;
    }

    .header-content>div:last-child {
        display: contents !important;
    }

    .nav-text {
        display: none;
    }

    .nav-link {
        padding: 0.6rem;
    }

    .nav-icon {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* Body Text Size Reductions for Mobile */
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    #hero h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    #hero .hero-subtitle {
        font-size: 0.8rem;
        opacity: 0.8;
    }

    .hero-desc {
        font-size: 1.1rem !important;
        margin-bottom: 2rem !important;
    }

    section h2,
    .section-title {
        font-size: 2.2rem !important;
        letter-spacing: -1px !important;
        margin-bottom: 1rem !important;
    }

    section p {
        font-size: 1rem !important;
    }

    .news-meta div:first-child {
        font-size: 1.2rem !important;
    }

    .news-body h3 {
        font-size: 1.25rem !important;
    }

    .news-body p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    .glass-panel h3,
    .feature-panel h3 {
        font-size: 1.3rem !important;
    }

    .glass-panel p,
    .feature-panel p {
        font-size: 0.95rem !important;
    }

    /* Move bulky desktop items to drawer */
    .lang-selector,
    .header-points,
    #header-user-profile,
    #btn-install {
        display: none !important;
    }
}


.ambient-glow {
    position: absolute !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

/* --- Glassmorphism --- */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
}

/* --- Hero --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 1s ease-in-out;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* 컨텐츠와 같은 수준으로 유지 */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding-top: 5rem;
}

.hero-tagline,
.hero-title,
.hero-desc {
    will-change: transform;
}

.dodge-char {
    display: inline-block;
    white-space: pre;
    will-change: transform;
    transition: transform 0.1s ease-out;
    /* Subtle fallback/smoothing */
}

.hero-tagline {
    font-size: 1.2rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-desc {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.4s both;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--primary-glow);
    filter: brightness(1.1);
}

/* --- Shop Section --- */
.collection-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 5rem;
    margin-bottom: 2.5rem;
}

.collection-title {
    font-size: 1.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.collection-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1rem;
}

@media (max-width: 1400px) {
    .shop-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skin-card {
    background: #25262b;
    /* Dark grey similar to image */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 1.5rem 1rem 1rem;
    transition: var(--transition);
    position: relative;
    overflow: visible;
    /* Allow badge to pop if needed */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.skin-card:hover {
    background: #2c2d33;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.badge {
    position: absolute;
    top: 0.8rem;
    right: 0;
    padding: 0.25rem 0.6rem;
    border-radius: 4px 0 0 4px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.badge-new {
    background: linear-gradient(135deg, #ff4500, #ff8c00);
    color: white;
}

.badge-premium {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: black;
}

.badge-free {
    background: #43b581;
    color: white;
}

/* --- New Premium Shop Card Layout --- */
.skin-tier-badge {
    position: absolute;
    top: 10px;
    right: -5px;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 900;
    color: white;
    transform: skewX(-10deg);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 15;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skin-preview-box {
    width: 120px;
    height: 120px;
    margin: 1.5rem 0 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    filter: blur(25px);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.4;
    transition: var(--transition);
}

.skin-card:hover .icon-glow {
    opacity: 0.8;
    width: 100%;
    height: 100%;
}

.skin-info-group {
    width: 100%;
    text-align: center;
    margin-bottom: 1.2rem;
}

.owned-status-label {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 800;
    opacity: 0.9;
    letter-spacing: -0.5px;
}

/* --- Tier Specific Card Effects --- */
.skin-card.signature-card {
    border-color: #6E41E2;
    background: linear-gradient(180deg, rgba(110, 65, 226, 0.05) 0%, var(--bg-card) 100%);
    box-shadow: 0 10px 30px rgba(110, 65, 226, 0.2);
}

.signature-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(110, 65, 226, 0.3), transparent);
    z-index: -1;
    border-radius: 18px;
    animation: signature-shimmer 3s ease-in-out infinite;
}

@keyframes signature-shimmer {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.3;
    }
}

.skin-card.limited-card {
    border-color: #FF9F43;
}

.skin-preview {
    height: 120px;
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3rem;
    /* Further lowered character */
    font-size: 2.5rem;
}

.skin-preview-box {
    width: 120px;
    height: 120px;
    margin: 1.5rem 0 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

/* ----- video css ----- */
/* 상위 섹션이 너비를 제한하지 않도록 설정 */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 비율 고정몬! 👊 */
    background: #000;
    border-radius: 24px;
    overflow: hidden;
}

/* 유튜브가 생성하는 iframe에 강제로 숨을 불어넣습니다몬! 👊 */
.video-wrapper iframe,
#youtube-player-target,
#youtube-howto-player-target {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.video-wrapper.loaded .video-placeholder {
    display: none;
}

/* JS로 로드 완료 시 적용될 클래스 */
.video-wrapper.loaded iframe {
    opacity: 1;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, rgba(235, 69, 158, 0.05) 100%);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.video-wrapper.loaded .video-placeholder {
    opacity: 0;
    pointer-events: none;
}

.skin-name {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    text-align: center;
    color: white;
    letter-spacing: -0.5px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.skin-price {
    font-size: 1.3rem;
    color: #FFD700;
    /* Gold/Yellow from image */
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 800;
}

.skin-tier-badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.skin-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.btn-skin-action {
    flex: 1;
    padding: 0.7rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}

.btn-preview {
    background: #5865F2;
    /* Blue */
}

.btn-purchase {
    background: #3BA55C;
    /* Green */
}

.btn-use {
    background: #5865F2;
    /* Change to blue or distinct color for Use */
}

.btn-skin-action:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.compact-buy-btn {
    width: 100%;
    padding: 0.8rem 0;
    font-size: 1rem;
    border-radius: 10px;
    margin-top: auto;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

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

/* Mobile Styles */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem !important;
    }

    .hero-content p {
        font-size: 0.8rem !important;
    }

    .preview-footer-panel,
    .preview-modal-footer {
        flex-direction: column !important;
        padding: 2rem 1.5rem !important;
        gap: 2rem !important;
    }

    .footer-tier {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .tier-label {
        font-size: 0.85rem;
        color: var(--text-muted);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    #preview-price {
        font-size: 2.2rem !important;
    }

    #btn-buy-modal {
        width: 100%;
        padding: 1.2rem !important;
        font-size: 1.2rem !important;
        border-radius: 12px !important;
    }

    .preview-bg-controls-bottom {
        justify-content: center !important;
        width: 100% !important;
    }

    #preview-logo {
        object-fit: cover !important;
    }
}

/* --- Cart UI --- */
.cart-floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    cursor: pointer;
    box-shadow: 0 10px 30px var(--primary-glow);
    transition: var(--transition);
}

.cart-floating-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    border: 2px solid var(--bg-dark);
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1100;
    transition: var(--transition);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
    transform: translateX(0);
}

.cart-drawer.open {
    transform: translateX(-400px);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-img {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 1rem;
}

.cart-item-price {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cart-remove-btn {
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 4px;
    display: inline-block;
}

.cart-footer {
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
    .cart-drawer {
        width: 100%;
        right: -100%;
    }

    .cart-drawer.open {
        transform: translateX(-100%);
    }
}

/* --- Premium Modal Enhancements --- */
#preview-modal {
    backdrop-filter: blur(30px);
    background: rgba(0, 0, 0, 0.85);
    z-index: 30000 !important;
}

.preview-canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

#preview-canvas {
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.preview-content-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 3rem 4rem;
    pointer-events: none;
    z-index: 20;
}

.preview-text-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    pointer-events: none;
}

#preview-desc-container {
    flex: 1;
    pointer-events: auto;
}

#preview-name {
    pointer-events: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    word-break: keep-all;
    overflow-wrap: break-word;
}

#preview-desc {
    font-family: 'Inter', sans-serif;
    background: transparent;
    border-left: 4px solid var(--primary);
    padding: 1.2rem 1.8rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-main);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    font-weight: 500;
    white-space: pre-wrap;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* --- Preview Background Controls --- */
.preview-bg-controls-bottom {
    display: flex;
    gap: 1rem;
    z-index: 30;
}

.bg-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bg-btn:hover {
    transform: scale(1.15);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.bg-white {
    background-color: #f0f0f0;
}

.bg-grey {
    background-color: #2a2a2a;
}

.bg-black {
    background-color: #050505;
}

/* --- Coin Icon --- */
.coin-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
    vertical-align: middle;
}

.header-coin {
    width: 28px;
    height: 28px;
}

.price-coin {
    width: 22px;
    height: 22px;
    margin-right: 4px;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.3));
}

/* --- Linkmon Sync Indicator (v0.6.2) --- */
.sync-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    left: 10px;
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.sync-offline {
    background: #ff4757;
    /* Red */
    box-shadow: 0 0 5px rgba(255, 71, 87, 0.5);
}

.sync-online {
    background: #2ed573;
    /* Green */
    box-shadow: 0 0 10px rgba(46, 213, 115, 0.8);
    animation: sync-pulse 2s infinite;
}

.sync-handshaking {
    background: #ffa502;
    /* Orange */
    animation: sync-pulse 1s infinite;
}

@keyframes sync-pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.community-section {
    background: transparent;
}

.community-headline {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 0;
    margin-bottom: 2rem;
}

.community-kicker {
    color: var(--primary);
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.community-headline h2 {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.community-headline p {
    color: var(--text-muted);
    max-width: 760px;
}

.community-access-badge {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-size: 0.92rem;
}

.community-shell {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    min-height: 780px;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #313338;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.community-sidebar {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 0.9rem;
    padding: 1rem;
    background: #2b2d31;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.community-sidebar-top {
    padding: 0.4rem 0.35rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.community-server-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.community-server-subtitle {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 0.3rem;
}

.community-sidebar-block {
    display: grid;
    gap: 0.8rem;
}

.community-thread-block {
    align-content: start;
    min-height: 0;
}

.community-block-title {
    font-size: 0.82rem;
    color: #949ba4;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0 0.35rem;
}

.community-category-list,
.community-thread-list {
    display: grid;
    gap: 0.6rem;
}

.community-category-item,
.community-thread-item {
    border: none;
    background: transparent;
    color: #949ba4;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.community-category-item:hover,
.community-thread-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #dbdee1;
}

.community-category-item.active,
.community-thread-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.community-category-item-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.community-category-hash {
    font-size: 1.2rem;
    color: #80848e;
    font-weight: 400;
}

.community-category-item.active .community-category-hash {
    color: #ffffff;
}

.community-category-name,
.community-thread-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.community-category-desc,
.community-thread-meta {
    font-size: 0.75rem;
    color: #949ba4;
    margin-left: 1.6rem;
    line-height: 1.3;
    opacity: 0.8;
}

.community-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
    min-width: 0;
    background: #313338;
    height: 100%;
    overflow: hidden;
}

.community-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(49, 51, 56, 0.98);
}

.community-main-channel {
    min-width: 0;
}

.community-main-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.community-thread-category {
    color: #949ba4;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.community-main-header h3 {
    font-size: 1.45rem;
}

.community-refresh-btn {
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border-radius: 10px;
}

.community-gate {
    margin: 1rem 1.25rem 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: #b5bac1;
}

.community-gate.community-live {
    border-color: rgba(88, 101, 242, 0.28);
    background: rgba(88, 101, 242, 0.12);
    color: #d6dbff;
}

.community-thread-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex-shrink: 0;
}

.community-message-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.8rem;
    flex-shrink: 0;
}

.community-thread-form {
    margin: 1rem 1.25rem 0;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.community-thread-form-head {
    font-size: 0.86rem;
    letter-spacing: 0.12em;
    color: #949ba4;
    text-transform: uppercase;
}

.community-thread-form input,
.community-thread-form textarea,
.community-message-form textarea {
    width: 100%;
    background: #1e1f22;
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: #f2f3f5;
    border-radius: 10px;
    padding: 0.95rem 1rem;
    resize: vertical;
}

.community-message-list {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    flex: 1 1 0% !important;
    min-height: 0;
}

.community-message-empty {
    color: #949ba4;
    padding: 3rem 1.25rem;
    text-align: center;
}

.community-message-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1.25rem;
    transition: background-color 0.15s ease;
    position: relative;
    align-items: flex-start;
}

.community-message-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.community-message-item.own {
    background: transparent;
}

.community-message-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    /* Changed from linear-gradient to support SVG */
    color: white;
    font-weight: 800;
    font-size: 0.92rem;
    overflow: visible;
}

.community-message-body {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.community-message-item.own .community-message-body {
    align-items: flex-start;
}

.community-message-bubble {
    position: relative;
    padding: 0.9rem 1.2rem;
    border-radius: 18px;
    background: #383a40;
    color: #dbdee1;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.98rem;
    word-break: break-word;
}

.community-message-item.own .community-message-bubble {
    background: #383a40;
    color: #dbdee1;
    border-color: rgba(255, 255, 255, 0.05);
    border-bottom-right-radius: 18px;
}

.community-message-item.own .community-message-meta {
    flex-direction: row;
}

.community-message-item:not(.own) .community-message-bubble,
.community-message-item.own .community-message-bubble {
    border-bottom-left-radius: 4px;
}

.community-message-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: #949ba4;
    margin-bottom: 0.3rem;
}

.community-message-item.own .community-message-meta {
    flex-direction: row-reverse;
}

.community-message-author {
    color: #f2f3f5;
    font-size: 0.88rem;
    font-weight: 700;
}

.community-message-toolbar {
    position: absolute;
    top: -14px;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 6px;
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
    z-index: 10;
}

.community-message-item:hover .community-message-toolbar,
.community-message-item:focus-within .community-message-toolbar {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.community-date-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 1.25rem 1rem;
    color: #b5bac1;
    font-size: 0.92rem;
    font-weight: 700;
}

.community-date-divider::before,
.community-date-divider::after {
    content: "";
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.community-message-tool {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #dbdee1;
    cursor: pointer;
    transition: background 0.18s ease;
    font-size: 0.95rem;
}

.community-message-tool:hover {
    background: rgba(255, 255, 255, 0.08);
}

.community-reaction-bar {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
}

.community-reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(88, 101, 242, 0.3);
    background: rgba(88, 101, 242, 0.12);
    color: #dfe3ff;
    font-size: 0.82rem;
    cursor: pointer;
}

.community-reaction-chip.active {
    background: rgba(88, 101, 242, 0.26);
    border-color: rgba(88, 101, 242, 0.55);
}

.community-message-form {
    padding: 0.6rem 1.25rem 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: linear-gradient(180deg, rgba(49, 51, 56, 0), rgba(49, 51, 56, 0.98) 24%);
    height: auto !important;
    min-height: 0;
    width: 100%;
    flex: none !important;
    box-sizing: border-box;
}

.community-reply-preview {
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    margin: 0 0 0.2rem;
    padding: 0.55rem 0.2rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
}

.community-reply-preview-label {
    display: none;
}

.community-reply-preview-text {
    color: #7c86ff;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-reply-cancel {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #a7adb6;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex: 0 0 auto;
}

.community-reply-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f2f3f5;
}

.community-reply-preview-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.community-composer {
    display: flex;
    gap: 0.2rem;
    align-items: flex-end;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    background: #383a40;
    height: auto !important;
    width: 100%;
    box-sizing: border-box;
    flex: none !important;
}

.community-composer-icon {
    font-size: 1.4rem;
    padding: 0.4rem;
    cursor: pointer;
    filter: grayscale(1);
    transition: filter 0.2s;
}

.community-composer-icon:hover {
    filter: grayscale(0);
}

#community-message-input {
    min-height: 32px;
    height: 32px;
    max-height: 200px;
    background: transparent;
    border: none;
    padding: 0.45rem 1rem !important;
    font-size: 0.98rem;
    color: #dbdee1;
    line-height: 1.45;
    overflow-y: hidden;
    resize: none !important;
    box-sizing: border-box;
    flex: 1;
}

.community-composer textarea:focus {
    outline: none;
}

.community-message-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.community-status {
    color: #b5bac1;
    font-size: 0.84rem;
}

.community-message-reply-ref {
    position: relative;
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
    padding-left: 0.4rem;
    color: rgba(255, 255, 255, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.85;
}

.community-message-reply-ref::before {
    content: "";
    position: absolute;
    display: block;
    box-sizing: border-box;
    top: 50%;
    right: 100%;
    bottom: -1.2rem;
    left: -2.35rem;
    margin-right: 4px;
    border-left: 2px solid #4e5058;
    border-top: 2px solid #4e5058;
    border-top-left-radius: 6px;
}

.community-message-reply-ref span {
    color: #7c86ff;
    font-weight: 600;
}

.community-message-item.own .community-message-reply-ref {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Responsive Grids --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.howto-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
}

@media (max-width: 1024px) {

    .features-grid,
    .howto-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {

    .features-grid,
    .howto-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-desc {
        font-size: 1.1rem;
    }
}

/* --- Responsive Enhancements --- */
.responsive-section {
    padding: 10rem 0;
}

.shop-preview-section {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--border);
    overflow: hidden;
}

.feature-panel {
    text-align: center;
    padding: 4rem 2rem;
    transition: var(--transition);
}

.feature-panel:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.news-container-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

@media (max-width: 768px) {
    .responsive-section {
        padding: 5rem 0;
    }

    .feature-panel {
        padding: 2.5rem 1.5rem;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-content {
        padding: 4rem 1.5rem 0;
    }
}


/* --- News Timeline --- */
.news-container-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding: 4rem 0;
}

.news-container-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border) 10%, var(--border) 90%, transparent);
    z-index: 1;
}

.news-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6rem;
    position: relative;
    width: 100%;
}

.news-item.even {
    flex-direction: row;
}

.news-item.odd {
    flex-direction: row-reverse;
}

.news-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 3rem;
    z-index: 2;
}

.news-item.even .news-meta {
    align-items: flex-end;
    text-align: right;
}

.news-item.odd .news-meta {
    align-items: flex-start;
    text-align: left;
}

.news-dot {
    width: 16px;
    height: 16px;
    background: var(--bg-dark);
    border: 3px solid var(--primary);
    border-radius: 50%;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
    box-shadow: 0 0 15px var(--primary-glow);
    transition: var(--transition);
}

.news-item:hover .news-dot {
    transform: scale(1.3);
    background: var(--primary);
    box-shadow: 0 0 25px var(--primary);
}

.news-dot.major {
    width: 20px;
    height: 20px;
    border-width: 4px;
    box-shadow: 0 0 20px var(--primary);
}

.news-version {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.news-date {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.news-body {
    flex: 1;
    padding: 2.5rem;
    z-index: 2;
    margin: 0 3rem;
    transition: var(--transition);
}

.news-body p {
    white-space: pre-wrap;
}

.install-body {
    background: rgba(88, 101, 242, 0.08);
}

.news-install-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.news-install-btn {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    white-space: normal;
    text-align: center;
}

.news-install-btn.disabled {
    cursor: not-allowed;
    opacity: 0.45;
    filter: grayscale(1);
    pointer-events: none;
}

.news-item:hover .news-body {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .news-container-wrapper::before {
        left: 30px;
        transform: none;
    }

    .news-item,
    .news-item.even,
    .news-item.odd {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 60px;
        margin-bottom: 4rem;
    }

    .news-meta,
    .news-body {
        width: 100%;
        flex: none;
        padding: 0;
        margin: 0;
        text-align: left !important;
        align-items: flex-start !important;
    }

    .news-meta {
        margin-bottom: 1rem;
    }

    .news-dot {
        position: absolute;
        left: 19px;
        /* Centered on the 30px line (30 - 22/2) */
        top: 8px;
        margin: 0;
    }

    .news-body {
        padding: 1.5rem;
    }

    .news-install-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .news-install-btn {
        width: 100%;
    }
}

@media (max-width: 980px) {

    .community-headline,
    .community-main-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .community-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .community-sidebar {
        border-right: none;
    }

    .community-composer {
        grid-template-columns: 1fr;
    }
}

/* --- Side Pagination --- */
.side-pagination {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1000;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.portal-entrance-complete .side-pagination {
    opacity: 1;
    pointer-events: auto;
}

.side-nav-item {
    position: relative;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.side-nav-item .dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
    opacity: 0.4;
}

.side-nav-item:hover .dot {
    background: #fff;
    opacity: 1;
    transform: scale(1.5);
}

.side-nav-item.active .dot {
    background: var(--primary);
    opacity: 1;
    transform: scale(1.8);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Tooltip removed in favor of .nav-label */
.side-nav-item:hover .nav-label {
    opacity: 0.7;
    transform: translateX(-2px);
}

.nav-label {
    position: absolute;
    right: 1.8rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: none;
    padding: 0;
}

.side-nav-item.active .nav-label {
    opacity: 1;
    transform: translateX(-5px);
    color: var(--primary);
}

@media (max-width: 1024px) {
    .side-pagination {
        display: none;
    }
}

#header-user-profile:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary) !important;
    transform: translateY(-1px);
}
