/* ============================================
   NEFARIOUS EMAILS - Complete Stylesheet
   HappyStoner5420 Games 2026
   ============================================ */

* { margin:0; padding:0; box-sizing:border-box; }

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #1a1a2e;
    --bg-surface: #16213e;
    --bg-hover: #1e2a4a;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --accent-red: #ea4335;
    --accent-blue: #4285f4;
    --accent-green: #34a853;
    --accent-yellow: #fbbc04;
    --accent-purple: #a855f7;
    --border-color: #2a2a3e;
    --gmail-red: #c5221f;
    --compose-bg: #1e1e2e;
    --shadow-heavy: 0 8px 32px rgba(0,0,0,0.6);
    --shadow-light: 0 2px 8px rgba(0,0,0,0.3);
    --radius: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --sidebar-width: 256px;
    --topbar-height: 64px;
}

body {
    font-family: 'Roboto', 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ============ SCREENS ============ */
.screen {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    z-index: 1;
}
.screen.active { display: flex; z-index: 10; }

/* ============ MAIN MENU ============ */
#main-menu {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 30%, #0a1a3e 60%, #0a0a1a 100%);
}

.menu-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(66,133,244,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(234,67,53,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(168,85,247,0.06) 0%, transparent 50%);
    animation: menuPulse 8s ease-in-out infinite;
}

@keyframes menuPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.menu-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-logo { margin-bottom: 48px; }

.logo-envelope {
    width: 120px; height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #ea4335 0%, #c5221f 100%);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 8px 32px rgba(234,67,53,0.4), 0 0 60px rgba(234,67,53,0.15);
}
.logo-envelope::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent 33%, rgba(255,255,255,0.1) 33%, rgba(255,255,255,0.1) 66%, transparent 66%);
    border-radius: 8px;
}
.logo-envelope::after {
    content: 'N';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.game-title {
    font-family: 'Google Sans', sans-serif;
    font-size: 64px;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.1;
    background: linear-gradient(135deg, #ea4335, #fbbc04, #34a853, #4285f4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}
.game-title span {
    font-size: 72px;
    letter-spacing: 8px;
    background: linear-gradient(135deg, #a855f7, #ea4335);
    -webkit-background-clip: text;
    background-clip: text;
}

.game-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.menu-btn {
    width: 320px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Google Sans', sans-serif;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}
.menu-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.5s ease;
}
.menu-btn:hover::before { left: 100%; }
.menu-btn:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 20px rgba(66,133,244,0.2);
    transform: translateY(-2px);
}

.btn-icon {
    width: 32px; height: 32px;
    background: rgba(66,133,244,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-blue);
}

.exit-btn:hover {
    border-color: var(--accent-red);
    box-shadow: 0 4px 20px rgba(234,67,53,0.2);
}
.exit-btn .btn-icon {
    background: rgba(234,67,53,0.15);
    color: var(--accent-red);
}

/* ============ OVERLAY PANELS ============ */
.overlay-panel {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    max-width: 600px;
    width: 90%;
    margin: auto;
    text-align: center;
    box-shadow: var(--shadow-heavy);
    animation: fadeInUp 0.5s ease-out;
}
.overlay-panel h2 {
    font-family: 'Google Sans', sans-serif;
    font-size: 32px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#how-to-play, #credits, #exit-screen {
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
}

.htp-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    margin: 8px 0;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius);
    text-align: left;
    font-size: 14px;
}
.step-num {
    width: 32px; height: 32px;
    min-width: 32px;
    background: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.htp-note {
    margin-top: 16px;
    padding: 12px;
    background: rgba(234,67,53,0.1);
    border: 1px solid rgba(234,67,53,0.3);
    border-radius: var(--radius);
    color: var(--accent-red);
    font-size: 13px;
}

/* Credits */
.credits-content { text-align: center; }
.credit-studio {
    font-family: 'Google Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--accent-yellow);
}
.credit-line {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}
.credit-line span:first-child { color: var(--text-secondary); }
.credit-special {
    margin-top: 24px;
    font-style: italic;
    color: var(--text-secondary);
}
.credit-year {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.exit-joke {
    color: var(--text-secondary);
    font-style: italic;
    margin: 16px 0;
}
.exit-buttons { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.exit-buttons .menu-btn { width: auto; padding: 12px 32px; }

/* ============ GMAIL TOPBAR ============ */
.gmail-topbar {
    height: var(--topbar-height);
    background: linear-gradient(180deg, #1a1a2e 0%, #161625 100%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.hamburger-btn {
    width: 40px; height: 40px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    letter-spacing: 2px;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.08); }

.gmail-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Google Sans', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
}
.gmail-icon-small {
    width: 32px; height: 22px;
    background: linear-gradient(135deg, #ea4335, #c5221f);
    border-radius: 4px;
    position: relative;
}
.gmail-icon-small::after {
    content: 'N';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.topbar-search { flex: 1; max-width: 720px; }
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 0 16px;
    height: 44px;
    transition: all 0.3s;
}
.search-box:focus-within {
    background: var(--bg-card);
    border-color: var(--accent-blue);
    box-shadow: 0 2px 12px rgba(66,133,244,0.15);
}
.search-icon {
    color: var(--text-secondary);
    margin-right: 12px;
    font-size: 16px;
    font-weight: 700;
}
.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
}
.search-box input::placeholder { color: var(--text-secondary); }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chaos-score, .emails-sent-count {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(234,67,53,0.1);
    border: 1px solid rgba(234,67,53,0.2);
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 500;
}
.score-label { color: var(--accent-red); }
.score-value { color: var(--accent-yellow); font-weight: 700; }
.emails-sent-count {
    background: rgba(66,133,244,0.1);
    border-color: rgba(66,133,244,0.2);
}
.sent-label { color: var(--accent-blue); }
.sent-value { color: var(--text-primary); font-weight: 700; }

.topbar-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}
.topbar-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

/* ============ GMAIL BODY ============ */
.gmail-body {
    display: flex;
    height: calc(100vh - var(--topbar-height));
}

#game-screen {
    flex-direction: column;
    background: var(--bg-dark);
}

/* ============ SIDEBAR ============ */
.gmail-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: linear-gradient(180deg, #12121f 0%, #0e0e1a 100%);
    border-right: 1px solid var(--border-color);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    transition: transform 0.3s ease, width 0.3s ease;
}
.gmail-sidebar.collapsed {
    transform: translateX(-100%);
    width: 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.compose-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Google Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(66,133,244,0.3);
    margin-bottom: 8px;
}
.compose-btn:hover {
    box-shadow: 0 6px 24px rgba(66,133,244,0.5);
    transform: translateY(-1px);
}
.compose-plus {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text-secondary);
}
.nav-item:hover { background: rgba(255,255,255,0.06); }
.nav-item.active {
    background: rgba(66,133,244,0.15);
    color: var(--text-primary);
    font-weight: 500;
}
.nav-icon {
    width: 20px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}
