* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #333;
}

/* =========================
   Homepage
========================= */
header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.btn-group {
    margin-top: 20px;
}

.btn {
    padding: 12px 25px;
    margin: 10px;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.btn-outline {
    background: transparent;
    border: 2px solid #4f46e5;
    color: #4f46e5;
}

/* =========================
   Login and Sign up forms
========================= */
.form-container {
    width: 100%;
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
}

button {
    width: 100%;
    padding: 12px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #4338ca;
}

.switch {
    text-align: center;
    margin-top: 15px;
}

#errorMsg {
    color: red;
    text-align: center;
    margin-top: 10px;
}

/* =========================
   Modal Overlay - Shania Newman
========================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    background: transparent;
    /*backdrop-filter: blur(4px);*/
}

.modal.active {
    display: flex;
}

/* Modal Box */
.modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(108, 99, 255, 0.3);
    animation: pop 0.3s ease;
}

/* Close Button */
.close {
    color: #ccc;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #4f46e5;
}

/* Message Text */
#modalMessage {
    font-size: 18px;
    color: #444;
    margin: 20px 0;
}

/* OK Button inside modal */
.modal-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.modal-btn:hover {
    background: #4338ca;
}

@keyframes pop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* =========================
   Dashboard
========================= */

.navbar {
    background: #4f46e5;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h2 {
    font-size: 1.5rem;
}

.nav-links a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.nav-links a:hover {
    text-decoration: underline;
}

.dashboard-container {
    padding: 40px;
    text-align: center;
}

.dashboard-container h1 {
    margin-bottom: 10px;
}

.dashboard-container p {
    margin-bottom: 30px;
    color: #555;
}

.card-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 10px;
}

.card p {
    font-size: 14px;
    margin-bottom: 15px;
    color: #666;
}

.card button {
    width: auto;
    padding: 8px 15px;
}

/* =========================
   Messages Section - Shania Newman
========================= */
.messages-container {
    display: flex;
    height: calc(100vh - 160px);
    overflow: hidden;
}

.conversations-sidebar {
    width: 300px;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    flex-shrink: 0;
}

.conversations-sidebar h2 {
    padding: 15px;
    margin: 0;
    border-bottom: 1px solid #eee;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.conversation-item:hover {
    background: #f5f5f5;
}

.conversation-item.active {
    background: #e3f2fd;
}

.conversation-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.conversation-item h3 {
    margin: 0;
    font-size: 16px;
}

.conversation-item p {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #666;
}

.time {
    margin-left: auto;
    font-size: 12px;
    color: #999;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    overflow: hidden;
    min-width: 0;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: white;
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.chat-header h3 {
    margin: 0;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.message {
    max-width: 60%;
    padding: 10px;
    border-radius: 10px;
}

.message.received {
    background: #f0f0f0;
    align-self: flex-start;
}

.message.sent {
    background: #5b4cdb;
    color: white;
    align-self: flex-end;
}

.message-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ddd;
    background: white;
    flex-shrink: 0;
    align-items: center;
}

.message-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    min-width: 0;
}

.message-input button {
    margin-left: 10px;
    padding: 10px 20px;
    background: #5b4cdb;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    flex-shrink: 0;
    width: auto;
}

.message-input button:hover {
    background: #4a3bb5;
}

.search-box {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 20px;
    box-sizing: border-box;
}

.search-box:focus {
    outline: none;
    border-color: #5b4cdb;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: #5b4cdb;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
}

.button:hover {
    background: #4a3bb5;
}