/* style-glass.css - Monochrome Glassmorphism & Mobile Optimized */
:root {
    /* 배경: 아주 깊은 검정 */
    --bg-color: #000000;

    /* 글래스모피즘 카드 배경 (아주 투명한 흰색) */
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-bg-hover: rgba(255, 255, 255, 0.07);

    /* 테두리: 얇고 투명하게 */
    --card-border: rgba(255, 255, 255, 0.1);
    --card-border-hover: rgba(255, 255, 255, 0.25);

    /* 텍스트 */
    --text-main: #f0f0f0;
    --text-muted: #888888;
    --accent: #ffffff;
    /* 순백색 강조 */

    /* 효과 */
    --glass-blur: blur(16px);
    --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.05);

    --font-sans: 'Noto Sans KR', sans-serif;
    --font-mono: 'Noto Sans KR', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;

    /* 은은한 배경 그라데이션 (노이즈 느낌 대체) */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
}

.background-glow {
    display: none;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    z-index: 100;

    /* 상단 네비게이션도 글래스 효과 */
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
}

.nav-brand {
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex: 1;
}

/* HEADER */
.header-section {
    text-align: left;
    margin: 2rem 0 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    position: relative;
}

.title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--text-main);
    background: linear-gradient(180deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: block;
    margin-top: 10px;
    opacity: 0.7;
}

.highlight::before {
    content: "// ";
    color: var(--card-border-hover);
}

/* TABS */
.tab-wrapper {
    display: flex;
    gap: 0.8rem;
    margin: 0 0 3rem 0;
    flex-wrap: wrap;
    /* 모바일 대응 */
}

.tab-bg {
    display: none;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--card-border-hover);
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--text-main);
    color: #000;
    border-color: var(--text-main);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

/* SECTIONS */
.grid-section {
    margin-bottom: 5rem;
}

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

.section-header h2 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-right: 1.5rem;
    position: relative;
    z-index: 1;
}

.pc-card.main-spec {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    justify-content: center;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.spec-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--card-border) 0%, transparent 100%);
    margin-top: 2px;
}

.section-header h2 i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* GRIDS */
.bento-grid {
    display: grid;
    /* 모바일 반응형: 최소 크기를 유연하게 조정 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.racing-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.software-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.2rem;
}

/* GLASS CARDS */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    /* 살짝 둥글게 */
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* 유리 효과 */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card:hover {
    background: var(--card-bg-hover);
    border-color: var(--card-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.card-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.brand {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.card .desc {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.5;
    font-weight: 300;
}

/* 이미지 처리 */
.card-img-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    min-height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card img {
    width: 100%;
    height: 100%;
    max-height: 180px;
    max-height: 180px;
    object-fit: contain;
    /* filter: grayscale(100%); <-- Removed */
    /* 흑백 테마 */
    opacity: 0.9;
    transition: all 0.4s ease;
}

.card:hover img {
    /* filter: grayscale(0%); <-- Removed */
    /* 호버시 색상 복구 */
    opacity: 1;
    transform: scale(1.05);
}

/* Wide Cards (데스크탑) */
.wide {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .wide {
        grid-column: span 2;
    }

    .card-content.row {
        flex-direction: row;
        gap: 2rem;
        align-items: center;
        height: 100%;
    }

    .card-content.row .card-img-wrapper {
        margin-top: 0;
        width: 40%;
        height: 100%;
        min-height: 200px;
        background: transparent;
        border: none;
        padding: 0;
    }

    .card-content.row .card-img-wrapper img {
        max-height: 100%;
    }

    .card-content.row .card-text {
        flex: 1;
        min-width: 0;
    }
}

/* Tool Items (Software Links) */
.tool-item {
    text-decoration: none;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.tool-item:hover {
    color: #000;
    background: var(--text-main);
    border-color: var(--text-main);
    transform: translateY(-3px) rotate(5deg);
}

/* Game Card */
.game-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
}

.game-header {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.02);
}

.game-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    /* filter: grayscale(100%); <-- Removed */
    transition: transform 0.3s;
}

.game-card:hover .game-icon {
    /* filter: grayscale(0%); <-- Removed */
    transform: scale(1.1);
}



.game-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.game-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--card-border);
    /* 그리드 라인 효과 */
}

.setting-item {
    background: rgba(0, 0, 0, 0.4);
    /* 카드보다 약간 어둡게 */
    padding: 1.2rem;
    text-align: left;
    transition: background 0.2s;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.setting-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.setting-value {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.05rem;
}

/* Status & PC Specs */
.status-image-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--card-border);
}

#discord-image {
    /* filter: grayscale(100%); <-- Removed */
    transition: 0.3s;
}



.status-dot {
    width: 12px;
    height: 12px;
    border: 2px solid #000;
    bottom: 2px;
    right: 2px;
}

.pc-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.2rem;
}

.pc-card {
    padding: 1.8rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    backdrop-filter: var(--glass-blur);
}

.main-spec {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.spec-icon {
    font-size: 2.2rem;
    color: var(--text-muted);
}

.spec-info .value {
    font-size: 1.4rem;
    color: var(--text-main);
    font-weight: 700;
}

.pc-card-group {
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pc-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.01);
}

