* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --text-tertiary: #636366;
    --accent-blue: #0a84ff;
    --separator: rgba(84, 84, 88, 0.65);
    --card-bg: #1c1c1e;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.47;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.app {
    max-width: 100%;
    min-height: 100vh;
    padding-bottom: 100px;
}

/* Header */
.header {
    background: var(--bg-secondary);
    padding: 0;
    position: relative;
    z-index: 100;
    border-bottom: 0.33px solid var(--separator);
}

.header-content {
    padding: 12px 16px;
}

.city-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.city-icon {
    font-size: 16px;
}

/* Categories */
.categories {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    background: var(--bg-secondary);
    border-bottom: 0.33px solid var(--separator);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories::-webkit-scrollbar {
    display: none;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
}

.category-icon {
    font-size: 20px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.2s ease;
}

.category-btn.active {
    background: var(--bg-primary);
    color: var(--accent-blue);
}

.category-btn.active .category-icon {
    filter: grayscale(0%);
    opacity: 1;
}

.category-btn:active {
    transform: scale(0.95);
}

/* Topics Container */
.topics-container {
    padding: 8px 0;
}

.topic-card {
    background: var(--card-bg);
    padding: 12px 16px;
    margin-bottom: 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 0.33px solid var(--separator);
    position: relative;
}

.topic-card:active {
    background-color: var(--bg-primary);
}

.topic-card::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L1 11' stroke='%23C7C7CC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.topic-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 4px;
}

.topic-time {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

.topic-title {
    font-size: 17px;
    font-weight: 400;
    margin-bottom: 4px;
    color: var(--text-primary);
    line-height: 1.29;
    padding-right: 24px;
}

.topic-price {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.topic-content {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.33;
    padding-right: 24px;
}

.topic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.topic-footer-left {
    display: flex;
    gap: 12px;
}

.topic-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topic-author {
    color: var(--text-secondary);
    font-weight: 500;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 24px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
    transition: all 0.2s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:active {
    transform: scale(0.92);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: flex-end;
}

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

.modal-content {
    background: var(--bg-primary);
    width: 100%;
    max-height: 90vh;
    border-radius: 14px 14px 0 0;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.36, 0.66, 0.04, 1);
    -webkit-overflow-scrolling: touch;
}

@keyframes slideUp {
    from { 
        transform: translateY(100%);
    }
    to { 
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 0.33px solid var(--separator);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    flex: 1;
    color: var(--text-primary);
}

.close-btn, .back-btn {
    background: none;
    border: none;
    font-size: 17px;
    cursor: pointer;
    color: var(--accent-blue);
    padding: 0;
    font-weight: 400;
}

.close-btn:active, .back-btn:active {
    opacity: 0.4;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px;
}

select, input, textarea {
    width: 100%;
    padding: 11px 16px;
    border: none;
    background: var(--bg-secondary);
    font-size: 17px;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    border-bottom: 0.33px solid var(--separator);
}

select:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

input {
    border-radius: 0;
}

textarea {
    min-height: 120px;
    resize: vertical;
    border-bottom: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    margin-bottom: 16px;
}

select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238E8E93' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.submit-btn {
    padding: 13px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.submit-btn:active {
    opacity: 0.6;
}

/* Topic Detail */
#topicView {
    margin-bottom: 0;
}

.topic-detail {
    background: var(--bg-secondary);
    padding: 16px;
    border-bottom: 0.33px solid var(--separator);
}

.topic-detail .topic-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.27;
    letter-spacing: -0.26px;
    padding-right: 0;
}

.topic-detail .topic-content {
    font-size: 17px;
    line-height: 1.47;
    color: var(--text-primary);
    display: block;
    -webkit-line-clamp: unset;
    white-space: pre-wrap;
    padding-right: 0;
    margin-bottom: 12px;
}

.topic-detail .topic-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 0.33px solid var(--separator);
}

