/* Modern Gmail Style Design */
:root {
    --primary-blue: #4285F4;
    --primary-red: #EA4335;
    --primary-yellow: #FBBC05;
    --primary-green: #34A853;
    --bg-light: #F6F8FC;
    --white: #FFFFFF;
    --text-main: #3C4043;
    --text-muted: #5F6368;
    --sidebar-width: 260px;
    --hover-bg: rgba(60, 64, 67, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Google Sans', Roboto, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Main Layout for Dashboard */
#app {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: var(--transition);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.logo-section {
    padding-left: 0.5rem;
}

.logo-section h1 {
    font-size: 1.4rem;
    color: var(--text-main);
}

.compose-btn {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    max-width: 150px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
}

.compose-btn:hover {
    box-shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 0 2rem 2rem 0;
    margin-right: -1rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links li a:hover {
    background-color: var(--hover-bg);
}

.nav-links li a.active {
    background-color: #D3E3FD;
    color: #0b57d0;
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    height: 64px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-bar {
    flex: 0.7;
    background: #EAF1FB;
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    margin-left: 0.5rem;
    font-size: 1rem;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Email List Content */
.email-container {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    background: var(--white);
    margin: 0.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.email-row {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeIn 0.5s ease forwards;
}

.email-row:hover {
    box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    z-index: 1;
}

.email-row.unread {
    background: #f8f9fa;
    font-weight: 600;
}

.email-row .sender { width: 200px; font-size: 0.9rem; }
.email-row .subject { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem;}
.email-row .time { width: 100px; text-align: right; font-size: 0.8rem; color: var(--text-muted); }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Landing Page / Login Styling */
.auth-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
}

.auth-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 2.5rem;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    animation: scaleUp 0.6s ease;
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.auth-card h2 { margin-bottom: 1.5rem; }
.auth-card input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #ddd;
    outline-color: var(--primary-blue);
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 60px; padding: 0.5rem; }
    .sidebar .compose-btn span, .sidebar .nav-links li span, .logo-section h1 { display: none; }
    .email-row .sender { width: 100px; }
}

/* Compose Modal Styling (If needed) */
.compose-window {
    position: fixed;
    bottom: 0;
    right: 50px;
    width: 500px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    flex-direction: column;
}

.compose-header {
    background: #404040;
    color: white;
    padding: 0.7rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
