/* Базовые стили */
:root {
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --dark: #1e293b;
    --dark-light: #334155;
    --light: #ffffff;
    --gray-light: #f8fafc;
    --gray: #cbd5e1;
    --gray-dark: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.06);
    --transition: all 0.2s ease;
    
    /* Цвета для выделенных объявлений в стиле сайта */
    --promo-primary: #e0f2fe;
    --promo-primary-border: #7dd3fc;
    --promo-success: #dcfce7;
    --promo-success-border: #86efac;
    --promo-premium: #fef3c7;
    --promo-premium-border: #fcd34d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-light);
    color: var(--dark);
    line-height: 1.4;
    padding-bottom: 60px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

/* Суперкомпактный хедер */
.header-compact {
    background: var(--light);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.logo-text span {
    color: var(--primary);
}

/* Поиск в хедере */
.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1px solid var(--gray);
    border-radius: 8px;
    font-size: 14px;
    background: var(--gray-light);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-dark);
    cursor: pointer;
}

/* Кнопки хедера */
.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    border: none;
    color: var(--dark);
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.btn-icon-sm.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ИСТОРИИ В СТИЛЕ САЙТА */
.stories-section {
    margin: 16px 0;
    padding: 0 4px;
}

.stories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stories-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

.view-all-stories {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.stories-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.stories-container::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 70px;
    position: relative;
}

.story-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: visible;
    position: relative;
    margin-bottom: 6px;
    border: 2px solid var(--light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.story-avatar.new {
    border: 2px dashed var(--primary);
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-avatar.new::before {
    content: '+';
    position: absolute;
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

.story-avatar.new img {
    display: none;
}

.story-avatar.seen {
    opacity: 0.8;
    border-color: var(--gray);
}

.story-avatar.unseen {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.story-avatar:hover {
    transform: scale(1.05);
    border-color: var(--primary-light);
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.story-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.story-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--light);
    background: var(--success);
    z-index: 5;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.story-status.live {
    background: var(--danger);
}

.story-title {
    font-size: 12px;
    color: var(--dark);
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.story-time {
    font-size: 10px;
    color: var(--gray-dark);
    margin-top: 2px;
}

/* РЕКЛАМНЫЙ БЛОК В СТИЛЕ САЙТА */
.ad-banner {
    background: linear-gradient(135deg, var(--promo-primary), #f0f9ff);
    border: 1px solid var(--promo-primary-border);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.ad-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.ad-content {
    flex: 1;
}

.ad-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark);
}

.ad-text {
    font-size: 13px;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.ad-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.ad-btn:hover {
    background: var(--primary-dark);
}

.ad-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--gray-dark);
    cursor: pointer;
    font-size: 14px;
}

/* Мобильное нижнее меню */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--light);
    border-top: 1px solid var(--gray);
    z-index: 1000;
    display: none;
    padding: 8px 0;
}

.nav-items {
    display: flex;
    justify-content: space-around;
    list-style: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray-dark);
    font-size: 11px;
    padding: 6px;
    border-radius: 8px;
    transition: var(--transition);
    min-width: 56px;
    position: relative;
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.nav-item .badge {
    position: absolute;
    top: 0;
    right: 0;
}

/* Главная секция */
.hero-section {
    padding: 20px 0 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.hero-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
    border-bottom: none;
}

.hero-subtitle {
    font-size: 14px;
    color: var(--gray-dark);
    margin-bottom: 16px;
}

/* Быстрые фильтры */
.quick-filters-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 0;
    margin: 0 -12px;
    padding-left: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-top: none;
    border-bottom: none;
}

.quick-filters-scroll::-webkit-scrollbar {
    display: none;
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--light);
    border: 1px solid var(--gray);
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.filter-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-tag i {
    font-size: 12px;
}

/* Расширенные фильтры - выпадающие */
.filters-dropdown {
    margin: 16px 0;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--light);
    border-radius: 8px;
    border: 1px solid var(--gray);
    cursor: pointer;
}

.filters-title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-count {
    background: var(--primary);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.filters-content {
    display: none;
    margin-top: 8px;
    padding: 16px;
    background: var(--light);
    border-radius: 8px;
    border: 1px solid var(--gray);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-option:hover {
    background: var(--gray-light);
}

.filter-option.active {
    background: rgba(37, 99, 235, 0.1);
}

.filter-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.filter-option.active .filter-check {
    background: var(--primary);
    border-color: var(--primary);
}

.filter-option.active .filter-check::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.price-slider {
    width: 100%;
    margin: 12px 0;
}

.price-inputs {
    display: flex;
    gap: 10px;
}

.price-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray);
    border-radius: 8px;
    font-size: 14px;
}

/* Сортировка */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
    padding: 12px;
    background: var(--light);
    border-radius: 8px;
    border: 1px solid var(--gray);
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--gray);
    border-radius: 6px;
    font-size: 14px;
    background: var(--light);
    min-width: 150px;
}

.view-toggle {
    display: flex;
    gap: 6px;
}

.view-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    border: 1px solid var(--gray);
    color: var(--dark);
    cursor: pointer;
}

.view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* УЛЬТРАКОМПАКТНЫЕ КАРТОЧКИ С ВЫДЕЛЕНИЕМ В СТИЛЕ САЙТА */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.car-card-mini {
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--gray);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.car-card-mini.promo-primary {
    background: var(--promo-primary);
    border: 1px solid var(--promo-primary-border);
}

.car-card-mini.promo-success {
    background: var(--promo-success);
    border: 1px solid var(--promo-success-border);
}