/* Comments */
.comments-section {
    background: var(--bg-primary);
    padding: 16px;
}

.comments-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.24px;
}

.comment {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--accent-blue);
}

.comment-text {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.33;
}

.comment-time {
    font-size: 13px;
    color: var(--text-secondary);
}

#commentForm {
    margin-top: 12px;
    padding: 0;
}

#commentForm textarea {
    border-radius: 10px;
    border: 0.33px solid var(--separator);
    min-height: 80px;
}

/* Loader */
.loader {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loader-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--separator);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.empty-state-subtext {
    font-size: 15px;
}

/* Channel link */
.channel-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 15px;
    margin-top: 8px;
}

.channel-link:active {
    opacity: 0.4;
}

/* Safe area */
@supports (padding: max(0px)) {
    .app {
        padding-bottom: max(100px, env(safe-area-inset-bottom));
    }
    
    .fab {
        bottom: max(24px, calc(env(safe-area-inset-bottom) + 8px));
    }
}

/* Selection */
::selection {
    background: rgba(0, 122, 255, 0.2);
}

/* Mode Selection */
.mode-selection {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--bg-primary);
}

.mode-header {
    padding: 20px 0 40px 0;
}

.mode-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-top: 16px;
}

.mode-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mode-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mode-card:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mode-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.mode-card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.mode-card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.back-to-menu {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.back-to-menu:active {
    opacity: 0.4;
}

.header-top {
    display: flex;
    align-items: center;
}

/* Marketplace */
.marketplace-container {
    padding: 8px 0;
}

.ad-card {
    background: var(--bg-secondary);
    padding: 12px 16px;
    margin-bottom: 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 0.33px solid var(--separator);
    position: relative;
    display: flex;
    gap: 12px;
}

.ad-card:active {
    background-color: var(--bg-primary);
}

.ad-image-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: var(--bg-primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.ad-content {
    flex: 1;
    min-width: 0;
}

.ad-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ad-title {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ad-description {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.33;
}

.ad-footer {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.ad-card::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L1 11' stroke='%23C7C7CC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Ad Detail */
.ad-detail {
    background: var(--bg-secondary);
    padding: 16px;
    border-bottom: 0.33px solid var(--separator);
}

.ad-detail-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    margin-bottom: 16px;
}

.ad-detail .ad-price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ad-detail .ad-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    white-space: normal;
}

.ad-detail .ad-description {
    font-size: 17px;
    line-height: 1.47;
    color: var(--text-primary);
    display: block;
    -webkit-line-clamp: unset;
    white-space: pre-wrap;
    margin-bottom: 16px;
}

.ad-contact {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
}

.ad-contact-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.ad-contact-phone {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent-blue);
}

/* Moderation notice */
.moderation-notice {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
}

/* Mode Selection */
.mode-selection {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    background: #000000;
}

.mode-header {
    text-align: center;
    padding: 40px 0 30px;
}

.logo {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -2px;
    margin-bottom: 8px;
}

.logo-subtitle {
    font-size: 17px;
    color: #8e8e93;
    font-weight: 400;
}

.mode-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.mode-card {
    background: #1c1c1e;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 0.33px solid rgba(84, 84, 88, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mode-card:active {
    transform: scale(0.98);
    background: #2c2c2e;
}

.mode-icon {
    font-size: 64px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.mode-title {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.mode-description {
    font-size: 13px;
    color: #8e8e93;
    line-height: 1.4;
}

/* Header with back button */
.header-content {
    padding: 16px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
}

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

.back-to-mode {
    display: none; /* Используем нативную кнопку Telegram */
}

.header-logo {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1.5px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.profile-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--bg-primary);
}

.profile-btn:active {
    opacity: 0.6;
}

/* Marketplace Grid */
.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
}

.marketplace-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.marketplace-card:active {
    transform: scale(0.98);
}

.ad-image-placeholder {
    width: 100%;
    height: 180px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
}

.ad-favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(28, 28, 30, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.ad-content {
    padding: 12px;
}

.ad-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.ad-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 36px;
}

.ad-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.ad-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Banner */
.banner-container {
    padding: 12px 8px;
    margin-bottom: 8px;
}

.banner {
    width: 100%;
    height: 140px;
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.banner:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 0 30px rgba(255, 255, 255, 0.15),
        0 6px 30px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner:active {
    transform: scale(0.98);
    box-shadow: 
        0 0 25px rgba(255, 255, 255, 0.12),
        0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Form adjustments for marketplace */
#adForm input[type="number"],
#adForm input[type="tel"] {
    border-bottom: 0.33px solid var(--separator);
}

#adForm input[type="tel"] {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#adForm textarea {
    border-radius: 0;
    border-bottom: 0.33px solid var(--separator);
}

/* Profile Modal */
.profile-content {
    padding: 20px;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 16px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-username {
    font-size: 15px;
    color: var(--accent-blue);
    margin-bottom: 24px;
}

.profile-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.profile-section h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
}

.profile-section input {
    width: 100%;
    padding: 12px;
    border: 0.33px solid var(--separator);
    border-radius: 10px;
    font-size: 17px;
    margin-bottom: 12px;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Ad Detail */
.ad-detail {
    padding: 20px;
}

.ad-detail-image {
    width: 100%;
    height: 250px;
    background: var(--bg-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    margin-bottom: 20px;
}

.ad-detail-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.ad-detail-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.3;
}

.ad-detail-description {
    font-size: 17px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

.ad-detail-seller {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.seller-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.seller-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.seller-info {
    flex: 1;
}

.seller-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.seller-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.contact-buttons {
    display: flex;
    gap: 8px;
}

.contact-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.contact-btn:active {
    opacity: 0.6;
}

.contact-btn-primary {
    background: var(--accent-blue);
    color: white;
}

.contact-btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Clickable marketplace cards */
.marketplace-card {
    cursor: pointer;
}

.marketplace-card::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L1 11' stroke='%23C7C7CC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 0.33px solid var(--separator);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filters-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 0.33px solid var(--separator);
    border-radius: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:active {
    transform: scale(0.95);
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.filter-btn svg {
    width: 12px;
    height: 8px;
}

.filter-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Ad detail distance */
.ad-detail-distance {
    font-size: 17px;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Sort Menu Modal */
.modal-bottom .modal-content {
    border-radius: 20px 20px 0 0;
}

.menu-options {
    padding: 0;
}

.menu-option {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 17px;
    cursor: pointer;
    border-bottom: 0.33px solid var(--separator);
    transition: background 0.15s;
}

.menu-option:last-child {
    border-bottom: none;
}

.menu-option:active {
    background: var(--bg-primary);
}

.menu-option .check {
    color: var(--accent-blue);
    font-size: 20px;
    font-weight: 700;
    min-width: 20px;
}

/* Fullscreen Modal */
.modal-fullscreen {
    align-items: stretch;
}

.modal-fullscreen.active {
    display: block;
}

.modal-fullscreen-content {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    padding: 0;
}

.modal-header-transparent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom: none;
    z-index: 10;
    padding: 16px;
}

.back-btn-white {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.icon-btn-white {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    margin-left: 8px;
}

.back-btn-white:active,
.icon-btn-white:active {
    opacity: 0.7;
}

.ad-detail-time {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.seller-location {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    margin-top: 16px;
}

.location-icon {
    font-size: 20px;
}

.location-text {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Profile Avatar Upload */
.profile-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.profile-avatar {
    position: relative;
    overflow: hidden;
}

.change-avatar-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-blue);
    cursor: pointer;
    transition: opacity 0.2s;
}

.change-avatar-btn:active {
    opacity: 0.6;
}

/* Category icons */
.category-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.category-btn.active .category-icon-img {
    filter: none;
}

/* Profile icon */
.profile-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
