/* css/style.css */
:root {
    --primary-color: #0ea5e9;
    --primary-hover: #0284c7;
    --bg-color: #f0fdfa;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --card-bg: #ffffff;
    --ad-bg: #f8fafc;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Header & Nav */
header {
    background-color: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Layout */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* Ads Placeholder */
.ad-space {
    background-color: var(--ad-bg);
    border: 1px dashed #94a3b8;
    text-align: center;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
}
.ad-top { height: 90px; width: 100%; max-width: 1100px; margin: 1rem auto; }
.ad-sidebar { height: 250px; width: 100%; margin-bottom: 2rem; }
.ad-sidebar-large { height: 600px; width: 100%; margin-bottom: 2rem; position: sticky; top: 5rem;}
.ad-content { height: 100px; width: 100%; margin: 1.5rem 0; }
.ad-bottom { height: 90px; width: 100%; max-width: 1100px; margin: 2rem auto; }

/* Main Content Area */
.main-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

h1 { font-size: 1.8rem; margin-bottom: 0.5rem; text-align: center; color: var(--text-main); }
.subtitle { color: var(--text-muted); text-align: center; margin-bottom: 2rem; }

/* Email Generator Section */
.generator-box {
    background: #e0f2fe;
    border: 2px dashed #7dd3fc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.generator-box:hover { background: #bae6fd; }

#current-email {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-hover);
    margin: 1rem 0;
    word-break: break-all;
    letter-spacing: 1px;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    min-width: 150px;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-outline { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background-color: var(--primary-color); color: white; }

/* Inbox Section */
.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    margin-right: 5px;
    animation: blink 2s infinite;
}

@keyframes blink { 0% {opacity: 1;} 50% {opacity: 0.4;} 100% {opacity: 1;} }

.email-list { min-height: 200px; }

.email-item {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    display: grid;
    grid-template-columns: 2fr 3fr 1fr;
    gap: 1rem;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.email-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

.email-sender { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-subject { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-time { text-align: right; font-size: 0.9rem; color: #94a3b8; }

.empty-state { text-align: center; padding: 3rem 1rem; color: #94a3b8; font-style: italic; }

/* Email Viewer */
#email-viewer { display: none; animation: fadeIn 0.3s; }
.viewer-header { border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.viewer-subject { font-size: 1.4rem; margin: 1rem 0; color: var(--text-main); }
.viewer-meta { color: var(--text-muted); font-size: 0.95rem; }
.viewer-body { min-height: 200px; background: #fff; padding: 1.5rem; border: 1px solid var(--border-color); border-radius: 8px; overflow-x: auto; }

@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }

/* Pages Content */
.page-content { background: var(--card-bg); border-radius: 12px; padding: 2.5rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-bottom: 2rem;}
.page-content h1 { text-align: left; margin-bottom: 1.5rem; }
.page-content h2 { margin: 1.5rem 0 1rem; color: var(--text-main); font-size: 1.3rem;}
.page-content p { margin-bottom: 1rem; color: #475569; }
.page-content ul { margin-bottom: 1rem; padding-left: 1.5rem; color: #475569; }
.page-content li { margin-bottom: 0.5rem; }

/* Footer */
footer { background: var(--card-bg); border-top: 1px solid var(--border-color); padding: 2rem; text-align: center; color: var(--text-muted); margin-top: 2rem; }
.footer-links { margin-bottom: 1rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; margin: 0 0.5rem; }
.footer-links a:hover { color: var(--primary-color); }

/* Responsive */
@media (max-width: 900px) {
    .container { grid-template-columns: 1fr; }
    .ad-sidebar-large { position: static; height: auto; min-height: 250px; }
}
@media (max-width: 600px) {
    .nav-container { flex-direction: column; gap: 1rem; }
    #current-email { font-size: 1.4rem; }
    .email-item { grid-template-columns: 1fr; gap: 0.5rem; }
    .email-time { text-align: left; }
    .btn { width: 100%; }
}