/* ===== General Styles ===== */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    color: #4a4a4a;
}

* {
    box-sizing: border-box;
    max-width: 100%;
}

html, body, div, section, header, footer, nav, main, article, aside, 
figure, figcaption, img, video, iframe, form, input, textarea, button, a {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== Navigation Bar ===== */
nav {
    background-color: #6a8db3;
    padding: 1.2rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* ===== Chat Page Specific Styles ===== */
body.chat-page {
    background-image: url('https://images.unsplash.com/photo-1518655048521-f130df041f66?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.chat-page nav {
    display: none;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.back-arrow {
    font-size: 1.5rem;
    color: #333;
    margin-right: 15px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.back-arrow:hover {
    transform: translateX(-3px);
}

body.chat-page .chatuser {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

body.chat-page #chat-messages {
    padding: 15px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
}

body.chat-page #chat-form {
    display: flex;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    position: fixed;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.chat-page #chat-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
    outline: none;
    background-color: white;
}

body.chat-page .file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    color: #555;
    cursor: pointer;
    font-size: 1.2rem;
}

body.chat-page #chat-form button {
    background-color: #6a8db3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.chat-page #chat-form button:hover {
    background-color: #5a7da3;
}

/* ===== Message Styling ===== */
.message {
    margin: 15px;
    padding: 15px;
    border-radius: 12px;
    max-width: 70%;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    background-color: rgba(255, 255, 255, 0.9);
}

.user-message {
    margin-left: auto;
    background-color: rgba(106, 141, 179, 0.15);
}

.other-message {
    margin-right: auto;
    background-color: rgba(255, 255, 255, 0.9);
}

.message-content {
    word-wrap: break-word;
    font-size: 1.05rem;
    line-height: 1.5;
}

.timestamp {
    font-size: 0.85em;
    color: #888;
    margin-top: 8px;
    text-align: right;
}

.chat-image {
    max-width: 250px;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== Hero Section ===== */
.hero {
    background: url('https://via.placeholder.com/1500x800') no-repeat center center/cover;
    background-attachment: fixed;
    height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
}

.hero-content {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 3rem;
    border-radius: 12px;
    max-width: 90%;
    margin: 0 auto;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero {
    background-color: rgba(255, 255, 255, 0.25);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
    font-size: 1.1rem;
}

.btn-hero:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

/* ===== Forms ===== */
.auth-container, .account-container, 
.chat-container, .mingle-container, 
.messages-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.auth-container h2, .account-container h2, 
.chat-container h2, .mingle-container h2, 
.messages-container h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #6a8db3;
    font-weight: 600;
}

input[type="text"], input[type="email"], 
input[type="password"], textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #f9f9f9;
    transition: border 0.3s ease;
}

input[type="text"]:focus, input[type="email"]:focus, 
input[type="password"]:focus, textarea:focus {
    border-color: #6a8db3;
    outline: none;
}

button, .btn-primary {
    background-color: #6a8db3;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-weight: 500;
}

button:hover, .btn-primary:hover {
    background-color: #5a7da3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 141, 179, 0.3);
}

.file-upload-label {
    background-color: ;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: #4a4a4a;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-weight: 500;
}

.file-upload-label:hover {
    background-color: ;
}

/* ===== Mingle Page ===== */
#user-profiles {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    box-sizing: border-box;
    padding: 1rem;
}

#user-profiles .profile-pic {
    width: 700px;
    height: 400px;
    margin: 0 auto 1rem;
    border-radius: 6px;
}

.profile {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    width: 300px;
    max-width: 100%;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    border: 1px solid #e8e8e8;
}

.profile:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.profile h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    color: #6a8db3;
    font-weight: 600;
}

.profile p {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 1.8rem;
    line-height: 1.5;
}

.profile button {
    background-color: #6a8db3;
    color: white;
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.profile button:hover {
    background-color: #5a7da3;
    transform: translateY(-2px);
}

/* ===== Messages Page ===== */
#message-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
    padding: 1rem;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    background-color: white;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.chat-item:hover {
    background-color: #f5f9fc;
    transform: translateX(5px);
}

.profile-pic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    border: 2px solid #e8f0f7;
}

.chat-info {
    flex: 1;
}

.chat-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    color: #4a4a4a;
}

.chat-info p {
    margin: 0;
    color: #888;
    font-size: 0.95rem;
}

.chat-info button {
    background-color: #6a8db3;
    color: white;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.chat-info button:hover {
    background-color: #5a7da3;
}

/* ===== Footer ===== */
footer {
    background-color: #5a7da3;
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.footer-content p {
    margin: 1rem 0;
    font-size: 1.05rem;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: white;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #e1f0fa;
    transform: translateY(-3px);
}

/* ===== Profile View Page ===== */
.profile-view-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.profile-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.profile-pic-large {
    width: 180px;
    height: 180px;
    border-radius:50%,;
    object-fit: cover;
    border: 4px solid #6a8db3;
    margin: 0 auto 1.5rem;
}

.profile-details {
    text-align: left;
    margin: 1.5rem 0;
    padding: 0 1rem;
}

.profile-details p {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-secondary {
    background-color: #ff6b6b;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #ff6b6b;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 1.4rem;
        width: 40px;
        height: 40px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-content {
        padding: 2rem;
    }

    .auth-container, .account-container, 
    .chat-container, .mingle-container, 
    .messages-container {
        padding: 1.5rem;
        margin: 2rem auto;
    }

    .profile {
        width: 100%;
    }

    #chat-form {
        flex-direction: row;
        gap: 0.8rem;
        padding: 1rem;
    }

    #chat-form button {
        padding: 1rem;
    }
}

a {
    text-decoration: none;
    color: #6a8db3;
    transition: color 0.3s ease;
}

a:hover {
    color: #5a7da3;
}

.profile-pic-small {
    width:24px;
    height: 50%;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
}