:root {
    --bg-dark: #0f1014;
    --bg-light: #1c1e24;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-blue: #00b06f;
    --nav-bg: rgba(15, 16, 20, 0.85);
    --nav-height: 64px;
    --header-height: 56px;
    --card-bg: #23252b;
    --border: 1px solid rgba(255,255,255,0.08);
    --border-subtle: 1px solid rgba(255,255,255,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Shared flex utilities */
.top-left, .top-right, .robux-display, .continue-info, .chat-header-info,
.notification-actions, .profile-actions-row { display: flex; align-items: center; }

.notification-item, .chat-list, .chat-info, .auth-container, .auth-form,
.avatar-page, .avatar-bottom-sheet, .share-modal { display: flex; flex-direction: column; }

/* Header */
.notification-dropdown {
    position: fixed;
    top: 60px;
    right: 12px;
    width: 280px;
    background: var(--bg-light);
    border: var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 100;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}
.notification-dropdown.show { display: block; }

.notification-item {
    padding: 12px;
    border-bottom: var(--border-subtle);
    gap: 8px;
}
.notification-item:last-child { border-bottom: none; }

.notification-text { font-size: 13px; line-height: 1.4; }
.notification-actions { gap: 8px; justify-content: flex-end; }

.notif-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}
.btn-accept { background: var(--accent-blue); color: white; }
.btn-ignore { background: #444; color: white; }

.badge {
    position: absolute;
    top: 0; right: 0;
    background: #ff4757;
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid var(--nav-bg);
    transform: translate(25%, -25%);
}

.top-bar {
    height: var(--header-height);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
    border-bottom: var(--border);
    z-index: 10;
    position: sticky;
    top: 0;
}

.top-left, .top-right { gap: 8px; }
.top-right { gap: 12px; }

.logo-container {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
}

.blox-logo, .blox-logo-large { position: relative; border-style: solid; border-color: white; }
.blox-logo {
    width: 20px; height: 20px;
    border-width: 2px;
    transform: rotate(10deg);
    border-radius: 4px;
}
.blox-logo-large {
    width: 64px; height: 64px;
    border-width: 6px;
    transform: rotate(12deg);
    border-radius: 14px;
}
.blox-logo::after, .blox-logo-large::after {
    content: '';
    position: absolute;
    background: white;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.blox-logo::after { width: 6px; height: 6px; border-radius: 1px; }
.blox-logo-large::after { width: 18px; height: 18px; border-radius: 3px; }

.username { font-weight: 700; font-size: 14px; }

.robux-display {
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 16px;
    gap: 6px;
}
.robux-icon { width: 22px; height: 22px; object-fit: contain; border-radius: 50%; }
.robux-amount { font-size: 12px; font-weight: 600; }
.icon-btn { width: 24px; height: 24px; color: white; cursor: pointer; }

/* Main Content & Nav */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding-bottom: var(--nav-height);
    position: relative;
}

.bottom-nav {
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    border-top: var(--border);
    z-index: 20;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    background: none; border: none;
    color: var(--text-secondary);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    width: 20%; height: 100%;
    cursor: pointer;
    transition: color 0.2s;
}
.nav-item.active { color: var(--text-primary); }
.nav-icon { width: 26px; height: 26px; margin-bottom: 2px; position: relative; }
.nav-label { font-size: 10px; font-weight: 500; }

.avatar-circle {
    width: 24px; height: 24px;
    background: #555; border-radius: 50%;
    overflow: hidden; position: relative;
}
.nav-item.active .avatar-circle { border: 2px solid white; width: 26px; height: 26px; }
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

/* Chat */
.chat-search-container {
    padding: 12px 16px;
    background: var(--bg-dark);
    position: sticky; top: 0; z-index: 5;
}

.chat-item {
    display: flex; align-items: center;
    gap: 12px; padding: 12px 16px;
    border-bottom: var(--border-subtle);
    cursor: pointer; transition: background 0.2s;
}
.chat-item:active { background: rgba(255,255,255,0.05); }

.chat-avatar-box { width: 50px; height: 50px; position: relative; flex-shrink: 0; }
.chat-avatar-img {
    width: 100%; height: 100%;
    border-radius: 50%; object-fit: cover;
    background: #333; border: var(--border);
}
.chat-status-indicator {
    width: 14px; height: 14px;
    background: #00b06f;
    border: 3px solid var(--bg-dark);
    border-radius: 50%;
    position: absolute; bottom: 0; right: 0;
}

.chat-info { flex: 1; min-width: 0; gap: 2px; }
.chat-name-row { display: flex; justify-content: space-between; align-items: center; }
.chat-username { font-weight: 700; font-size: 15px; }
.chat-time { font-size: 11px; color: var(--text-secondary); }
.chat-preview {
    font-size: 13px; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.chat-view-header {
    height: 54px; background: var(--bg-light);
    display: flex; align-items: center;
    padding: 0 8px; gap: 8px;
    border-bottom: var(--border); flex-shrink: 0;
}

.chat-back-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: white; background: none; border: none;
    cursor: pointer; border-radius: 50%;
}
.chat-back-btn:active { background: rgba(255,255,255,0.1); }

.chat-header-info { flex: 1; gap: 10px; }
.chat-header-name { font-weight: 700; font-size: 16px; }
.chat-header-status { font-size: 11px; color: #00b06f; }

.chat-messages-area {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 4px;
    background: var(--bg-dark);
}

.msg-bubble {
    max-width: 75%; padding: 10px 14px;
    border-radius: 18px; font-size: 15px;
    line-height: 1.4; position: relative; word-wrap: break-word;
}
.msg-bubble.me {
    align-self: flex-end;
    background: var(--text-primary); color: var(--bg-dark);
    border-bottom-right-radius: 4px;
}
.msg-bubble.them {
    align-self: flex-start;
    background: var(--card-bg);
    border-bottom-left-radius: 4px;
}

.chat-input-bar {
    background: var(--bg-light);
    padding: 10px 16px;
    display: flex; gap: 12px; align-items: center;
    border-top: var(--border);
}
.chat-input-field {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: var(--border);
    border-radius: 24px;
    padding: 10px 16px;
    color: white; font-size: 15px; outline: none;
}
.chat-input-field:focus { border-color: rgba(255,255,255,0.3); }

.chat-send-btn {
    width: 40px; height: 40px;
    background: var(--text-primary); color: var(--bg-dark);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
}

/* More Page */
.more-page { padding: 16px; padding-bottom: 80px; }
.more-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px; margin-bottom: 24px;
}
.more-card {
    background: var(--card-bg); border-radius: 12px;
    padding: 16px; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; aspect-ratio: 1.4; cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.1s; text-align: center;
}
.more-card:active { transform: scale(0.98); background: #3a3d42; }
.more-icon { width: 32px; height: 32px; color: white; }
.more-label { font-weight: 600; font-size: 13px; }
.logout-btn { background: var(--card-bg); border: 1px solid rgba(255,71,87,0.3); color: #ff4757; }

/* Sections & Animations */
.section { padding: 16px; opacity: 0; animation: fadeIn 0.3s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

.section-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; }

.scroll-row {
    display: flex; gap: 12px;
    overflow-x: auto; padding-bottom: 8px; scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }

.card-skeleton {
    background: var(--card-bg); border-radius: 8px;
    flex-shrink: 0; position: relative; overflow: hidden;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #0f2e5c, #1a4b8e);
    border-radius: 16px; 
    padding: 24px; 
    margin-bottom: 24px;
    position: relative; 
    overflow: hidden; 
    min-height: 200px;
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end;
    box-shadow: 0 10px 30px -5px rgba(26, 75, 142, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
}
.hero-content { position: relative; z-index: 2; max-width: 90%; }
.hero-tag {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    display: inline-block; 
    padding: 4px 10px;
    border-radius: 20px; 
    font-size: 10px;
    font-weight: 700; 
    margin-bottom: 12px; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,255,255,0.1);
}
.hero-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; line-height: 1.1; letter-spacing: -0.5px; }
.hero-desc { font-size: 13px; color: rgba(255,255,255,0.9); margin-bottom: 16px; line-height: 1.5; }
.hero-btn {
    background: white; 
    color: #0f2e5c; 
    border: none;
    padding: 10px 24px; 
    border-radius: 24px;
    font-weight: 700; 
    font-size: 13px; 
    cursor: pointer;
    display: inline-flex; 
    align-items: center; 
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.hero-btn:active { transform: scale(0.96); }

/* Continue Playing */
.continue-card {
    background: var(--card-bg); min-width: 140px; padding: 10px;
    border-radius: 8px; display: flex; align-items: center;
    justify-content: space-between; gap: 8px;
}
.continue-info { gap: 10px; }
.continue-icon { width: 32px; height: 32px; border-radius: 6px; background: #444; }
.play-circle {
    width: 28px; height: 28px;
    background: var(--accent-blue); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: white;
}

/* Pill Tabs */
.pill-tabs {
    display: flex; gap: 8px; overflow-x: auto;
    margin: 16px 0; padding-bottom: 4px;
}
.pill-tab {
    background: transparent; color: var(--text-secondary);
    border: none; padding: 6px 16px; border-radius: 20px;
    font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer;
}
.pill-tab.active { background: rgba(255,255,255,0.1); color: white; }

/* Game Grid */
.game-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px; margin-bottom: 24px;
}
.game-card-v2 { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    transition: transform 0.1s;
    cursor: pointer;
}
.game-card-v2:active { transform: scale(0.96); }

.game-thumb-v2 { 
    aspect-ratio: 16/9; 
    border-radius: 12px; 
    background: transparent;
    position: relative; 
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: var(--border-subtle);
}

.stat-tags { position: absolute; bottom: 8px; left: 8px; display: flex; gap: 6px; }
.stat-tag {
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 12px; 
    font-size: 10px; 
    font-weight: 600;
    display: flex; 
    align-items: center; 
    gap: 3px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Friends & Game Cards */
.friend-card { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.friend-avatar {
    width: 60px; height: 60px; border-radius: 50%;
    background: #4a4d50; position: relative; border: 2px solid transparent;
}
.friend-status {
    width: 12px; height: 12px;
    border: 2px solid var(--bg-dark); background: #777;
    border-radius: 50%; position: absolute; bottom: 2px; right: 2px;
}
.friend-name {
    font-size: 12px; color: var(--text-secondary); text-align: center;
    width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.game-card { width: 160px; display: flex; flex-direction: column; gap: 8px; }
.game-thumb {
    width: 100%; aspect-ratio: 16/9; background: #4a4d50;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.2); font-size: 24px;
}
.game-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.game-info p { font-size: 12px; color: var(--text-secondary); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
.empty-icon {
    width: 64px; height: 64px; background: var(--bg-light);
    border-radius: 50%; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
}

/* Avatar Page */
.avatar-page {
    height: calc(100vh - var(--nav-height));
    background: radial-gradient(circle at center, #2e3033, #1a1c1e);
    position: relative; overflow: hidden;
}
#avatar-canvas { height: 45%; width: 100%; position: relative; }

.avatar-bottom-sheet {
    flex: 1; background: var(--bg-light);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 10; overflow: hidden; margin-top: -20px;
}

.avatar-main-tabs { display: flex; border-bottom: var(--border); flex-shrink: 0; }
.avatar-main-tab {
    flex: 1; text-align: center; padding: 14px;
    font-weight: 800; font-size: 14px; color: var(--text-secondary);
    cursor: pointer; position: relative;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.avatar-main-tab.active { color: var(--text-primary); }
.avatar-main-tab.active::after {
    content: ''; position: absolute;
    bottom: 0; left: 15%; right: 15%;
    height: 3px; background: white; border-radius: 3px 3px 0 0;
}

.avatar-subnav {
    display: flex; overflow-x: auto;
    padding: 12px 16px; gap: 12px;
    border-bottom: var(--border-subtle);
    scrollbar-width: none; flex-shrink: 0; background: var(--bg-light);
}
.avatar-subnav::-webkit-scrollbar { display: none; }

.subnav-btn {
    white-space: nowrap; font-size: 13px; font-weight: 600;
    color: var(--text-secondary); background: none; border: none;
    cursor: pointer; padding: 6px 12px; border-radius: 16px; transition: all 0.2s;
}
.subnav-btn.active { color: var(--bg-dark); background: white; }

.avatar-content-area { flex: 1; overflow-y: auto; padding: 16px; }
.avatar-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 12px; padding-bottom: 20px;
}

.avatar-item-card {
    aspect-ratio: 1; background: var(--card-bg); border-radius: 12px;
    position: relative; cursor: pointer; overflow: hidden;
    border: 2px solid transparent; transition: transform 0.1s;
}
.avatar-item-card:active { transform: scale(0.95); }
.avatar-item-card.equipped { border-color: var(--accent-blue); background: rgba(0,176,111,0.1); }

.item-thumb {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.item-badge-equipped {
    position: absolute; top: 4px; left: 4px;
    background: var(--accent-blue); width: 16px; height: 16px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--card-bg);
}
.item-price-tag {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.6); font-size: 10px;
    padding: 4px; text-align: center; font-weight: 700;
    backdrop-filter: blur(2px);
}

.edit-pfp-btn {
    position: absolute; bottom: 24px; right: 16px;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white; width: 40px; height: 40px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 5;
}

/* Auth */
.auth-overlay {
    position: fixed; inset: 0;
    background: var(--bg-dark); z-index: 9999;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-container { width: 100%; max-width: 360px; gap: 32px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.auth-logo h1 { font-size: 32px; font-weight: 800; letter-spacing: -1px; }

.auth-form {
    background: #1c1e24; 
    padding: 32px; 
    border-radius: 16px;
    gap: 16px; 
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}
.auth-form h2 { font-size: 24px; margin-bottom: 8px; }

.input-group input {
    width: 100%; padding: 12px 16px; border-radius: 8px;
    border: var(--border); background: rgba(0,0,0,0.2);
    color: white; font-size: 16px; transition: border-color 0.2s;
}
.input-group input:focus { outline: none; border-color: white; }

.field-error { color: #ff6b6b; font-size: 12px; margin-top: 4px; font-weight: 600; }
.auth-btn {
    background: var(--accent-blue); color: white; border: none;
    padding: 14px; border-radius: 12px;
    font-weight: 700; font-size: 15px; cursor: pointer;
    margin-top: 12px; transition: transform 0.1s, filter 0.2s;
    box-shadow: 0 4px 12px rgba(0, 176, 111, 0.3);
}
.auth-btn:hover { filter: brightness(1.1); }
.auth-btn:active { transform: scale(0.98); }
.auth-error { color: #ff6b6b; font-size: 13px; min-height: 18px; font-weight: 500; }
.auth-footer { text-align: center; font-size: 12px; color: var(--text-secondary); margin-top: 12px; user-select: none; }
.auth-footer a { color: white; text-decoration: underline; cursor: pointer; }

/* Discover */
.search-container { margin-bottom: 16px; position: relative; }
.search-input {
    width: 100%; background: rgba(0,0,0,0.3);
    border: var(--border); border-radius: 24px;
    padding: 10px 16px 10px 42px;
    color: white; font-size: 14px; outline: none;
    transition: background 0.2s, border-color 0.2s;
}
.search-input:focus { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }
.search-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: var(--text-secondary);
    width: 18px; height: 18px; pointer-events: none;
}

.discover-banner {
    width: 100%; aspect-ratio: 16/9;
    background: linear-gradient(135deg, #4f46e5, #0f172a);
    border-radius: 16px; margin-bottom: 24px;
    position: relative; overflow: hidden;
    display: flex; align-items: flex-end; padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.banner-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.9));
}
.banner-content { position: relative; z-index: 2; width: 100%; }

/* Scratch Blocks */
.scratch-block {
    padding: 12px; border-radius: 6px;
    font-weight: 700; font-size: 13px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-left: 4px solid rgba(0,0,0,0.2);
}
.scratch-block.event { background: #ffbf00; color: #4a3800; }
.scratch-block.action { background: #4c97ff; color: white; }
.scratch-block select {
    background: rgba(0,0,0,0.2); border: none;
    border-radius: 12px; padding: 4px 8px;
    font-weight: 700; cursor: pointer; color: inherit; outline: none;
}

/* Profile */
.profile-page { background: var(--bg-dark); min-height: 100%; }
.profile-header-bg {
    height: 120px;
    background: linear-gradient(to right, #2b5876, #4e4376);
    position: relative;
}
.back-btn-circle {
    position: absolute; top: 12px; left: 12px;
    width: 36px; height: 36px;
    background: rgba(0,0,0,0.3); border-radius: 50%;
    border: none; color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; backdrop-filter: blur(4px);
}
.profile-content { padding: 0 16px 80px; position: relative; top: -40px; }
.profile-avatar-row { margin-bottom: 12px; }
.profile-avatar-lg {
    width: 80px; height: 80px; border-radius: 50%;
    background: #333; border: 4px solid var(--bg-dark); overflow: hidden;
}
.profile-names { margin-bottom: 20px; }
.profile-username { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.profile-meta { color: var(--text-secondary); font-size: 13px; }

.profile-stats-bar {
    display: flex; justify-content: space-around;
    padding: 16px 0; margin-bottom: 20px;
    border-top: var(--border); border-bottom: var(--border);
}
.p-stat { text-align: center; }
.p-stat-val { font-size: 18px; font-weight: 700; }
.p-stat-label { font-size: 11px; color: var(--text-secondary); }

.profile-actions-row { gap: 12px; margin-bottom: 24px; }
.p-action-btn {
    flex: 1; padding: 10px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent; color: white;
    font-weight: 600; cursor: pointer; font-size: 14px;
}
.p-action-btn.primary { background: white; color: black; border-color: white; }
.p-action-btn.disabled { opacity: 0.5; cursor: default; }

/* Share Modal */
.share-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.8); z-index: 200;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.share-modal-overlay.active { opacity: 1; pointer-events: auto; }

.share-modal {
    width: 90%; max-width: 360px;
    background: var(--bg-light); border-radius: 12px;
    overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: var(--border); max-height: 60vh;
}
.share-header {
    padding: 16px; border-bottom: var(--border-subtle);
    display: flex; justify-content: space-between; align-items: center;
    background: var(--nav-bg);
}
.share-list { overflow-y: auto; padding: 8px; }
.share-user-row {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px; border-radius: 8px; transition: background 0.2s;
}
.share-user-row:hover { background: rgba(255,255,255,0.05); }
.share-avatar { width: 32px; height: 32px; border-radius: 50%; background: #333; object-fit: cover; }
.share-name { flex: 1; font-weight: 600; font-size: 14px; }
.share-send-btn {
    background: var(--accent-blue); color: white;
    border: none; padding: 6px 12px; border-radius: 6px;
    font-weight: 700; font-size: 12px; cursor: pointer;
}
.share-send-btn:disabled { background: #444; color: #888; cursor: default; }

/* Chat Game Card */
.chat-game-card {
    background: var(--bg-dark); border: var(--border);
    border-radius: 8px; overflow: hidden; margin-top: 8px;
    cursor: pointer; max-width: 220px; transition: transform 0.1s;
}
.chat-game-card:active { transform: scale(0.98); }
.chat-game-thumb {
    width: 100%; aspect-ratio: 16/9; background: #333;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; overflow: hidden;
}
.chat-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chat-game-info { padding: 8px; }
.chat-game-title {
    font-weight: 700; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 2px;
}
.chat-game-meta { font-size: 10px; color: var(--text-secondary); }

/* Blog Styles */
.blog-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.blog-image-container {
    width: 100%;
    height: 240px;
    background: #2a2d31;
    position: relative;
    overflow: hidden;
}
.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.blog-card:hover .blog-image {
    transform: scale(1.02);
}
.blog-image-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--card-bg), transparent);
}
.blog-content {
    padding: 24px;
    position: relative;
}
.blog-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    background: var(--accent-blue);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 2px solid var(--card-bg);
    z-index: 2;
}
.blog-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: white;
}
.blog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 500;
}
.blog-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    font-style: italic;
    border-left: 3px solid var(--accent-blue);
    padding-left: 16px;
    background: rgba(255,255,255,0.02);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}
.blog-body {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
    white-space: pre-wrap;
}
.verified-icon {
    color: #3b82f6;
    margin-left: -2px;
}
.delete-post-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 5;
}
.delete-post-btn:hover {
    background: rgba(239,68,68,0.2);
}

.script-ui-btn {
    transition: transform 0.1s, background 0.1s;
}
.script-ui-btn:active {
    transform: scale(0.95);
    filter: brightness(0.9);
}
/* ── Mobile Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .main-content {
        padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
    }
    .top-bar {
        padding: 0 12px;
    }
    .more-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .more-card {
        padding: 14px 8px;
    }
    .more-icon {
        width: 26px;
        height: 26px;
    }
    .more-label {
        font-size: 10px;
    }
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .home-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .friends-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .auth-container {
        padding: 24px 16px;
        max-width: 100%;
    }
    .section-title {
        font-size: 16px;
    }
    /* Make modals full-width on mobile */
    [style*="max-width: 420px"],
    [style*="max-width:420px"],
    [style*="max-width: 400px"],
    [style*="max-width:400px"] {
        max-width: calc(100vw - 24px) !important;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .home-games-grid {
        grid-template-columns: 1fr 1fr;
    }
    .nav-item span {
        font-size: 9px;
    }
}