.car-card-mini.promo-premium {
    background: var(--promo-premium);
    border: 1px solid var(--promo-premium-border);
}

.promo-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.promo-badge.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.promo-badge.success {
    background: linear-gradient(135deg, var(--success), #34d399);
}

.promo-badge.premium {
    background: linear-gradient(135deg, var(--warning), #fbbf24);
}

.car-card-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.car-image-mini {
    height: 110px;
    position: relative;
    overflow: hidden;
}

.car-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-badge-mini {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.badge-hot { background: var(--danger); }
.badge-new { background: var(--success); }
.badge-sale { background: var(--primary); }

.car-info-mini {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.car-title-mini {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    height: 32px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.car-details {
    font-size: 11px;
    color: var(--gray-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.car-features-mini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.feature-mini {
    font-size: 10px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 4px;
}

.feature-mini i {
    color: var(--primary);
    font-size: 9px;
}

.car-footer-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.car-price-mini {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.car-price-old {
    font-size: 10px;
    color: var(--gray-dark);
    text-decoration: line-through;
    display: block;
}

.car-actions-mini {
    display: flex;
    gap: 6px;
}

.action-btn-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    border: none;
    color: var(--dark);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.action-btn-mini:hover {
    background: var(--primary);
    color: white;
}

.action-btn-mini.active {
    background: var(--primary);
    color: white;
}

/* Кнопка "Показать еще" */
.load-more {
    width: 100%;
    padding: 12px;
    background: var(--light);
    border: 1px solid var(--gray);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.load-more:hover {
    background: var(--primary);
    color: white;
}

/* Популярные марки */
.brands-section {
    margin: 24px 0;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.brands-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.brands-scroll::-webkit-scrollbar {
    display: none;
}

.brand-item-mini {
    min-width: 90px;
    padding: 12px;
    background: var(--light);
    border-radius: 8px;
    border: 1px solid var(--gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.brand-item-mini:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.brand-icon-mini {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 8px;
}

.brand-name-mini {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.brand-count-mini {
    font-size: 10px;
    color: var(--gray-dark);
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background: var(--light);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-dark);
    cursor: pointer;
}

.modal-body {
    padding: 16px;
}

/* Адаптация для планшетов и ПК */
/* Стили для авторизации в header на ПК */
.header-auth-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-text-sm {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--gray);
    background: white;
    color: var(--dark);
}

.btn-text-sm:hover {
    background: var(--gray-light);
    border-color: var(--primary);
}

.btn-text-sm.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-text-sm.primary:hover {
    background: var(--primary-dark);
}

.header-user-desktop {
    position: relative;
}

.user-avatar-dropdown {
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar-dropdown:hover {
    opacity: 0.8;
}

#userMenuDropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    padding: 8px 0;
    animation: fadeIn 0.2s ease;
}

#userMenuDropdown a {
    display: block;
    padding: 12px 16px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

#userMenuDropdown a:hover {
    background: var(--gray-light);
}

@media (min-width: 768px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .car-image-mini {
        height: 140px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .mobile-bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .stories-container {
        gap: 16px;
    }
    
    .story-item {
        min-width: 80px;
    }
    
    .story-avatar {
        width: 72px;
        height: 72px;
    }
}

@media (min-width: 1024px) {
    .listings-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .header-search {
        max-width: 500px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .stories-container {
        gap: 20px;
    }
    
    .story-item {
        min-width: 90px;
    }
    
    .story-avatar {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 360px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .car-image-mini {
        height: 100px;
    }
    
    .car-title-mini {
        font-size: 12px;
    }
    
    .feature-mini {
        font-size: 9px;
    }
    
    .car-price-mini {
        font-size: 14px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .header-actions .btn-text {
        display: none;
    }
    
    .stories-container {
        gap: 10px;
    }
    
    .story-item {
        min-width: 64px;
    }
    
    .story-avatar {
        width: 56px;
        height: 56px;
    }
}

/* Утилиты */
.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-gray { color: var(--gray-dark); }

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-fade {
    animation: fadeIn 0.3s ease;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Улучшенное модальное окно создания истории */
#storyModal .modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.story-type-option {
    position: relative;
}

.story-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.story-type-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.story-type-option input[type="radio"]:checked + div {
    transform: scale(1.1);
}

.story-upload-btn:hover {
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.story-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.story-submit-btn:active {
    transform: translateY(0);
}

#adPreview {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mediaPreview {
    animation: fadeIn 0.3s ease-out;
}

/* Адаптивность для модального окна истории */
@media (max-width: 768px) {
    #storyModal .modal-content {
        width: 95%;
        max-width: none;
        margin: 20px auto;
        max-height: 90vh;
    }
    
    .story-type-option {
        padding: 16px 12px;
    }
    
    .story-type-option div {
        width: 40px;
        height: 40px;
    }
    
    .story-type-option i {
        font-size: 20px;
    }
}

@media (max-width: 420px) {
    #storyModal .modal-content {
        width: 92%;
        margin: 10px auto;
        max-height: 92vh;
    }
    
    #storyModal .modal-header {
        padding: 16px 20px;
    }
    
    #storyModal .modal-body {
        padding: 20px;
    }
    
    #storyModal .modal-body .story-type-option {
        padding: 12px 10px;
    }

    .story-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    #storyModal .modal-body .story-type-option div {
        width: 36px;
        height: 36px;
    }
    
    #storyModal .modal-body .story-type-option i {
        font-size: 18px;
    }
    
    #storyModal .modal-body .story-submit-btn {
        font-size: 14px;
        padding: 14px;
    }
    
    #storyModal .modal-body .story-upload-btn {
        padding: 16px;
    }
}

