        /* ============================================
           БАЗОВЫЕ СТИЛИ
           ============================================ */
        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            margin: 0;
            padding: 0;
            background: #f8f9fa;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow-x: hidden;
        }

        .post-detail {
            max-width: 820px;
            margin: 0 auto;
            padding: 20px;
            background: #fff;
            box-shadow: 0 2px 10px rgba(0,0,0,0.08);
            min-height: 100vh;
        }

        /* ============================================
           КНОПКА "НА ГЛАВНУЮ"
           ============================================ */
        .btn-orange {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            background: #ff8c00;
            color: #fff !important;
            text-decoration: none;
            border-radius: 30px;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(255,140,0,0.3);
        }
        .btn-orange:hover {
            background: #e67e00;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255,140,0,0.4);
        }
        .btn-orange i {
            font-size: 1rem;
        }

        /* ============================================
           ЗАГОЛОВОК
           ============================================ */
        .post-header {
            margin: 20px 0 25px;
            padding-bottom: 20px;
            border-bottom: 2px solid #f0f0f0;
        }
        .post-title {
            font-size: 2.2rem;
            font-weight: 800;
            line-height: 1.2;
            margin: 0 0 15px 0;
            color: #1a1a1a;
            word-break: break-word;
            hyphens: auto;
        }
        .post-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 12px 20px;
            font-size: 0.9rem;
            color: #666;
            margin-bottom: 10px;
        }
        .post-meta span {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: #f5f5f5;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
        }
        .post-meta i {
            color: #ff8c00;
        }
        .post-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 12px 20px;
            font-size: 0.85rem;
            color: #888;
            margin-top: 8px;
        }
        .post-stats span {
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        .post-stats i {
            color: #ff8c00;
        }

        /* ============================================
           ИЗОБРАЖЕНИЯ
           ============================================ */
        .post-image {
            margin: 0 0 25px 0;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        .post-image img {
            width: 100%;
            height: auto;
            display: block;
            object-fit: cover;
            aspect-ratio: 16/9;
            background: #f0f0f0;
        }

        /* ГАЛЕРЕЯ */
        .post-gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 12px;
            margin: 20px 0 30px;
        }
        .gallery-item {
            position: relative;
            border-radius: 10px;
            overflow: hidden;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0,0,0,0.08);
            transition: all 0.3s ease;
            aspect-ratio: 1/1;
            background: #f5f5f5;
        }
        .gallery-item:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        }
        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .gallery-caption {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.7));
            padding: 25px 12px 10px;
            color: #fff;
            font-size: 0.85rem;
        }
        .gallery-caption p {
            margin: 0;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .gallery-caption i {
            font-size: 0.8rem;
        }

        /* ============================================
           КОНТЕНТ
           ============================================ */
        .post-content {
            margin: 25px 0 30px;
        }
        .post-excerpt {
            background: #fef9f0;
            border-left: 4px solid #ff8c00;
            padding: 16px 20px;
            margin: 0 0 25px 0;
            border-radius: 0 8px 8px 0;
            font-size: 1.05rem;
            color: #555;
        }
        .post-body {
            font-size: 1.05rem;
            line-height: 1.8;
            color: #222;
        }
        .post-body p {
            margin: 0 0 1.2em 0;
        }
        .post-body img {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            margin: 15px 0;
        }
        .post-body h2, .post-body h3, .post-body h4 {
            margin: 1.5em 0 0.5em;
            color: #1a1a1a;
        }
        .post-body blockquote {
            border-left: 4px solid #ff8c00;
            padding: 10px 20px;
            margin: 20px 0;
            background: #fafafa;
            border-radius: 0 8px 8px 0;
            font-style: italic;
            color: #555;
        }
        .post-body ul, .post-body ol {
            padding-left: 25px;
        }
        .post-body a {
            color: #ff8c00;
            text-decoration: underline;
        }
        .post-body a:hover {
            color: #e67e00;
        }

        /* ============================================
           ЛАЙКИ
           ============================================ */
        .post-footer {
            padding: 30px 0 20px;
            border-top: 2px solid #f0f0f0;
            margin-top: 10px;
        }
        .like-section {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            padding: 20px;
            background: #fafafa;
            border-radius: 16px;
        }
        .like-label {
            font-size: 1rem;
            color: #555;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .like-label i {
            font-size: 1.1rem;
        }
        .like-big-btn {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            border: none;
            background: #f0f0f0;
            color: #ccc;
            font-size: 2.2rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            touch-action: manipulation;
            -webkit-touch-callout: none;
            user-select: none;
        }
        .like-big-btn i {
            transition: all 0.3s ease;
        }
        .like-big-btn.liked {
            background: #ff4757;
            color: #fff;
            box-shadow: 0 4px 20px rgba(255,71,87,0.4);
            animation: likePulse 0.4s ease;
        }
        .like-big-btn:active {
            transform: scale(0.85) !important;
        }
        @keyframes likePulse {
            0% { transform: scale(1); }
            30% { transform: scale(1.2); }
            60% { transform: scale(0.95); }
            100% { transform: scale(1); }
        }
        .like-big-count {
            font-size: 1.3rem;
            font-weight: 700;
            color: #1a1a1a;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .like-big-count span:last-child {
            font-weight: 400;
        }

        /* ============================================
           НАВИГАЦИЯ МЕЖДУ ПОСТАМИ
           ============================================ */
        .post-navigation {
            display: flex;
            justify-content: space-between;
            gap: 15px;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid #eee;
            flex-wrap: wrap;
        }
        .nav-previous, .nav-next {
            flex: 1;
            min-width: 120px;
        }
        .nav-previous a, .nav-next a {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background: #f5f5f5;
            border-radius: 30px;
            color: #333;
            text-decoration: none;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            word-break: break-word;
        }
        .nav-previous a:hover, .nav-next a:hover {
            background: #ff8c00;
            color: #fff;
        }
        .nav-previous span, .nav-next span {
            padding: 10px 16px;
            background: #f5f5f5;
            border-radius: 30px;
            color: #999;
            font-size: 0.9rem;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .nav-next {
            text-align: right;
        }
        .nav-center {
            width: 100%;
            text-align: center;
            padding: 10px;
            color: #888;
        }
        .nav-center i {
            color: #ff8c00;
        }

        /* ============================================
           УВЕДОМЛЕНИЯ
           ============================================ */
        .notification-toast {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(-20px);
            padding: 14px 24px;
            border-radius: 12px;
            background: #333;
            color: #fff;
            font-size: 0.95rem;
            font-weight: 500;
            box-shadow: 0 8px 30px rgba(0,0,0,0.2);
            z-index: 10000;
            opacity: 0;
            transition: all 0.4s ease;
            display: flex;
            align-items: center;
            gap: 12px;
            max-width: 90%;
            pointer-events: none;
            white-space: nowrap;
        }
        .notification-toast.success {
            background: #2ecc71;
        }
        .notification-toast.error {
            background: #e74c3c;
        }
        .notification-toast.warning {
            background: #f39c12;
        }
        .notification-toast i {
            font-size: 1.2rem;
        }

        /* ============================================
           ВСПЛЫВАЮЩИЕ СЕРДЕЧКИ
           ============================================ */
        .floating-heart {
            position: fixed;
            pointer-events: none;
            font-size: 2rem;
            z-index: 9999;
            animation: floatHeart 1.5s ease-out forwards;
        }
        @keyframes floatHeart {
            0% {
                opacity: 1;
                transform: translateY(0) scale(1) rotate(0deg);
            }
            100% {
                opacity: 0;
                transform: translateY(-120px) scale(1.5) rotate(20deg);
            }
        }

        /* ============================================
           МОДАЛЬНОЕ ОКНО ГАЛЕРЕИ
           ============================================ */
        .gallery-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.92);
            z-index: 10001;
            align-items: center;
            justify-content: center;
            padding: 20px;
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }
        .gallery-modal.active {
            display: flex;
        }
        .gallery-modal img {
            max-width: 95%;
            max-height: 85vh;
            object-fit: contain;
            border-radius: 8px;
            box-shadow: 0 8px 40px rgba(0,0,0,0.5);
            animation: modalFade 0.3s ease;
        }
        @keyframes modalFade {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
        .close-btn {
            position: absolute;
            top: 20px;
            right: 30px;
            color: #fff;
            font-size: 2.8rem;
            font-weight: 300;
            cursor: pointer;
            transition: all 0.3s;
            z-index: 10;
            line-height: 1;
            background: rgba(255,255,255,0.1);
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }
        .close-btn:hover {
            background: rgba(255,255,255,0.2);
            transform: rotate(90deg);
        }
        .nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            color: #fff;
            font-size: 2.5rem;
            font-weight: 300;
            cursor: pointer;
            padding: 15px 10px;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
            width: 55px;
            height: 55px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
            user-select: none;
        }
        .nav-btn:hover {
            background: rgba(255,255,255,0.2);
        }
        .prev-btn { left: 15px; }
        .next-btn { right: 15px; }
        .gallery-counter {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            color: #fff;
            background: rgba(0,0,0,0.6);
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 0.9rem;
            backdrop-filter: blur(4px);
        }

        /* ============================================
           АДАПТИВНЫЕ СТИЛИ ДЛЯ ТЕЛЕФОНОВ
           ============================================ */

        /* Планшеты и маленькие ноутбуки */
        @media (max-width: 1024px) {
            .post-detail {
                padding: 18px 24px;
            }
            .post-title {
                font-size: 1.9rem;
            }
        }

        /* Телефоны (горизонтальная и вертикальная ориентация) */
        @media (max-width: 768px) {
            .post-detail {
                padding: 15px 16px;
                box-shadow: none;
                background: #fff;
                min-height: 100vh;
            }

            .post-title {
                font-size: 1.6rem;
                margin-bottom: 12px;
            }

            .post-meta {
                gap: 8px 12px;
                font-size: 0.8rem;
            }
            .post-meta span {
                padding: 3px 10px;
                font-size: 0.75rem;
                white-space: nowrap;
            }

            .post-stats {
                font-size: 0.75rem;
                gap: 8px 12px;
            }

            .post-image {
                border-radius: 8px;
                margin-bottom: 18px;
            }
            .post-image img {
                aspect-ratio: 16/9;
            }

            .post-gallery {
                grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
                gap: 10px;
                margin: 15px 0 20px;
            }
            .gallery-item {
                aspect-ratio: 1/1;
                border-radius: 8px;
            }
            .gallery-caption {
                font-size: 0.7rem;
                padding: 20px 8px 6px;
            }
            .gallery-caption p {
                gap: 4px;
            }

            .post-excerpt {
                font-size: 0.95rem;
                padding: 12px 16px;
                margin-bottom: 18px;
            }

            .post-body {
                font-size: 0.98rem;
                line-height: 1.7;
            }
            .post-body img {
                border-radius: 6px;
                margin: 12px 0;
            }
            .post-body blockquote {
                padding: 8px 14px;
                margin: 15px 0;
                font-size: 0.95rem;
            }
            .post-body ul, .post-body ol {
                padding-left: 20px;
            }

            .btn-orange {
                padding: 8px 16px;
                font-size: 0.85rem;
                border-radius: 25px;
                gap: 6px;
            }
            .btn-orange i {
                font-size: 0.85rem;
            }

            .like-section {
                padding: 15px;
                gap: 10px;
                border-radius: 12px;
            }
            .like-big-btn {
                width: 60px;
                height: 60px;
                font-size: 1.8rem;
            }
            .like-big-count {
                font-size: 1.1rem;
            }
            .like-label {
                font-size: 0.9rem;
            }

            .post-navigation {
                flex-direction: column;
                gap: 10px;
            }
            .nav-previous, .nav-next {
                flex: none;
                width: 100%;
                text-align: center;
            }
            .nav-previous a, .nav-next a {
                justify-content: center;
                padding: 10px 14px;
                font-size: 0.85rem;
                width: 100%;
            }
            .nav-previous span, .nav-next span {
                justify-content: center;
                width: 100%;
                padding: 10px 14px;
                font-size: 0.85rem;
            }
            .nav-next {
                text-align: center;
            }

            /* Модальное окно на телефонах */
            .gallery-modal {
                padding: 10px;
            }
            .gallery-modal img {
                max-width: 98%;
                max-height: 80vh;
            }
            .close-btn {
                top: 15px;
                right: 15px;
                font-size: 2rem;
                width: 40px;
                height: 40px;
            }
            .nav-btn {
                font-size: 1.8rem;
                width: 40px;
                height: 40px;
                padding: 8px 5px;
            }
            .prev-btn { left: 5px; }
            .next-btn { right: 5px; }
            .gallery-counter {
                bottom: 20px;
                font-size: 0.8rem;
                padding: 5px 14px;
            }

            .notification-toast {
                top: 15px;
                padding: 12px 18px;
                font-size: 0.85rem;
                max-width: 92%;
                white-space: normal;
                border-radius: 10px;
                gap: 10px;
            }
            .notification-toast i {
                font-size: 1rem;
            }

            .floating-heart {
                font-size: 1.8rem;
            }
        }

        /* Очень маленькие телефоны (< 400px) */
        @media (max-width: 400px) {
            .post-detail {
                padding: 12px 10px;
            }
            .post-title {
                font-size: 1.35rem;
            }
            .post-meta span {
                font-size: 0.7rem;
                padding: 2px 8px;
            }
            .post-gallery {
                grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
                gap: 8px;
            }
            .post-body {
                font-size: 0.92rem;
            }
            .like-big-btn {
                width: 55px;
                height: 55px;
                font-size: 1.6rem;
            }
            .btn-orange {
                padding: 6px 14px;
                font-size: 0.8rem;
            }
            .nav-previous a, .nav-next a,
            .nav-previous span, .nav-next span {
                font-size: 0.8rem;
                padding: 8px 12px;
            }
        }

        /* Адаптация для темной темы (если включена на устройстве) */
        @media (prefers-color-scheme: dark) {
            body {
                background: #1a1a1a;
            }
            .post-detail {
                background: #1e1e1e;
            }
            .post-title {
                color: #f0f0f0;
            }
            .post-body {
                color: #ddd;
            }
            .post-meta span {
                background: #2a2a2a;
                color: #aaa;
            }
            .post-stats {
                color: #888;
            }
            .post-excerpt {
                background: #2a2a2a;
                color: #ccc;
                border-left-color: #ff8c00;
            }
            .post-body h2, .post-body h3, .post-body h4 {
                color: #eee;
            }
            .post-body blockquote {
                background: #252525;
                color: #bbb;
            }
            .post-body a {
                color: #ffa500;
            }
            .post-body a:hover {
                color: #ffb833;
            }
            .like-section {
                background: #252525;
            }
            .like-label {
                color: #aaa;
            }
            .like-big-btn {
                background: #2a2a2a;
                color: #666;
            }
            .like-big-btn.liked {
                background: #ff4757;
                color: #fff;
            }
            .like-big-count {
                color: #eee;
            }
            .post-footer {
                border-top-color: #2a2a2a;
            }
            .post-navigation {
                border-top-color: #2a2a2a;
            }
            .nav-previous a, .nav-next a {
                background: #2a2a2a;
                color: #ddd;
            }
            .nav-previous a:hover, .nav-next a:hover {
                background: #ff8c00;
                color: #fff;
            }
            .nav-previous span, .nav-next span {
                background: #2a2a2a;
                color: #666;
            }
            .post-image img {
                background: #2a2a2a;
            }
            .gallery-item {
                background: #2a2a2a;
            }
            .post-meta i, .post-stats i {
                color: #ffa500;
            }
            .nav-center i {
                color: #ffa500;
            }
            .post-excerpt i {
                color: #ffa500 !important;
            }
        }

        /* Безопасная зона для iPhone с вырезом */
        @supports (padding: max(0px)) {
            .post-detail {
                padding-left: max(16px, env(safe-area-inset-left));
                padding-right: max(16px, env(safe-area-inset-right));
            }
        }