body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f6f9;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 300px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #007bff;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.messages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.message {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.message:hover, .message.selected {
    background-color: #e9f5ff;
    transform: translateX(5px);
}

.message .info {
    display: flex;
    flex-direction: column;
}

.message .info .title strong {
    font-size: 14px;
    font-weight: 500;
}

.message .info .subject {
    font-size: 12px;
    color: #666;
}

.message time {
    font-size: 12px;
    color: #999;
}

.star {
    color: #ffc107;
}

.content {
    flex-grow: 1;
    padding: 20px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content h1 {
    font-size: 22px;
    font-weight: 700;
    color: #007bff;
}

.email-content header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.email-content section {
    padding: 20px 0;
    line-height: 1.8;
}

.email-content footer .attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 10px;
    background-color: #f4f6f9;
}

.file-preview img {
    width: 40px;
    height: 40px;
}

.new-message {
    align-self: flex-end;
    padding: 12px 25px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.new-message:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.back-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5%;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.back-button:hover {
    background-color: #5a6268;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .content {
        padding: 15px;
    }

    .email-content footer .attachment {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .search-bar {
        flex-direction: column;
        gap: 5px;
    }

    .new-message {
        width: 100%;
        text-align: center;
    }

    .back-button {
        width: 100%;
        text-align: center;
    }
}
