:root {
    --bg-color: #050505;
    --text-main: #ededed;
    --text-muted: #707070;
    --accent-color: #ffffff;
    --border-color: #1a1a1a;
    --surface-color: rgba(13, 13, 13, 0.4);
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.45s cubic-bezier(0.19, 1, 0.22, 1);
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', 'Pretendard Variable', 'Pretendard', sans-serif;
    overflow-x: hidden;
    line-height: 1.5;
    font-size: 11px;
}

canvas#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    display: block;
}

.site-layout::before {
    content: '';
    position: fixed;
    top: 20%;
    left: 30%;
    width: 40vw;
    height: 40vh;
    background: rgba(255, 255, 255, 0.02);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}

.load-glitch {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    pointer-events: none;
    animation: loadFlash 0.35s steps(2, end) forwards;
}

@keyframes loadFlash {
    0% { opacity: 0.8; }
    50% { opacity: 0.1; }
    100% { opacity: 0; display: none; }
}

.site-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-inner {
    flex: 0 1 auto;
    display: flex;
    width: fit-content;
    margin: auto; 
    padding: 2rem;
    align-items: flex-start;
}

/* Mobile Header Elements (Hidden on Desktop) */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    justify-content: space-between;
    align-items: center;
}
.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    font-size: 1.1rem;
}
.mobile-header-left img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
}
.mobile-nav-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-nav-toggle svg { width: 24px; height: 24px; }

.mobile-close {
    display: none;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}
.mobile-close svg { width: 28px; height: 28px; }

/* Desktop Sidebar */
.sidebar-wrap {
    width: 180px; 
    height: 620px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: rgba(8, 8, 8, 0.5);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.sidebar {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.2rem;
}

.sidebar-pfp {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.6rem;
    box-shadow: 0 0 15px 3px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255,255,255,0.5);
}

