/*
Theme Name: LoveLink
Theme URI: https://example.com/lovelink
Author: User
Description: A dating theme built from custom HTML/CSS/JS
Version: 1.0
*/
/* --- CSS Variables and Global Styles --- */
:root {
    --primary-color: #E94057;
    --primary-hover-color: #d8334a;
    --secondary-color: #FFF0F5;
    --text-color: #333;
    --light-text-color: #666;
    --border-color: #ddd;
    --white-color: #fff;
    --green-color: #28a745;
    --font-family: 'Poppins', sans-serif;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --transition-speed: 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: #fdfcff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--white-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo {
    height: 40px;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-text-color);
    font-weight: 500;
    transition: color var(--transition-speed);
}

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

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.edit-profile-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: background-color var(--transition-speed);
}
.edit-profile-btn:hover {
    background-color: var(--primary-hover-color);
}

.post-job-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: background-color var(--transition-speed);
}

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

.mobile-menu-btn, .mobile-filter-btn, .mobile-filter-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* --- Hero Section --- */
.hero {
    background-image: linear-gradient(rgba(233, 64, 87, 0.7), rgba(233, 64, 87, 0.7)), url('assets/images/hero-background.png');
    background-size: cover;
    background-position: center;
    color: var(--white-color);
    text-align: center;
    padding: 80px 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
}

.search-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    flex-grow: 1;
}
.search-group label {
    font-weight: 500;
}
.search-group select, .search-group input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-size: 1rem;
    width: 100%;
}

.search-input {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.search-input i {
    color: var(--light-text-color);
    margin: 0 10px;
}

.search-input input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    padding: 10px;
}

#searchBtn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color var(--transition-speed);
}

#searchBtn:hover {
    background-color: var(--primary-hover-color);
}

/* --- Main Content Layout --- */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* --- Filters --- */
.filters {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: fit-content;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.filter-group label {
    display: inline-block;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-group input[type="text"] {
     width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.interest-tags label {
    background: var(--secondary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 0;
}
.interest-tags input {
    display: none;
}
.interest-tags input:checked + span {
    background: var(--primary-color);
    color: var(--white-color);
}

.filter-group select, .filter-group input[type="range"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.salary-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--light-text-color);
    margin-top: 5px;
}
#ageValue {
    font-weight: bold;
    color: var(--text-color);
}

#applyFiltersBtn, #clearFiltersBtn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color var(--transition-speed);
}
#applyFiltersBtn {
    background-color: var(--primary-color);
    color: var(--white-color);
}
#clearFiltersBtn {
    background-color: var(--secondary-color);
    color: var(--text-color);
    margin-top: 10px;
}

/* --- Profile Listings & Grids --- */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.listings-header h2 {
    font-size: 1.4rem;
}
.sort-by select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

#profile-list-container { /* DEPRECATED in favor of .profile-grid */ }
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.profile-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    margin: 0;
    opacity: 0.9;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.profile-card-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.profile-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: var(--white-color);
}
.profile-card-info h3 {
    font-size: 1.2rem;
    margin: 0 0 5px 0;
}
.profile-card-info p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--light-text-color);
    font-size: 1.1rem;
}

/* --- Pagination --- */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background-color: var(--white-color);
    cursor: pointer;
    border-radius: 4px;
}
.pagination button.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.pagination button:hover:not(.active) {
    background-color: var(--secondary-color);
}

/* --- Page Styles --- */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.page-header h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}
.page-header p {
    color: var(--light-text-color);
    font-size: 1.1rem;
}

/* --- Messages Page Layout --- */
.messages-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    height: 70vh;
    background: var(--white-color);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.conversations-list {
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-speed);
}
.conversation-item:hover {
    background-color: var(--secondary-color);
}
.conversation-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.convo-details h4 {
    margin: 0 0 4px 0;
    font-weight: 600;
}
.convo-details p {
    font-size: 0.9rem;
    color: var(--light-text-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-window {
    display: flex;
    flex-direction: column;
}
.chat-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}
.chat-header img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-header h4 {
    margin: 0;
    font-size: 1.2rem;
}
.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.chat-placeholder {
    margin: auto;
    color: var(--light-text-color);
}
.message-bubble {
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 70%;
    line-height: 1.5;
}
.message-bubble.received {
    background-color: #f1f0f0;
    align-self: flex-start;
}
.message-bubble.sent {
    background-color: var(--primary-color);
    color: var(--white-color);
    align-self: flex-end;
}
.chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--border-color);
}
.chat-input-area input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 1rem;
    margin-right: 10px;
}
.chat-input-area button {
    background: var(--primary-color);
    color: var(--white-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
}
.chat-input-area input:disabled, .chat-input-area button:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--white-color);
    margin: auto;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 700px;
    position: relative;
    animation: slide-down 0.4s ease-out;
}

