/* ========================================
   BASE & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-card: #ffffff;
    --text-primary: #000000;
    --text-secondary: #6e6e73;
    --text-tertiary: #8e8e93;
    --border-color: #e5e5ea;
    --accent: #007aff;
    --accent-dark: #0056cc;
    --error: #ff3b30;
    --success: #34c759;
    --warning: #ff9500;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --bg-card: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #98989d;
    --text-tertiary: #636366;
    --border-color: #38383a;
    --accent: #0a84ff;
    --accent-dark: #0056cc;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    padding-bottom: calc(60px + var(--safe-bottom));
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* ========================================
   HEADER
   ======================================== */
.top-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo span {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
}

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

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.header-btn:hover,
.header-btn:active {
    background: var(--border-color);
    transform: scale(0.95);
}

.header-btn .icon {
    width: 20px;
    height: 20px;
}

/* Theme Toggle Icons */
.theme-toggle .sun-icon,
[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon,
[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

/* Search Bar */
.search-bar {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-secondary);
    padding: 0 16px;
}

.search-bar.active {
    max-height: 70px;
    padding: 12px 16px;
}

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

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-btn {
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: var(--accent-dark);
}

/* ========================================
   SIDE MENU
   ======================================== */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.side-menu.active {
    visibility: visible;
    opacity: 1;
}

.menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: var(--bg-primary);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-menu.active .menu-content {
    transform: translateX(0);
}

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

.menu-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.close-menu {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.close-menu:hover {
    background: var(--border-color);
}

/* Profile Section */
.menu-profile {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.profile-guest,
.profile-logged {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.profile-group {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 4px;
}

.profile-actions,
.profile-links {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-actions a,
.profile-links a {
    color: var(--accent);
    font-weight: 500;
}

.profile-actions span {
    margin: 0 4px;
    color: var(--border-color);
}

.menu-user-links {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.menu-user-links .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Badge for notifications */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--error);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* Menu Navigation */
.menu-nav {
    padding: 12px 0;
    flex: 1;
}

.menu-section {
    padding: 12px 16px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-item {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.menu-item:hover {
    background: var(--bg-secondary);
    color: var(--accent);
}

.menu-item.admin {
    color: var(--warning);
    font-weight: 600;
}

/* Social Buttons */
.menu-social {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.social-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    color: white;
}

.social-btn:last-child {
    margin-bottom: 0;
}

.social-btn.tg {
    background: #0088cc;
}

.social-btn.vk {
    background: #0077ff;
}

.social-btn.max {
    background: #ff3b30;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.social-icon {
    width: 20px;
    height: 20px;
}

/* Menu Footer */
.menu-footer {
    padding: 16px;
}

.menu-footer .menu-section {
    padding-left: 0;
}

.menu-footer .menu-item {
    font-size: 14px;
    padding: 10px 0;
}

.menu-copyright {
    padding: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.6;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* ========================================
   DESKTOP MOSAIC LAYOUT
   ======================================== */
@media (min-width: 768px) {
    #dle-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .main-content {
        padding: 24px;
    }
}

@media (min-width: 1024px) {
    #dle-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* ========================================
   NEWS CARD (Instagram Style)
   ======================================== */
.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.news-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.news-image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-image-link:hover .news-image {
    transform: scale(1.05);
}

.news-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: var(--bg-secondary);
    color: var(--text-tertiary);
}

/* UImages PRO - Picture Tag Support */
.news-image-wrapper picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.news-image-wrapper picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-category {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    background: rgba(0, 122, 255, 0.95);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.news-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: rgba(255, 59, 48, 0.95);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.news-badge.video {
    background: rgba(0, 122, 255, 0.95);
}

.news-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-header {
    margin-bottom: 12px;
}

.news-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.news-title a {
    color: var(--text-primary);
}

.news-title a:hover {
    color: var(--accent);
}

.news-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.news-excerpt {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
    flex: 1;
}

.news-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.action-btn .icon {
    width: 18px;
    height: 18px;
}

.action-btn.active {
    color: var(--error);
}

.action-btn.active .icon {
    animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

.action-btn.share-btn {
    margin-left: auto;
}

/* ========================================
   COMPACT CARD (Afisha/Kino/TOP)
   ======================================== */
.news-card.compact {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 12px;
}

.news-card.compact .news-image-wrapper {
    padding-top: 0;
    height: 90px;
    border-radius: var(--radius);
}

.news-card.compact .news-title {
    font-size: 15px;
    margin-bottom: 4px;
}

.news-card.compact .news-meta {
    margin-bottom: 0;
    font-size: 12px;
}

/* ========================================
   FULL NEWS
   ======================================== */
.full-news {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.full-news-header {
    margin-bottom: 20px;
}

.full-news-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    margin: 12px 0;
    color: var(--text-primary);
}

.full-news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* UImages PRO - Full News Images */
.full-news-content img,
.full-news-content picture img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 16px 0;
}

.full-news-content picture {
    display: block;
    margin: 16px 0;
}

.full-news-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
}

.full-news-content p {
    margin-bottom: 16px;
}

.full-news-content a {
    color: var(--accent);
    text-decoration: underline;
}

.full-news-content a:hover {
    color: var(--accent-dark);
}

/* Event Details */
.event-details {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 20px;
    margin: 24px 0;
}

.event-details h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.details-grid {
    display: grid;
    gap: 12px;
}

.detail-item {
    font-size: 15px;
    color: var(--text-secondary);
}

.detail-item strong {
    color: var(--text-primary);
    margin-right: 8px;
}

/* Gallery */
.news-gallery {
    margin: 24px 0;
}

.news-gallery h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery-grid img {
    border-radius: var(--radius);
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
}

/* Tags */
.news-tags {
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 14px;
}

.news-tags strong {
    margin-right: 8px;
    color: var(--text-primary);
}

.news-tags a {
    color: var(--accent);
    margin-right: 8px;
    display: inline-block;
}

/* Full News Actions */
.full-news-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary,
.btn-secondary {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--accent-dark);
}

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

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

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-block {
    width: 100%;
}

.btn-primary .icon,
.btn-secondary .icon {
    width: 20px;
    height: 20px;
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + var(--safe-bottom));
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--accent);
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-icon {
    width: 24px;
    height: 24px;
}

.nav-item.advertise {
    color: var(--success);
}

.nav-item.advertise .nav-icon {
    color: var(--success);
}

/* ========================================
   PAGINATION
   ======================================== */
.bottom-navi,
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.bottom-navi a,
.bottom-navi span,
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.bottom-navi a:hover,
.pagination a:hover {
    background: var(--accent);
    color: white;
}

.bottom-navi .nav_ext,
.pagination .nav_ext {
    color: var(--text-secondary);
    min-width: auto;
    padding: 0 4px;
    background: transparent !important;
}

.bottom-navi span:not(.navigations):not(.nav_ext),
.pagination span:not(.navigations):not(.nav_ext),
.bottom-navi .current,
.pagination .current {
    background: var(--accent);
    color: white;
    font-weight: 600;
}

/* ========================================
   COMMENTS
   ======================================== */
.comments-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.comments-list h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    margin-bottom: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.comment-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.add-comment h4 {
    font-size: 16px;
    margin-bottom: 12px;
}

.no-comments {
    text-align: center;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.no-comments p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* ========================================
   AUTH PAGES
   ======================================== */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.auth-container h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.form-input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.security-code {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.security-code img {
    border-radius: var(--radius);
}

.security-code a {
    color: var(--accent);
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.forgot-link {
    color: var(--accent);
    font-size: 14px;
    display: block;
    margin-bottom: 16px;
}

.login-divider {
    text-align: center;
    margin: 20px 0;
    color: var(--text-secondary);
    position: relative;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

.logged-in p {
    margin-bottom: 12px;
}

.logged-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border-color);
}

.modal-body {
    padding: 20px;
}

/* ========================================
   RELATED NEWS
   ======================================== */
.related-news {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.related-news h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.related-item {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s ease;
}

.related-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.related-title {
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

/* ========================================
   AD CONTAINER
   ======================================== */
.ad-container {
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.ad-container ins {
    display: block !important;
    margin: 0 auto;
}

/* ========================================
   USER INFO CARD
   ======================================== */
.user-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

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

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.user-group {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ========================================
   SYSTEM MESSAGES
   ======================================== */
.system-message {
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    font-size: 15px;
}

.system-message.info {
    background: rgba(0, 122, 255, 0.1);
    border-left: 4px solid var(--accent);
    color: var(--text-primary);
}

.system-message.error {
    background: rgba(255, 59, 48, 0.1);
    border-left: 4px solid var(--error);
    color: var(--text-primary);
}

.system-message.success {
    background: rgba(52, 199, 89, 0.1);
    border-left: 4px solid var(--success);
    color: var(--text-primary);
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast {
    position: fixed;
    bottom: calc(80px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========================================
   ICONS
   ======================================== */
.icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 767px) {
    .full-news-title {
        font-size: 20px;
    }
    
    .full-news-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .news-card.compact {
        grid-template-columns: 100px 1fr;
    }
    
    .news-card.compact .news-image-wrapper {
        height: 75px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ========================================
   SCROLLBAR
   ======================================== */
.menu-content::-webkit-scrollbar {
    width: 6px;
}

.menu-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.menu-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.menu-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}