:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #e0e7ff;
    --accent: #0ea5e9;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { color: var(--text-muted); }

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    opacity: 0.95;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--primary); }

.btn-icon {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-icon:hover { background: var(--border-color); }

/* Hero Section */
.hero {
    padding: 100px 0 60px;
    position: relative;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

/* Email Card */
.email-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    max-width: 650px;
    margin: 0 auto;
    transition: var(--transition);
}

.email-display {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#email-address {
    flex: 1;
    height: 60px;
    background: var(--bg-body);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 0 20px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

#email-address:focus {
    outline: none;
    background: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-primary, .btn-secondary {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

.btn-secondary { background: var(--border-color); color: var(--text-main); }
.btn-secondary:hover { background: var(--text-muted); color: white; transform: translateY(-2px); }

.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pulse-icon {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    position: relative;
}

.pulse-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

/* Inbox Layout */
.inbox-container {
    margin-top: 40px;
    margin-bottom: 80px;
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.inbox-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0;
    height: 600px;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.inbox-list {
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    background: var(--bg-body);
}

.empty-state {
    padding: 60px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.empty-icon {
    font-size: 3rem;
    color: var(--border-color);
}

.email-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.email-item:hover { background: var(--bg-card); }
.email-item.active { background: var(--bg-card); border-left: 4px solid var(--primary); }

.email-item h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.email-item .sender {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.email-item .date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Message Viewer */
.message-viewer {
    overflow-y: auto;
    padding: 40px;
    position: relative;
    background: var(--bg-card);
}

.viewer-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    text-align: center;
}

.viewer-placeholder i { font-size: 4rem; margin-bottom: 20px; color: var(--border-color); }

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.msg-info h3 { font-size: 1.5rem; margin-bottom: 8px; color: var(--text-main); }
.msg-info p { font-size: 0.9rem; margin-bottom: 4px; color: var(--text-muted); }
.msg-from { color: var(--primary) !important; font-weight: 600; }
.msg-date { color: var(--text-muted); font-size: 0.8rem !important; }

.message-body {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.7;
}

.message-body a { color: var(--primary); }

.hidden { display: none !important; }

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-text:hover { opacity: 0.8; }

/* Features & Sections */
.features { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 60px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.feature-item {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-item:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

body.dark-theme .feature-icon {
    background: rgba(79, 70, 229, 0.2);
}

/* FAQ */
.faq { padding: 80px 0; }
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.faq-item { background: var(--bg-card); padding: 30px; border-radius: 16px; border: 1px solid var(--border-color); }
.faq-item h3 { margin-bottom: 10px; font-size: 1.1rem; }

/* Footer */
.footer {
    padding: 60px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 900px) {
    .inbox-layout { grid-template-columns: 1fr; height: auto; }
    .inbox-list { border-right: none; border-bottom: 1px solid var(--border-color); max-height: 300px; }
    h1 { font-size: 2.5rem; }
    .message-viewer { min-height: 400px; }
}

@media (max-width: 600px) {
    .nav-links { display: none; }
    .email-display { flex-direction: column; }
    .email-display input { width: 100%; text-align: center; }
    .action-buttons { width: 100%; justify-content: center; }
}

/* Tooltip */
.tooltip { position: relative; }
.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: #1e293b;
    color: #fff;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.tooltip:hover::before { opacity: 1; visibility: visible; }