.sidebar-name {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.sidebar-handle {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.sidebar-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.sidebar-socials a {
    color: var(--text-muted);
    text-decoration: none;
}

.sidebar-socials a:not(.discord-btn):hover {
    color: var(--text-main);
    transform: scale(1.15) translateY(-2px);
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* Discord Hover Effect */
.discord-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.discord-hover {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}
.discord-btn:hover {
    color: var(--text-main);
}
.discord-btn:hover .discord-hover {
    max-width: 80px;
    opacity: 1;
    margin-left: 0.4rem;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 1.5rem;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.sidebar-search {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: left;
    cursor: pointer;
    margin-bottom: 1rem;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
}

.sidebar-search:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
    transform: translateX(4px);
}

.sidebar-search kbd {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
}

.sidebar-nav {
    position: relative;
    display: flex;
    flex-direction: column;
}

.nav-indicator {
    position: absolute;
    right: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px rgba(255,255,255,0.8);
    transform: translateY(11px);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 3px;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.03);
    padding-left: 1.1rem;
    color: #fff;
}

.sidebar-nav a.active {
    color: var(--text-main);
}

.lang-toggle-bottom {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-top: auto;
    margin-bottom: 2rem;
    padding: 0.5rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.lang-toggle-bottom:hover {
    color: #fff;
    transform: translateY(-2px);
}

.main-content {
    flex: 1;
    margin-left: 3rem; 
    width: 650px;
    height: 620px;
    max-width: 100%;
    background: rgba(8, 8, 8, 0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.main-footer {
    margin-top: auto;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.25);
    width: 100%;
}

.glitch-in {
    animation: contentIn 0.45s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.slide-in-right {
    animation: slideRight 0.4s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.slide-in-left {
    animation: slideLeft 0.4s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes contentIn {
    0% { opacity: 0; transform: translateY(8px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideRight {
    0% { opacity: 0; transform: translateX(20px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideLeft {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

.pinned-msg {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}
.pinned-msg:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.pin-icon {
    color: #fff;
}
.pin-text {
    font-size: 0.8rem;
    color: var(--text-main);
}

.content-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.section-label, .gear-cat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.section-line, .gear-cat-line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.bio-text {
    color: #c4c4c4;
    font-size: 0.9rem;
    font-weight: 400;
}

.home-gear {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.gear-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
}
.gear-item:hover {
    transform: scale(1.02);
    background: rgba(255,255,255,0.05);
    border-color: #333;
    backdrop-filter: blur(8px);
}

.gear-icon {
    color: var(--text-muted);
}

.gear-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.gear-value, .pc-val, .config-val, .gear-card-name, .project-name {
    font-size: 0.8rem;
    font-weight: 500;
}

.section-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
}

.dim-group > * {
    transition: all 0.4s ease;
}

.dim-group:hover > *:not(:hover) {
    opacity: 0.4;
    filter: blur(1.5px);
}

.pc-card, .config-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.pc-row, .config-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
}
.pc-row:hover, .config-row:hover {
    background: rgba(255,255,255,0.03);
    padding-left: 1rem;
    padding-right: 1rem;
    backdrop-filter: blur(8px);
}

.pc-row-border, .config-row-border {
    border-bottom: 1px solid var(--border-color);
}

.pc-key, .config-key {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.gear-page {
    display: flex;
    gap: 1.5rem;
}

.gear-page-inner {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.gear-search-bar {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gear-search-bar input {
    background: none;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
}
.gear-count {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}

.gear-scroll-area {
    padding: 1rem;
    overflow-y: visible; 
}

.gear-filters {
    width: 110px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gear-filter-item {
    display: flex;
    flex-direction: column;
}

.gear-filter {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    text-align: left;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.gear-filter:hover {
    color: #fff;
    transform: translateX(4px);
}

.gear-filter.active {
    color: var(--text-main);
}

.filter-radio {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--text-muted);
    transition: all 0.2s;
}

.gear-filter.active .filter-radio {
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 6px rgba(255,255,255,0.8);
    transform: scale(1.3);
}

.filter-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.4rem 0.2rem;
}

.gear-cat-section {
    margin-bottom: 1.5rem;
}

.gear-cat-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

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

.gear-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.gear-card:hover {
    border-color: #555;
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
}

.gear-card-sub, .config-btn-desc, .project-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.config-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.config-btn {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 4px;
    color: inherit;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;
}
.config-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: #444;
    transform: scale(1.01) translateX(4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
}

.config-chevron {
    color: var(--text-muted);
}
.config-btn:hover .config-chevron {
    color: var(--text-main);
    transform: translateX(3px);
}

.config-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    padding: 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}
.config-back:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
    transform: translateX(-4px);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: #000;
}
.video-wrapper:hover {
    border-color: #555;
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 10;
}
.video-wrapper.short {
    padding-bottom: 177.78%;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.search-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.search-modal.open {
    display: flex;
}

.search-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(8px);
}

.search-container {
    position: relative;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 480px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    backdrop-filter: blur(12px);
    transform: scale(0.95) translateY(-10px);
    opacity: 0;
    animation: searchModalIn 0.3s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

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

.search-header-input {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.6rem;
}

.search-modal-icon {
    color: var(--text-muted);
}

#searchInput {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

.search-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}
.search-clear-btn:hover {
    color: var(--text-main);
    transform: rotate(90deg);
}

.search-esc-hint {
    font-size: 0.6rem;
    background: var(--bg-color);
    color: var(--text-muted);
    padding: 0.1rem 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 2px;
}

.search-results-wrap {
    max-height: 240px;
    overflow-y: auto;
}

.search-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.search-result:hover {
    background: rgba(255,255,255,0.05);
    padding-left: 1.2rem;
}

.search-result.active .search-result-name {
    color: var(--text-main);
}

.search-result-tag {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.1rem 0.25rem;
    border-radius: 2px;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.search-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.8rem;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid var(--border-color);
    font-size: 0.65rem;
    color: var(--text-muted);
}

.search-hints {
    display: flex;
    gap: 0.8rem;
}

/* ========================================================================= */
/* MOBILE RESPONSIVENESS */
/* ========================================================================= */
@media (max-width: 850px) {
    .mobile-header { display: flex; }
    
    .site-inner {
        padding: 6rem 1rem 1rem 1rem;
        width: 100%;
        margin: 0;
        align-items: stretch;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        height: auto; /* Let it flow on mobile natively */
        min-height: calc(100vh - 7rem);
        padding: 1.5rem;
    }
    
    .sidebar-wrap {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        z-index: 2000;
        background: rgba(5,5,5,0.95);
        backdrop-filter: blur(25px);
        border-radius: 0;
        border: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px);
        transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    }
    
    .sidebar-wrap.mobile-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    
    .mobile-close { display: block; }
    
    .sidebar { width: 100%; max-width: 300px; }
    
    .nav-indicator { display: none; }
    
    .sidebar-nav a { justify-content: center; font-size: 1.1rem; padding: 1rem; }
    .sidebar-nav a.active { background: rgba(255,255,255,0.1); border-radius: 8px; }
    
    .sidebar-search { justify-content: center; font-size: 1rem; margin-bottom: 2rem; padding: 1rem; background: rgba(255,255,255,0.05); }

    .gear-page { flex-direction: column-reverse; gap: 1rem; }
    .gear-filters {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.8rem;
    }
    .filter-divider { display: none; }
    .gear-filter-item { flex-shrink: 0; margin-right: 0.5rem; }
    .gear-filter { background: rgba(255,255,255,0.05); padding: 0.5rem 1rem; border-radius: 20px; }
    .gear-filter.active { background: rgba(255,255,255,0.15); }

    .home-gear, .videos-grid, .gear-cat-grid { grid-template-columns: 1fr; }
    .videos-grid[style*="grid-template-columns"] { grid-template-columns: repeat(2, 1fr) !important; }

    .pc-row, .config-row { flex-direction: column; gap: 0.2rem; align-items: flex-start; }
    .pc-row-border, .config-row-border { border-bottom: 1px solid rgba(255,255,255,0.05); }
    
    .search-modal { padding-top: 5vh; }
    .search-container { max-width: 95%; }
}

/* ========================================================================= */
/* LANGUAGE SELECTOR OVERLAY */
/* ========================================================================= */
.lang-selector-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.lang-selector-content {
    text-align: center;
    animation: slideUpFade 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.lang-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    line-height: 1.4;
}

.lang-title-kr {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.lang-btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1rem 3rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}