.nav-label { flex: 1; }
.nav-count {
    background: var(--accent-red);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.sidebar-stats {
    margin-top: auto;
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}
.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 6px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.stat-item:last-child { border-bottom: none; }
.stat-item span:last-child { color: var(--accent-yellow); font-weight: 600; }

/* ============ EMAIL LIST ============ */
.email-list-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.email-list-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.folder-title {
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}
.email-list-info { font-size: 12px; color: var(--text-secondary); }

.email-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}
.email-list::-webkit-scrollbar { width: 6px; }
.email-list::-webkit-scrollbar-track { background: transparent; }
.email-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.empty-inbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    gap: 12px;
}
.empty-icon { font-size: 48px; opacity: 0.3; }
.empty-sub { font-size: 13px; opacity: 0.6; }

.email-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.2s;
    gap: 12px;
    border-radius: var(--radius);
    margin: 2px 0;
}
.email-item:hover { background: var(--bg-hover); }
.email-item.unread {
    background: rgba(66,133,244,0.06);
    border-left: 3px solid var(--accent-blue);
}
.email-item.unread .email-sender { font-weight: 700; color: var(--text-primary); }
.email-item.unread .email-subject { font-weight: 600; color: var(--text-primary); }

.email-avatar {
    width: 40px; height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
}
.email-content { flex: 1; min-width: 0; }
.email-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.email-sender {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.email-time { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.email-subject {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.email-preview {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* ============ EMAIL READER ============ */
.email-reader {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-dark);
}
.reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.reader-back {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.reader-back:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.reader-actions { display: flex; gap: 8px; }
.reader-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.reader-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

.reader-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
.reader-subject {
    font-family: 'Google Sans', sans-serif;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}
.reader-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.reader-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: white;
}
.reader-meta-info { flex: 1; }
.reader-from { font-weight: 500; font-size: 14px; }
.reader-to { font-size: 12px; color: var(--text-secondary); }
.reader-date { font-size: 12px; color: var(--text-secondary); }
.reader-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* ============ COMPOSE WINDOW ============ */
.compose-window {
    position: fixed;
    bottom: 0;
    right: 80px;
    width: 560px;
    height: 520px;
    background: var(--compose-bg);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-heavy);
    display: flex;
    flex-direction: column;
    z-index: 100;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.compose-window.minimized {
    height: 44px;
    overflow: hidden;
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, #2a2a3e, #1e1e30);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.compose-controls { display: flex; gap: 8px; }
.compose-minimize, .compose-close {
    width: 28px; height: 28px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.compose-minimize:hover, .compose-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.compose-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.compose-field {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}
.compose-field label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 56px;
}
.compose-field input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    padding: 4px 0;
}
.compose-field input::placeholder { color: rgba(255,255,255,0.25); }

.contact-dropdown {
    position: absolute;
    top: 100%;
    left: 56px;
    right: 16px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
    z-index: 200;
    display: none;
}
.contact-dropdown.visible { display: block; }
.contact-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.contact-item:hover { background: var(--bg-hover); }
.contact-item-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}
.contact-item-info { flex: 1; }
.contact-item-name { font-weight: 500; color: var(--text-primary); }
.contact-item-email { font-size: 11px; color: var(--text-secondary); }
.contact-item-cat { font-size: 10px; color: var(--accent-purple); text-transform: uppercase; letter-spacing: 0.5px; }

.compose-editor {
    flex: 1;
    padding: 0;
}
.compose-editor textarea {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    padding: 16px;
    resize: none;
    outline: none;
    font-family: 'Roboto', sans-serif;
}
.compose-editor textarea::placeholder { color: rgba(255,255,255,0.2); }

.compose-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.toolbar-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.toolbar-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

.send-btn {
    padding: 10px 32px;
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Google Sans', sans-serif;
}
.send-btn:hover {
    box-shadow: 0 4px 16px rgba(66,133,244,0.4);
    transform: translateY(-1px);
}

/* ============ EMOJI PICKER ============ */
.emoji-picker {
    position: absolute;
    bottom: 50px;
    left: 16px;
    width: 320px;
    max-height: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
    padding: 12px;
    overflow-y: auto;
    z-index: 200;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.emoji-btn {
    width: 36px; height: 36px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.emoji-btn:hover { background: rgba(255,255,255,0.1); }

/* ============ NOTIFICATION ============ */
.notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-heavy);
    font-size: 14px;
    z-index: 300;
    animation: notifIn 0.3s ease-out;
}
@keyframes notifIn {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ============ ACHIEVEMENT ============ */
.achievement-popup {
    position: fixed;
    top: 80px;
    right: 24px;
    background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
    border: 1px solid var(--accent-purple);
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(168,85,247,0.3);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 300;
    animation: achieveIn 0.5s ease-out;
}
@keyframes achieveIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.achieve-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--accent-yellow), #e68a00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}
.achieve-text { display: flex; flex-direction: column; gap: 4px; }
.achieve-title { font-weight: 700; font-size: 14px; color: var(--accent-yellow); }
.achieve-desc { font-size: 12px; color: var(--text-secondary); }

/* ============ ACHIEVEMENTS FOLDER ============ */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding: 16px;
}
.achievement-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.achievement-card.unlocked {
    border-color: var(--accent-yellow);
    background: rgba(251,188,4,0.05);
}
.achievement-card-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-secondary);
}
.achievement-card.unlocked .achievement-card-icon {
    background: linear-gradient(135deg, var(--accent-yellow), #e68a00);
    color: white;
}
.achievement-card-info { flex: 1; }
.achievement-card-title { font-weight: 600; font-size: 13px; }
.achievement-card-desc { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .gmail-sidebar { position: fixed; z-index: 50; height: calc(100vh - var(--topbar-height)); top: var(--topbar-height); }
    .gmail-sidebar.collapsed { transform: translateX(-100%); }
    .compose-window { right: 0; left: 0; width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .game-title { font-size: 40px; }
    .game-title span { font-size: 48px; letter-spacing: 4px; }
    .menu-btn { width: 280px; }
    .topbar-search { display: none; }
    .chaos-score, .emails-sent-count { padding: 4px 8px; font-size: 11px; }
}
