/* ============================================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ ИСТОРИЙ
   ============================================================================ */

/* Предварительный просмотр медиа в карточках историй */
.story-media-preview {
    margin-bottom: 1rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.media-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-item:hover img {
    transform: scale(1.05);
}

.media-more {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.media-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
    text-decoration: none;
}

/* Действия в карточке истории */
.story-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0;
    flex-wrap: wrap;
}

/* Адаптивность */
@media (max-width: 768px) {
    .story-actions {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0;
    }
    
    .story-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: 25px;
    }
}

/* Модальное окно для изображений */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
}

.modal-body {
    padding: 1rem;
    text-align: center;
}

.modal-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Темная тема для модального окна */
[data-theme="dark"] .modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-close:hover {
    background: var(--bg-tertiary);
}