@keyframes slide-down {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Modal Body (Profile Details) */
#modal-body { display: grid; grid-template-columns: 250px 1fr; gap: 30px; }
#modal-body .profile-gallery { display: flex; flex-direction: column; gap: 10px; }
#modal-body .profile-main-img { width: 100%; aspect-ratio: 1/1.2; object-fit: cover; border-radius: var(--border-radius); }
#modal-body .profile-thumbnails { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
#modal-body .thumbnail-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: 0.7; transition: opacity var(--transition-speed); }
#modal-body .thumbnail-img:hover { opacity: 1; }

#modal-body .profile-header { display: flex; gap: 20px; margin-bottom: 10px; align-items: flex-start; }
#modal-body .profile-name-loc h3 { font-size: 1.8rem; margin-bottom: 5px; }
#modal-body .profile-name-loc p { color: var(--light-text-color); margin-bottom: 15px; }
#modal-body .section-title { font-weight: 600; margin-top: 20px; margin-bottom: 10px; font-size: 1.1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 5px;}
#modal-body p.bio { line-height: 1.6; }
#modal-body .interest-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.interest-pills .pill { background: var(--secondary-color); padding: 5px 12px; border-radius: 20px; font-size: 0.9rem; }
#modal-body .action-btn {
    display: inline-block;
    margin-top: 15px;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

#modal-body .action-btn:disabled {
    background-color: var(--green-color);
    cursor: not-allowed;
}

/* Edit Profile Form */
#editProfileForm { display: flex; flex-direction: column; gap: 15px; }
#editProfileForm input, #editProfileForm select, #editProfileForm textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
}
#editProfileForm button {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 14px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}
.form-section { margin-top: 15px; }
.form-section h4 { margin-bottom: 5px; }
.form-section p { font-size: 0.9rem; color: var(--light-text-color); margin-bottom: 10px;}
.photo-upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.photo-upload-slot {
    aspect-ratio: 1 / 1;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--light-text-color);
}
.photo-upload-slot:hover { background-color: var(--secondary-color); }

/* Post Job Form */
#postJobForm { display: flex; flex-direction: column; gap: 15px; }
#postJobForm input, #postJobForm select, #postJobForm textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}
#postJobForm button {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
#overlay.show {
    display: block;
}

/* --- Footer --- */
footer {
    background-color: #3f3638;
    color: var(--white-color);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* --- Responsive Design --- */
/* Tablet adjustments */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    /* Profile cards on tablet */
    .profile-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    .profile-card img {
        height: 200px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .nav-links, .edit-profile-btn {
        display: none;
    }
    .header-profile {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .search-bar {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }
    .search-group {
        width: 100%;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    #modal-body {
        grid-template-columns: 1fr;
    }
    .messages-layout {
        grid-template-columns: 1fr;
        height: 80vh;
    }
    .conversations-list {
        display: none;
    }

    /* Profile cards on mobile */
    .profile-grid {
        grid-template-columns: 1fr; /* single column */
    }
    .profile-card img {
        height: 160px;   /* shorter image */
        object-fit: cover;
    }
}


/* Profile card styling */
.profile-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  text-align: center;
  padding-bottom: 12px;
  transition: transform 0.2s;
}
.profile-card:hover {
  transform: translateY(-4px);
}

.profile-card img {
  width: 100%;
  height: 220px;       /* control image height */
  object-fit: cover;   /* crop image nicely */
  border-bottom: 1px solid #eee;
}

.profile-card h3 {
  margin: 10px 0 4px;
  font-size: 1.2rem;
}

.profile-card p {
  margin: 3px 0;
  font-size: 0.9rem;
  color: #555;
}

/* ===========================
   Lovelink Add Profile Form
   =========================== */
.lovelink-form {
  max-width: 500px;
  margin: 40px auto;
  padding: 25px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lovelink-form input,
.lovelink-form select,
.lovelink-form textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lovelink-form input:focus,
.lovelink-form select:focus,
.lovelink-form textarea:focus {
  border-color: #e94057;
  box-shadow: 0 0 0 2px rgba(233, 64, 87, 0.15);
  outline: none;
}

.lovelink-form button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, #e94057, #f27121);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lovelink-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(233, 64, 87, 0.3);
}

#addProfileMsg {
  margin-top: 15px;
  font-weight: bold;
  text-align: center;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* login/register buttons*/

.login-btn, .register-btn {
  background: #e94057;
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.login-btn:hover, .register-btn:hover {
  opacity: 0.9;
}

