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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header & Navigation */
header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    padding: 5px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    color: #002f34;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-links a {
    color: #002f34;
    text-decoration: none;
    transition: background-color 0.3s;
    background-color: #e8f5e9;
    padding: 8px 12px;
    border-radius: 6px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.realestate-blink {
    animation: blink 1s step-start infinite;
}

.nav-links a:hover {
    background-color: #c8e6c9;
}

/* Анімація блимання для повідомлень з непрочитаними */
@keyframes blink-animation {
    0%, 100% {
        background-color: #e8f5e9;
    }
    50% {
        background-color: #a5d6a7;
    }
}

.messages-link.has-unread {
    animation: blink-animation 1.5s infinite;
}


/* Buttons */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-size: 12px;
}

.btn-primary {
    background: #23e5db;
    color: #002f34;
    font-weight: bold;
}

.btn-primary:hover {
    background: #00d4c7;
}

.btn-google {
    background: white;
    color: #444;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-google:hover {
    background: #f5f5f5;
    color: #222;
}
.auth-divider {
    text-align: center;
    margin: 16px 0;
    color: #aaa;
    font-size: 14px;
}

.btn-danger {
    background: #ff5555;
    color: white;
}

.btn-danger:hover {
    background: #ff3333;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-secondary {
    background: #888;
    color: white;
}

.btn-secondary:hover {
    background: #666;
}

.btn-admin {
    background: #e67e22;
    color: white;
}

.btn-admin:hover {
    background: #ca6f1e;
}

.message-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    display: block;
    margin-bottom: 2px;
}

.admin-section {
    margin-bottom: 40px;
}

.admin-section h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* Main Content */
main {
    padding: 30px 20px;
    min-height: calc(100vh - 200px);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Search Section */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-form input:focus {
    outline: none;
    border-color: #23e5db;
}

.search-city-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-city-filter {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    font-size: 15px;
    cursor: pointer;
    padding: 8px 4px;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 20px;
}

.search-city-wrapper::after {
    content: '▾';
    position: absolute;
    right: 4px;
    pointer-events: none;
    color: #555;
    font-size: 14px;
}

/* Categories */
.categories-section {
    margin-bottom: 30px;
}

.categories-section h2 {
    margin-bottom: 20px;
    color: #002f34;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.category-card {
    background: white;
    padding: 25px 20px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #002f34;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    filter: brightness(0.95);
}

.category-icon {
    font-size: 48px;
    line-height: 1;
}
.category-name {
    font-size: 16px;
    font-weight: bold;
    color: #002f34;
}

.category-count {
    font-size: 14px;
}

.category-count-bracket {
    color: #002f34;
}

.category-count-number {
    color: #5c6bc0;
    font-weight: bold;
}

.category-description {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    max-width: 100%;
}

.category-card:hover .category-name {
    color: #28a745;
}

/* Filters */
.filters-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: #f5f5f5;
}

.category-header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.category-page-header {
    transition: background-color 0.3s;
    position: sticky;
    top: 52px;
    z-index: 90;
    margin-bottom: 20px;
    border-radius: 0;
}

.category-header h2 {
    margin: 0;
    color: #002f34;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon-inline {
    font-size: 36px;
    line-height: 1;
}

.btn-back {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #5a6268;
}

.filters-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filters-form select {
    padding: 8px 4px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    color: #333;
    padding-right: 20px;
    position: relative;
}

.filters-form .select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.filters-form .select-wrapper::after {
    content: '▾';
    position: absolute;
    right: 4px;
    pointer-events: none;
    color: #555;
    font-size: 14px;
}

