

body.dark-theme {
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --bg-card-hover: #f7f7f8;
    --bg-input: #f1f1f3;
    --border-color: rgba(27, 30, 37, 0.12);
    --text-primary: #202124;
    --text-secondary: #65676d;
    --text-muted: #8c8f96;
    --shadow-card: 0 2px 10px rgba(20, 24, 32, 0.08);
}

.navbar {
    background: #e60012;
    border: 0;
    backdrop-filter: none;
}

.logo-icon { background: #fff; color: var(--nintendo-red); box-shadow: none; border-radius: 12px; }
.brand-title, .user-name { color: #fff; }
.badge-tag { color: #fff; background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.35); }
.nav-tabs { background: transparent; }
.tab-btn { color: rgba(255,255,255,.75); }
.tab-btn.active, .tab-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.main-content { max-width: 1120px; }
.worker-status-bar { background: #fff; border: 1px solid var(--border-color); box-shadow: var(--shadow-card); }
.card, .service-catalog { border-radius: 18px; box-shadow: var(--shadow-card); border: 1px solid var(--border-color); }
.profile-card { background: linear-gradient(135deg, #fff 0%, #fff5f6 100%); }
.login-gate { background: linear-gradient(165deg, #e60012 0 36%, #f3f4f6 36%); }
.login-gate-card { box-shadow: 0 18px 45px rgba(79, 13, 19, .24); }

.service-catalog { background: #fff; padding: 22px; margin: 22px 0; }
.catalog-heading h3 { font-family: var(--font-heading); font-size: 20px; margin-top: 2px; }
.eyebrow { color: var(--nintendo-red); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.game-services-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 16px; }
.service-launch-card { display: flex; align-items: center; gap: 12px; min-height: 86px; padding: 12px; border: 1px solid var(--border-color); border-radius: 14px; background: #fff; }
.service-launch-card img { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; background: #f1f1f3; }
.service-launch-card div { min-width: 0; flex: 1; }
.service-launch-card strong { display: block; font-size: 14px; }
.service-launch-card p, .service-status { color: var(--text-secondary); font-size: 12px; margin-top: 3px; }
.service-status.error { color: #bf1523; }
.service-launch-card button { border: 0; border-radius: 999px; padding: 8px 12px; color: #fff; background: var(--nintendo-red); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.service-launch-card button:disabled { opacity: .65; }

#mediaModal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(14px);
    padding: clamp(8px, 2vw, 24px);
    overflow: hidden;
    box-sizing: border-box;
}

#mediaModal.hidden {
    display: none !important;
}

.media-preview-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: min(94vw, 1300px);
    max-height: 94vh;
    margin: auto;
    padding: 0;
    background: #18181a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: modalPop 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    min-height: 50px;
    padding: 0 16px;
    background: #242426;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    gap: 12px;
    flex-shrink: 0;
    z-index: 2;
}

.media-viewer-header .modal-close {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #dedee0;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.media-viewer-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.media-viewer-header h2 {
    flex: 1;
    margin: 0;
    font: 700 15px var(--font-heading);
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-viewer-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.media-viewer-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #dedee0;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.media-viewer-actions button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

#mediaModalContent {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    min-height: 0;
    background: #0d0d0f;
    overflow: hidden;
    position: relative;
}

#mediaModalContent img,
#mediaModalContent video {
    display: block;
    max-width: 100%;
    max-height: calc(94vh - 50px);
    width: auto;
    height: auto;
    object-fit: contain;
    margin: auto;
}

.media-modal-meta {
    position: absolute;
    top: 58px;
    right: 14px;
    z-index: 10;
    width: min(320px, calc(100% - 28px));
    padding: 14px 16px;
    background: rgba(30, 30, 34, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    color: #eee;
    animation: modalPop 0.18s ease;
}

.media-modal-meta p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: 6px 0;
    color: #aaa;
}

.media-modal-meta strong {
    color: #fff;
    font-weight: 600;
}

body.dark-theme {
    --bg-main: #1b1b1d;
    --bg-card: #252528;
    --bg-card-hover: #303034;
    --bg-input: #2b2b2f;
    --border-color: rgba(255,255,255,.09);
    --text-primary: #f7f7f7;
    --text-secondary: #b6b6bb;
    --text-muted: #77777e;
    background: #101011;
}

.navbar { background: #e60012; position: relative; }
.nav-container { max-width: 700px; padding: 12px 18px; }
.brand-title { font-size: 16px; }
.badge-tag { display: none; }
.main-content { max-width: 700px; min-height: 100vh; padding: 0 0 36px; background: var(--bg-main); }
.worker-status-bar { display: none; }
.tab-page { padding: 0 18px 28px; }
.nso-online-banner { height: 136px; margin: 0 -18px 20px; padding: 28px 22px; color: #fff; background: linear-gradient(135deg,#f10b1b,#c90010); display: flex; align-items: center; gap: 14px; }
.nso-online-banner span:first-child { font-family: var(--font-heading); font-size: 40px; font-weight: 800; letter-spacing: -.06em; }
.nso-banner-rule { height: 2px; flex: 1; background: rgba(255,255,255,.65); }
.profile-card { background: transparent; box-shadow: none; border: 0; margin: -64px 0 26px; position: relative; }
.profile-hero { padding: 0; }
.profile-img { width: 84px; height: 84px; border: 3px solid #fff; box-shadow: 0 3px 12px rgba(0,0,0,.3); }
.profile-details { padding-top: 24px; }
.profile-details h3 { font-size: 20px; }
.nso-membership-badge { display: none; }
.friend-code { color: var(--text-secondary); font-size: 12px; }
.nso-section-heading { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; }
.nso-section-heading h2 { font-size: 18px; letter-spacing: -.02em; }
.text-action { border: 0; background: transparent; color: #fff; font: inherit; font-size: 13px; padding: 6px 0; }
.friends-grid { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 12px; grid-template-columns: none; }
.friends-grid .friend-card { min-width: 76px; background: transparent; border: 0; box-shadow: none; padding: 0; display: block; text-align: center; cursor: pointer; }
.friends-grid .friend-avatar-wrap { width: 64px; height: 64px; margin: 0 auto 7px; }
.friends-grid .friend-avatar-wrap img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid transparent; object-fit: cover; }
.friends-grid .friend-name { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #dedee0; }
.friends-grid .friend-game, .friends-grid .friend-time, .friends-grid .friend-online-platform { display: none; }
.services-nav { margin: 16px 0; overflow-x: auto; }
.service-tab-btn { background: transparent; border: 0; color: var(--text-secondary); border-bottom: 2px solid transparent; border-radius: 0; white-space: nowrap; }
.service-tab-btn.active { color: #fff; background: transparent; border-bottom-color: var(--nintendo-red); }
.service-content .splatoon-hero,.service-content .acnh-hero,.service-content .smash-hero { border-radius: 14px; }
.service-catalog { background: #252528; box-shadow: none; border-radius: 12px; }
.service-launch-card { background: #2d2d31; border: 0; }
.media-item { background: #2d2d31; box-shadow: none; }
@media (min-width: 760px) {
    body.dark-theme { background: #101011; }
    .navbar { max-width: none; }
    .main-content { max-width: 100%; width: 100%; margin: 0 auto; padding: 20px clamp(20px, 4vw, 56px) 100px; box-sizing: border-box; }
    #page-home { width: 100%; max-width: 1400px; margin: 0 auto; }
    #page-friends { width: 100%; max-width: 100%; margin: 0 auto; display: block; }
    #page-album { width: 100%; max-width: 100%; margin: 0 auto; }
}

@media (min-width: 900px) and (orientation: landscape) {
    .login-gate { min-height: 100vh; padding: 32px 72px; }
    .login-gate-card { width: min(100%, 920px); max-width: 920px; }
    .login-logo { margin-top: 16px; }
    .login-workflow .auth-steps { margin-bottom: 14px; }
}

.login-gate { min-height: calc(100vh - 65px); background: #e60012; padding: 24px; }
.login-gate-card { max-width: 540px; padding: 0 26px 30px; text-align: center; background: transparent; border: 0; box-shadow: none; color: #fff; }
.login-logo { width: 134px; height: 134px; margin: 120px auto 26px; border-radius: 0; background: transparent; box-shadow: none; color: #fff; font-size: 88px; }
.switch-mark { display: flex; gap: 7px; width: 92px; height: 88px; margin: 20px auto; }
.switch-mark i { display: block; position: relative; width: 42px; border: 5px solid #fff; }
.switch-mark i:first-child { border-radius: 22px 5px 5px 22px; }
.switch-mark i:last-child { border-radius: 5px 22px 22px 5px; background: #fff; }
.switch-mark i::after { content: ''; position: absolute; width: 14px; height: 14px; top: 18px; left: 9px; border-radius: 50%; background: #fff; }
.switch-mark i:last-child::after { top: 48px; left: 13px; background: #e60012; }
.login-gate-card h2 { color: #fff; font-size: 29px; letter-spacing: -.03em; }
.login-gate-card .login-console-note { margin: auto; color: #fff; font-size: 15px; }
.btn-app-sign-in { width: 100%; margin: 26px 0 17px; padding: 20px; border: 0; border-radius: 8px; background: #fff; color: #e60012; font: 700 20px var(--font-heading); cursor: pointer; }
.login-help { color: #fff; font-size: 14px; text-decoration: none; }
.login-workflow { margin-top: 24px; text-align: left; color: var(--text-primary); }
.login-workflow { max-width: 620px; margin-inline: auto; padding: 18px; border-radius: 18px; background: #fff; box-shadow: 0 14px 34px rgba(111,0,9,.25); }
.login-workflow .nxapi-disclosure { margin: 0 0 14px; background: #fff; border-color: #dedee2; color: #202124; }
.login-workflow .nxapi-disclosure-copy > strong { color: #202124; }
.login-workflow .nxapi-disclosure-copy p { color: #5f6368 !important; }
.login-workflow .nxapi-disclosure a { color: #d70011; }
.login-workflow .nxapi-consent-row { background: #f7f7f8; border-top-color: #dedee2; color: #202124; }
.login-workflow .nxapi-disclosure.needs-consent { border-color: #e60012; box-shadow: 0 0 0 3px rgba(230,0,18,.12); }
.login-workflow .auth-steps { gap: 10px; margin-bottom: 14px; }
.login-workflow .step-box { display: flex; position: static; padding: 14px; background: #f7f7f8; color: #202124; border-color: #e2e2e5; }
.login-workflow .step-box > span { position: static; width: 26px; height: 26px; font-size: 12px; }
.login-workflow .step-box p { color: #65676d; margin-bottom: 7px; font-size: 13px; }
.login-workflow .step-box textarea { background: #1e1e21; min-height: 64px; }
.login-workflow .btn-submit-gate { padding: 13px; font-size: 15px; }

@media (max-width: 600px) {
    .login-gate { padding: 0 10px 22px; }
    .login-gate-card { padding-inline: 10px; }
    .login-logo { margin-top: 58px; margin-bottom: 16px; }
    .login-workflow { padding: 14px; border-radius: 16px; }
    .login-workflow .step-box { gap: 11px; padding: 12px; }
}
body:has(#loginGate:not(.hidden)) .navbar { display: none; }
body:has(#loginGate:not(.hidden)) .login-gate { min-height: 100vh; }

body.dark-theme { background: #1b1b1b; }
.navbar { position: static; background: #1b1b1b; }
.nav-container { max-width: none; min-height: 62px; padding: 12px 29px; }
.brand { min-height: 33px; gap: 6px; margin-left: -29px; padding: 0 11px 0 14px; border-radius: 0 4px 4px 0; background: #e60012; }
.logo-icon { width: 20px; height: 24px; border: 0; border-radius: 0; background: transparent; color: #fff; }
.top-switch-mark { display: flex; width: 20px; height: 24px; gap: 2px; }
.top-switch-mark i { position: relative; display: block; width: 9px; height: 24px; border: 1.5px solid #fff; }
.top-switch-mark i:first-child { border-radius: 6px 1px 1px 6px; }
.top-switch-mark i:last-child { border-radius: 1px 6px 6px 1px; background: #fff; }
.top-switch-mark i::after { content: ''; position: absolute; width: 3px; height: 3px; top: 5px; left: 2px; border-radius: 50%; background: #fff; }
.top-switch-mark i:last-child::after { top: 15px; left: 2px; background: #e60012; }
.brand-title { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -.35px; white-space: nowrap; }
.nav-tabs { display: none !important; }
.user-profile-menu { display: flex; align-items: center; gap: 20px; }
.notification-button { position: relative; border: 0; padding: 7px; background: transparent; color: #ececee; font-size: 22px; cursor: pointer; }
.notification-button span { position: absolute; top: 4px; right: 3px; width: 7px; height: 7px; border: 1px solid #1b1b1b; border-radius: 50%; background: #22b8f0; }
.avatar-box { gap: 0; border: 0; padding: 0; background: transparent; cursor: pointer; }
.avatar-box img { width: 32px; height: 32px; border: 0; box-shadow: none; }
.btn-logout { position: absolute; opacity: 0; pointer-events: none; }
.main-content { max-width: none; min-height: calc(100vh - 62px); margin: 0; padding: 2px 29px 94px; background: #1b1b1b; }
.tab-page { padding: 0; }
.tab-page:not(.active) { display: none !important; }
#page-home { max-width: none; }
.home-profile-data { display: none; }
.nso-section-heading { justify-content: flex-start; margin: 10px 0 14px; }
.nso-section-heading h2, .home-content-section > h2 { color: #d2d2d4; font: 600 16px var(--font-heading); letter-spacing: -.45px; }
.friends-grid { gap: 19px; min-height: 104px; padding: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.friends-grid::-webkit-scrollbar, .game-services-catalog::-webkit-scrollbar { display: none; }
.friend-card { min-width: 76px; width: 76px; }
.friend-card { color: inherit; font: inherit; cursor: pointer; }
.friend-card:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.friend-avatar-wrap { width: 72px; height: 72px; margin-bottom: 4px; }
.friend-avatar-wrap img { border: 0; }
.friend-avatar-wrap::after { display: none; }
.friend-name { color: #a9a9ad; font-weight: 500; font-size: 12px; }
.friend-loading-tile { flex: 0 0 76px; text-align: center; }
.friend-loading-tile i, .friend-loading-tile span, .service-loading-tile, .media-loading-tile {
    display: block; background: #272729; animation: nso-loading-pulse 1.25s ease-in-out infinite alternate;
}
.friend-loading-tile i { width: 72px; height: 72px; margin: 0 auto 7px; border-radius: 50%; }
.friend-loading-tile span { width: 43px; height: 10px; margin: 0 auto; border-radius: 2px; }
.home-content-section { margin-top: 27px; }
.home-content-section > h2 { margin-bottom: 14px; }
.game-services-catalog { display: flex; gap: 8px; min-height: 0; margin: 0; justify-content: center; justify-content: safe center; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none; }
.service-launch-card { position: relative; display: block; flex: 0 0 clamp(176px, 18.4vw, 300px); min-height: 0; height: auto; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: 8px; background: #29292b; scroll-snap-align: start; }
.service-launch-card img { display: block; width: 100%; height: 100%; border-radius: 0; object-fit: cover; background: #29292b; }
.service-launch-card div { display: none; }
.service-launch-card button { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: transparent; font-size: 0; opacity: 0; }
.service-launch-card:hover img { transform: scale(1.025); transition: transform .18s ease; }
.service-launch-card.missing-service-image { background: linear-gradient(145deg, #3a3a3e, #242426); }
.service-launch-card.missing-service-image img { display: none; }
.service-launch-card.missing-service-image div { position: absolute; inset: 0; display: grid; padding: 18px; place-content: end start; }
.service-launch-card.missing-service-image strong { color: #fff; font: 700 20px var(--font-heading); }
.service-launch-card.missing-service-image p { display: none; }
.service-launch-card.launching-service::after { content: ''; position: absolute; z-index: 2; top: 50%; left: 50%; width: 30px; height: 30px; margin: -18px; border: 4px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: service-launch-spin .7s linear infinite; pointer-events: none; }
.service-launch-card.launching-service::before { content: ''; position: absolute; z-index: 1; inset: 0; background: rgba(0,0,0,.48); pointer-events: none; }
@keyframes service-launch-spin { to { transform: rotate(360deg); } }
.service-loading-tile { flex: 0 0 clamp(176px, 18.4vw, 300px); aspect-ratio: 1; border-radius: 8px; }
.service-status { align-self: center; color: #a9a9ad; }
.home-content-section .media-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; width: 100%; margin: 0; box-sizing: border-box; }
.home-content-section .media-item, .home-content-section .media-loading-tile { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; min-height: 0; box-sizing: border-box; }
.home-dock { position: fixed; z-index: 300; left: 50%; bottom: 18px; display: flex; flex-direction: row; justify-content: space-around; align-items: center; width: min(545px, calc(100vw - 32px)); height: 62px; padding: 0 20px; border-radius: 9999px; background: #464648; transform: translateX(-50%); box-shadow: 0 10px 28px rgba(0,0,0,.4); backdrop-filter: blur(12px); }
.home-dock .dock-tab-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 72px; height: 52px; border-radius: 9999px; border: 0; background: transparent; cursor: pointer; padding: 0; transition: background .25s ease, transform .15s ease; }
.home-dock .dock-tab-btn:active { transform: scale(0.92); }
.home-dock .dock-tab-btn[data-page="home"]:hover { background: rgba(235, 61, 71, 0.2); }
.home-dock .dock-tab-btn[data-page="friends"]:hover { background: rgba(245, 142, 30, 0.2); }
.home-dock .dock-tab-btn[data-page="album"]:hover { background: rgba(46, 150, 234, 0.2); }
.dock-icon-wrap { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.dock-icon-wrap svg { width: 100% !important; height: 100% !important; display: block; }
.dock-svg-icon { width: 26px; height: 26px; display: block; transition: transform .12s ease; }

.native-tab-page { width: 100%; max-width: 100%; margin: 0 auto; padding: 24px 0 30px; box-sizing: border-box; }
.full-width-album-page, .full-width-friends-page { width: 100% !important; max-width: 100% !important; padding: 24px clamp(20px, 4vw, 56px) 100px !important; box-sizing: border-box; }

.native-page-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 24px; }
.album-toolbar-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.album-header-text { flex: 1; min-width: 260px; }
.album-batch-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.btn-album-action { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 9999px; background: #2c2c2e; color: #fff; font: 600 13px var(--font-heading); cursor: pointer; transition: all 0.15s ease; }
.btn-album-action:hover:not(:disabled) { background: #3a3a3d; color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.btn-album-action:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-album-download { background: #2e96ea; border-color: #2e96ea; color: #fff; }
.btn-album-download:hover:not(:disabled) { background: #2284d4; border-color: #2284d4; }
.selected-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #fff; color: #2e96ea; font-size: 11px; font-weight: 700; margin-left: 2px; }

.native-page-heading h1 { color: #e1e1e3; font: 700 25px var(--font-heading); }
.native-page-heading > span,
.album-header-text span { color: #99999e; font-size: 13px; }
.native-page-heading p { flex-basis: 100%; color: #99999e; font-size: 13px; }

.native-friends-top-bar { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; margin-bottom: 28px; width: 100%; }
.native-friends-top-bar h1 { color: #dedee0; font: 700 18px var(--font-heading); text-align: center; margin: 0; }
.friends-top-actions { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 20px; }
.native-icon-btn { border: 0; background: transparent; color: #dedee0; font-size: 20px; cursor: pointer; padding: 6px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: color 0.15s ease, background 0.15s ease; }
.native-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.friends-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 16px; width: 100%; box-sizing: border-box; }
.friends-page-grid .friend-card { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 178px; padding: 20px 14px 16px; border: 0; border-radius: 14px; background: #303032; text-align: center; cursor: pointer; transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; box-sizing: border-box; }
.friends-page-grid .friend-card:hover { background: #38383a; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.friends-page-grid .friend-avatar-wrap { width: 96px; height: 96px; margin: 0 auto 12px; position: relative; }
.friends-page-grid .friend-avatar-wrap img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; }
.friends-page-grid .friend-info { display: flex; flex-direction: column; align-items: center; width: 100%; overflow: hidden; }
.friends-page-grid .friend-name { color: #fff; font: 700 14px var(--font-heading); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.friends-page-grid .friend-online-platform, .friends-page-grid .friend-game, .friends-page-grid .friend-time { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.friends-page-grid .friend-online-platform { color: #1fd46a; font-weight: 700; }
.friends-page-grid .friend-game { color: #00b7ef; font-weight: 600; }
.friends-page-grid .friend-game.friend-game-playing { color: #ececee; font-weight: 700; margin-top: 2px; }
.friends-page-grid .friend-time { color: #88888c; }

.album-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; width: 100%; box-sizing: border-box; }
.media-item { position: relative; display: flex; flex-direction: column; width: 100%; border: 2px solid transparent; border-radius: 9px; background: #252528; overflow: hidden; padding: 0; cursor: pointer; text-align: left; transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; box-sizing: border-box; }
.media-item:hover { background: #303034; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
.media-item.is-selected { border-color: #2e96ea; background: #1b2636; box-shadow: 0 0 0 1px #2e96ea, 0 8px 22px rgba(46, 150, 234, 0.25); }

.media-select-check { position: absolute; top: 8px; left: 8px; z-index: 5; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 6px; background: rgba(0, 0, 0, 0.5); color: transparent; font-size: 11px; cursor: pointer; padding: 0; backdrop-filter: blur(4px); transition: all 0.15s ease; }
.media-select-check:hover { border-color: #fff; background: rgba(0, 0, 0, 0.75); }
.media-item.is-selected .media-select-check { border-color: #2e96ea; background: #2e96ea; color: #fff; }

.media-thumb-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #1a1a1c; overflow: hidden; }
.media-thumb-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.media-item:hover .media-thumb-wrap img { transform: scale(1.03); }
.video-badge { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 10px; backdrop-filter: blur(4px); }
.media-title { display: block; padding: 8px 10px; color: #dedee0; font: 600 12px var(--font-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-loading-tile { aspect-ratio: 16 / 9; border-radius: 8px; }

