/* 
 * MonzMail - Premium Dark Theme
 * Global Styles & Layout
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #0f1923;
    --card-bg: rgba(26, 39, 54, 0.8);
    --accent-color: #00d26a;
    --accent-hover: #00b35a;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.05);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 30%, rgba(0, 210, 106, 0.05) 0%, transparent 40%),
                      radial-gradient(circle at 80% 70%, rgba(0, 210, 106, 0.05) 0%, transparent 40%);
    z-index: -1;
}

/* Header */
header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    color: var(--accent-color);
}

.system-status {
    background: rgba(0, 210, 106, 0.1);
    border: 1px solid rgba(0, 210, 106, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Input Section */
.input-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    gap: 15px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    padding: 12px 12px 12px 45px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Multi-domain input styles */
.input-wrapper.multi-input {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding-left: 45px;
    transition: 0.3s;
}

.input-wrapper.multi-input:focus-within {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.input-wrapper.multi-input input {
    background: transparent;
    border: none;
    padding-left: 0;
    width: auto;
    flex: 1;
}

.at-symbol {
    color: var(--text-secondary);
    padding: 0 10px;
    font-weight: 600;
}

#domain-select {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-weight: 600;
    padding: 12px 15px 12px 0;
    outline: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

#domain-select option {
    background: var(--bg-color);
    color: white;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Inbox Table Area */
.inbox-card {
    width: 100%;
    max-width: 1000px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.inbox-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.inbox-header i {
    color: var(--accent-color);
}

.inbox-list {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    padding: 4rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.email-item {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 200px 1fr 150px;
    gap: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.email-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sender-info {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subject-info {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-info {
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Sidebar actions */
.sidebar-actions {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-circle {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.action-circle:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: scale(1.1);
}

.action-circle::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    background: #000;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.action-circle:hover::after {
    opacity: 1;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal {
    background: var(--bg-color);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-title-area h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.modal-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.close-modal {
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.5;
}

.close-modal:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 2px;
}

footer strong {
    color: var(--accent-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .input-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .email-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .time-info {
        text-align: left;
    }
    
    .sidebar-actions {
        display: none;
    }
}