/* Listings */
.listings-section h2 {
    margin-bottom: 20px;
    color: #002f34;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.listing-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}
.listing-card--featured {
    border: 2px solid #f4a500;
}
.listing-badge-top {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e53935;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.5px;
}
.listing-badge-star {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 18px;
    z-index: 2;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.listing-card a {
    text-decoration: none;
    color: inherit;
}

.listing-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.listing-info {
    padding: 15px;
}

.listing-info h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #002f34;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: #002f34;
    margin-bottom: 8px;
}

.location, .date, .views {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Listing Detail */
.listing-detail {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.image-gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.no-image-large {
    width: 100%;
    height: 400px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 8px;
    margin-bottom: 30px;
}

.listing-content h1 {
    margin-bottom: 15px;
    color: #002f34;
}

.price-large {
    font-size: 32px;
    font-weight: bold;
    color: #002f34;
    margin-bottom: 15px;
}

.description {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.description h2 {
    margin-bottom: 15px;
    font-size: 20px;
}

.seller-info {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.listing-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Forms */
.auth-container, .form-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-container h1, .form-container h1 {
    margin-bottom: 30px;
    color: #002f34;
    text-align: center;
}

.auth-form, .listing-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: #002f34;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #23e5db;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #002f34;
    font-weight: bold;
}

/* Profile */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-container h1 {
    margin-bottom: 30px;
    color: #002f34;
}

.profile-header {
    display: flex;
    gap: 20px;
    align-items: center;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    background: #e8f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid #23e5db;
}

.profile-avatar-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-avatar-actions .avatar-hint {
    font-size: 11px;
    color: #888;
    text-align: center;
    line-height: 1.3;
}

.avatar-upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.avatar-input {
    display: none;
}

.avatar-upload-btn {
    padding: 8px 16px;
    background: #23e5db;
    color: #002f34;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
    white-space: nowrap;
}

.avatar-upload-btn:hover {
    background: #1bc7bc;
}

.avatar-upload-btn:active {
    transform: scale(0.98);
}

.profile-info {
    flex: 1;
}

.profile-message-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.avatar-letter {
    font-size: 48px;
    font-weight: bold;
    color: white;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-edit-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.current-avatar {
    flex-shrink: 0;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #23e5db;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #23e5db, #002f34);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: white;
    border: 3px solid #23e5db;
}

.avatar-preview-new {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #28a745;
}

.avatar-upload {
    flex: 1;
}

.avatar-upload .form-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.profile-info h2 {
    margin: 0 0 10px 0;
    color: #002f34;
}

.profile-email {
    color: #666;
    margin: 5px 0;
}

.profile-member-since {
    color: #888;
    font-size: 14px;
    margin: 5px 0;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #23e5db;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.profile-details {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.profile-details h2 {
    margin-bottom: 20px;
    color: #002f34;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: bold;
    color: #002f34;
}

.detail-value {
    color: #666;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Promote section */
.promote-section {
    margin-top: 30px;
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.promote-section h2 {
    margin-bottom: 16px;
    color: #002f34;
}
.promote-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.promote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    gap: 12px;
    flex-wrap: wrap;
}
.promote-item--featured {
    border-color: #f4a500;
    background: #fffdf0;
}
.promote-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.promote-item-title {
    font-weight: bold;
    color: #002f34;
    text-decoration: none;
    font-size: 15px;
}
.promote-item-title:hover { text-decoration: underline; }
.promote-item-price {
    font-size: 13px;
    color: #555;
}
.promote-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}
.badge-boost { background: #e3f2fd; color: #1565c0; }
.badge-featured { background: #fff8e1; color: #f57f17; }
.promote-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.promote-select {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}
.btn-promote {
    background: #23e5db;
    color: #002f34;
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-promote:hover { background: #1bc9c0; }
.btn-featured-active {
    background: #f4a500;
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-featured-active:hover { background: #e09500; }

.profile-actions .btn {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-container h1 {
    margin-bottom: 25px;
    color: #002f34;
}

.form-hint {
    display: block;
    color: #888;
    font-size: 13px;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
}

/* Animal listings section */
.animal-listings-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 3px solid #ffe5e5;
}

.animal-listings-section h2 {
    margin-bottom: 20px;
    color: #002f34;
    font-size: 24px;
}

.chat-user-link {
    color: #23e5db;
    text-decoration: none;
    transition: color 0.3s;
}

.chat-user-link:hover {
    color: #002f34;
    text-decoration: underline;
}

/* Seller profile in listing detail */
.seller-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin: 15px 0;
}

.seller-avatar-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #23e5db, #002f34);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-image-small {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-letter-small {
    font-size: 28px;
    font-weight: bold;
    color: white;
}

.seller-details {
    flex: 1;
}

.seller-name-link {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #23e5db;
    text-decoration: none;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.seller-name-link:hover {
    color: #002f34;
    text-decoration: underline;
}

.seller-city {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.seller-phone {
    margin: 10px 0 0 0;
    font-size: 16px;
    color: #002f34;
}

/* Profile */
.chat-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
}

.chat-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.chat-header h2 {
    margin-bottom: 5px;
    color: #002f34;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    max-width: 70%;
}

.message.sent {
    margin-left: auto;
}

.message.received {
    margin-right: auto;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    position: relative;
}

.message.sent .message-content {
    background: #23e5db;
    color: #002f34;
}

.message.received .message-content {
    background: #f0f0f0;
    color: #002f34;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
}

.message-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    display: block;
}

.image-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 8px;
    margin-top: 10px;
}

.image-preview img {
    max-height: 80px;
    max-width: 150px;
    border-radius: 4px;
}

.btn-attach {
    background: #f0f0f0;
    border: none;
    font-size: 20px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-attach:hover {
    background: #e0e0e0;
}

.btn-remove {
    background: #ff5555;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

/* Модальне вікно для фото */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: auto;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
}

.image-modal-content img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.image-modal-close:hover {
    color: #23e5db;
}

.image-modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.image-modal-prev,
.image-modal-next {
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    pointer-events: auto;
    transition: 0.3s;
    user-select: none;
}

.image-modal-prev:hover,
.image-modal-next:hover {
    color: #23e5db;
}

.chat-input {
    padding: 20px;
    border-top: 2px solid #f0f0f0;
}

.chat-input form {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Messages/Conversations */
.messages-section h1 {
    margin-bottom: 30px;
    color: #002f34;
}

.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.conversation-item {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.conversation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.conversation-info h3 {
    margin-bottom: 3px;
    color: #002f34;
    font-size: 14px;
}

.listing-title {
    font-size: 11px;
    color: #28a745;
    font-weight: bold;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.last-message {
    color: #666;
    font-size: 12px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

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

.user-id {
    color: #000;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
}

.messages-link {
    position: relative;
    display: inline-block;
}

.unread-badge {
    background: #ff5555;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    position: absolute;
    top: -8px;
    right: -15px;
    min-width: 18px;
    text-align: center;
    display: none;
}

.unread-badge.count {
    display: inline-block;
    position: static;
    padding: 4px 10px;
    font-size: 12px;
}

.conversation-item {
    position: relative;
}

/* Footer */
footer {
    background: #002f34;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

footer p {
    margin: 10px 0;
}

.support-link {
    color: #000;
    text-decoration: none;
    background-color: #e8f5e9;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.support-link:hover {
    background-color: #c8e6c9;
    color: #000;
}

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

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-form {
        flex-direction: column;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .listings-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }

    .message {
        max-width: 85%;
    }

    .auth-container, .form-container {
        padding: 20px;
    }
}

.edit-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.edit-image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.edit-image-item img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.edit-image-delete {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #e53935;
    cursor: pointer;
}
