:root {
    --bg-base: #0a0c10;
    --bg-card: #161b22;
    --bg-hover: #21262d;
    --accent: #58a6ff;
    --accent-glow: rgba(88, 166, 255, 0.15);
    --text-main: #c9d1d9;
    --text-bold: #f0f6fc;
    --text-muted: #8b949e;
    --border: #30363d;
    --radius-lg: 12px;
    --radius-md: 8px;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@600;800&display=swap');

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow: hidden; /* Main body should not scroll, containers will */
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-bold);
}

/* Layout */
.app-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.sidebar-v2 {
    width: 72px;
    background: #010409;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 2rem;
}

.main-content-v2 {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    background: radial-gradient(circle at 50% 0%, #161b22 0%, #0a0c10 100%);
}

/* Sidebar Icons */
.nav-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.nav-icon:hover, .nav-icon.active {
    background: var(--bg-card);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Inbox List */
.inbox-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.email-row {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    display: grid;
    grid-template-columns: 200px 1fr 100px;
    align-items: center;
    gap: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.email-row:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    background: var(--bg-hover);
}

.sender-v2 {
    font-weight: 600;
    color: var(--text-bold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subject-v2 {
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.time-v2 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}

/* Email View */
.reader-wrapper {
    max-width: 850px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.reader-header {
    margin-bottom: 3rem;
}

.reader-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: #1a1a1b;
}

.email-body-inner {
    padding: 1px; /* Avoid margin collapse */
}

/* Buttons */
.btn-nebula {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-bold);
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-nebula:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.btn-danger {
    color: #f85149;
}

.btn-danger:hover {
    background: rgba(248, 81, 73, 0.1);
    border-color: #f85149;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