.pc-list-item:last-child {
    border-bottom: none;
}

.pc-list-item .key {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.pc-list-item .val {
    color: var(--text-main);
    font-weight: 600;
}




/* GALLERY (Auto Scroll) */
.gallery-section {
    width: 100%;
    overflow: hidden;
    margin-bottom: 2rem;
}

.gallery-viewport {
    width: 100%;
    overflow-x: auto;
    /* 수동 스크롤 가능 */
    position: relative;
    /* 양옆 페이드 아웃 효과 */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    scrollbar-width: none;
    /* 파이어폭스 탭 스크롤바 숨김 */
}

.gallery-viewport::-webkit-scrollbar {
    display: none;
    /* 크롬 스크롤바 숨김 */
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scroll 40s linear infinite;
    padding: 1rem 10vw;
    /* 좌우 여백 확보 */
}

.gallery-track.paused {
    animation-play-state: paused;
}



.gallery-item {
    height: 210px;
    width: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
    transition: transform 0.3s ease;
    cursor: default;
    /* 클릭 불가 표시 */
    flex-shrink: 0;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
    margin-top: auto;
}

/* ANIMATION & MODAL */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-window {
    background: #0a0a0a;
    border: 1px solid var(--text-muted);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    /* 더 컴팩트하게 */
    padding: 2.5rem;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.05);
}

.gallery-mode .modal-info {
    display: none;
}

.gallery-mode .modal-window {
    padding: 0;
    width: auto;
    max-width: 65vw;
    max-height: 65vh;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-mode .modal-img-wrapper {
    margin-bottom: 0;
    width: 100%;
    height: auto;
    max-height: 65vh;
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-mode .modal-img-wrapper img {
    max-width: 100%;
    max-height: 55vh;
    object-fit: contain;
    border-radius: 12px;
}

.modal-overlay.active .modal-window {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-img-wrapper {
    width: 100%;
    height: 220px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.modal-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-info h2 {
    font-size: 2rem;
    margin: 0.5rem 0 1rem;
    color: var(--text-main);
    font-weight: 800;
}

.modal-info p {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.modal-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1.2rem;
    background: var(--text-main);
    color: #000;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    transition: all 0.2s;
    border-radius: 4px;
}

.modal-action-btn:hover {
    opacity: 0.9;
}

.card[data-action="modal"] {
    cursor: pointer;
}

/* REUSABLE UTILS */
.row {
    display: flex;
    flex-direction: row;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    /* 좌우 패딩 축소 */

    .title {
        font-size: 2.2rem;
    }

    .navbar {
        padding: 1rem 1.2rem;
    }

    .tab-wrapper {
        overflow-x: auto;
        flex-wrap: nowrap;
        /* 가로 스크롤 */
        padding-bottom: 0.5rem;
        /* 스크롤바 공간 */
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }

    .grid-section {
        margin-bottom: 3.5rem;
    }

    /* 모바일에서 카드 이미지 높이 조정 */
    .card-img-wrapper {
        min-height: 140px;
    }

    .card img {
        max-height: 150px;
    }

    /* 모바일에서 텍스트 크기 조정 */
    .card h3 {
        font-size: 1.1rem;
    }

    .card .desc {
        font-size: 0.85rem;
    }

    /* Modal 모바일 최적화 */
    .modal-window {
        width: 95%;
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {

    .bento-grid,
    .games-grid,
    .pc-dashboard {
        grid-template-columns: 1fr;
        /* 완전한 1단 */
    }

    .racing-grid {
        grid-template-columns: 1fr 1fr;
        /* 작은 아이템은 2단 유지 */
    }
}

/* SECTION TOGGLE STYLES */
.section-header {
    cursor: pointer;
    transition: opacity 0.2s;
}

.section-header:hover {
    opacity: 0.8;
}

/* 접기/펼치기 컨테이너 공통 속성 */
.bento-grid,
.software-grid,
.racing-grid,
.games-grid {
    position: relative;
    max-height: 4000px;
    /* 충분히 큰 값 */
    transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    padding-bottom: 1px;
    /* 짤림 방지 */
}

/* Pinned(고정) 카드를 맨 위로 정렬 (Flex/Grid 공통) */
.card[data-pinned="true"],
.tool-item[data-pinned="true"],
.game-card[data-pinned="true"] {
    order: -1;
}

/* 접힌 상태의 높이 제한 (대략 카드 1~2줄 높이) */
.collapsed {
    max-height: 430px !important;
}

/* 더보기 페이드아웃 및 텍스트 래퍼 */
.more-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 130px;
    /* 배경색과 동일하게 밑부분 블러 처리 */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg-color) 90%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
    pointer-events: none;
    /* 클릭은 뚫고 지나가게 */
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 5;
}

.more-wrapper span {
    font-weight: 440;
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-block;
}

.more-wrapper:hover span {
    color: var(--text-main);
    transform: translateY(-2px);
}

/* 접혔을 때만 And More 등장 및 클릭 활성화 */
.collapsed .more-wrapper {
    opacity: 1;
    pointer-events: auto;
}

.gallery-item {
    cursor: pointer;
}

.gallery-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.gallery-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--text-muted);
}