/*
Theme Name: HTML Beautifier & Minifier
Theme URI: https://htmlbeautifier.org/
Author: Admin
Author URI: https://htmlbeautifier.org/
Description: A simple html beautifier WordPress theme
Version: 1.0
License: GPL v2 or later
Text Domain: htmlbeautifier
*/
       * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        :root {
            --primary: #2F6F5E;
            --primary-dark: #234F42;
            --primary-light: #5FA491;
            --secondary: #1F3B33;
            --success: #3E8E5A;
            --warning: #C97F2B;
            --danger: #C1483C;
            --purple: #7D6B9E;
            --teal: #2E7D6B;
            --bg-body: #F5F2EA;
            --bg-white: #ffffff;
            --text-dark: #1E2A24;
            --text-muted: #5C6B62;
            --border-light: #E6E1D4;
            --shadow-sm: 0 4px 20px rgba(31, 59, 51, 0.07);
            --shadow-md: 0 20px 40px -14px rgba(31, 59, 51, 0.12);
            --shadow-lg: 0 20px 48px -12px rgba(31, 59, 51, 0.18);
            --radius-sm: 12px;
            --radius-md: 20px;
            --radius-lg: 28px;
            --radius-xl: 40px;
            --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }

        html {
            overflow-x: hidden;
            width: 100%;
        }

        body {
            background: var(--bg-body);
            font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            color: var(--text-dark);
            -webkit-tap-highlight-color: transparent;
            line-height: 1.6;
            overflow-x: hidden;
            width: 100%;
        }

        .app-wrapper {
            max-width: 1600px;
            margin: 0 auto;
            padding: 0 0.5rem;
        }

        @media (min-width: 768px) {
            .app-wrapper {
                padding: 0 1rem;
            }
        }

        @media (min-width: 1024px) {
            .app-wrapper {
                padding: 0;
            }
        }

        /* ============================================
                   NAVIGATION
                   ============================================ */
        .navbar {
            background: var(--bg-white);
            padding: 0.5rem 0.8rem;
            box-shadow: var(--shadow-sm);
            border: 1px solid rgba(255, 255, 255, 0.6);
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            position: relative;
            z-index: 1000;
            min-height: 56px;
            background: rgba(255, 255, 255, 0.95);
        }

        @media (min-width: 768px) {
            .navbar {
                padding: 0.5rem 1.2rem;
                min-height: 64px;
            }
        }

        @media (min-width: 1024px) {
            .navbar {
                padding: 0.5rem 2rem;
                background: var(--bg-white);
            }
        }

        .navbar-logo {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            text-decoration: none;
            flex-shrink: 0;
            -webkit-tap-highlight-color: transparent;
        }

        .navbar-logo img {
            max-height: 32px;
            width: auto;
        }

        @media (min-width: 768px) {
            .navbar-logo img {
                max-height: 44px;
            }
        }

        .navbar-logo span {
            font-size: 1rem;
            font-weight: 700;
            background: linear-gradient(145deg, #1F3B33, var(--primary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            letter-spacing: -0.3px;
        }

        @media (min-width: 768px) {
            .navbar-logo span {
                font-size: 1.4rem;
            }
        }

        /* Hamburger */
        .nav-hamburger {
            display: flex;
            flex-direction: column;
            gap: 4px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 6px;
            border-radius: 8px;
            transition: var(--transition);
            flex-shrink: 0;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        .nav-hamburger:hover {
            background: #EFECE2;
        }

        .nav-hamburger span {
            display: block;
            width: 24px;
            height: 3px;
            background: var(--text-dark);
            border-radius: 3px;
            transition: var(--transition);
        }

        .nav-hamburger.active span:nth-child(1) {
            transform: rotate(45deg) translate(5px, 5px);
        }

        .nav-hamburger.active span:nth-child(2) {
            opacity: 0;
        }

        .nav-hamburger.active span:nth-child(3) {
            transform: rotate(-45deg) translate(5px, -5px);
        }

        @media (min-width: 1024px) {
            .nav-hamburger {
                display: none;
            }
        }

        .nav-links-wrapper {
            display: none;
            width: 100%;
            flex-direction: column;
            padding-top: 0.8rem;
            border-top: 1px solid var(--border-light);
            margin-top: 0.5rem;
        }

        .nav-links-wrapper.active {
            display: flex;
        }

        @media (min-width: 1024px) {
            .nav-links-wrapper {
                display: flex !important;
                width: auto;
                flex-direction: row;
                padding-top: 0;
                border-top: none;
                margin-top: 0;
                align-items: center;
                gap: 0.3rem;
            }
        }

        .nav-links {
            display: flex;
            flex-direction: column;
            list-style: none;
            gap: 0.2rem;
            width: 100%;
        }

        @media (min-width: 1024px) {
            .nav-links {
                flex-direction: row;
                align-items: center;
                gap: 0.2rem;
                width: auto;
            }
        }

        .nav-links>li {
            position: relative;
            width: 100%;
        }

        @media (min-width: 1024px) {
            .nav-links>li {
                width: auto;
            }
        }

        .nav-links>li>a {
            text-decoration: none;
            font-weight: 600;
            font-size: 0.85rem;
            color: var(--text-dark);
            padding: 0.5rem 0.8rem;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 4px;
            transition: var(--transition);
            white-space: nowrap;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            width: 100%;
            position: relative;
        }

        @media (min-width: 768px) {
            .nav-links>li>a {
                font-size: 0.9rem;
                padding: 0.6rem 1rem;
            }
        }

        @media (min-width: 1024px) {
            .nav-links>li>a {
                padding: 0.5rem 1rem;
                font-size: 0.95rem;
                border-radius: var(--radius-xl);
                justify-content: center;
                width: auto;
            }
        }

        .nav-links>li>a:hover,
        .nav-links>li>a.active {
            background: var(--primary);
            color: white;
            box-shadow: 0 8px 16px -6px rgba(47, 111, 94, 0.25);
        }

        .nav-links>li>a .arrow {
            font-size: 0.6rem;
            transition: var(--transition);
            display: inline-block;
            margin-left: 4px;
            flex-shrink: 0;
        }

        .nav-links>li>a .arrow.open {
            transform: rotate(180deg);
        }

        /* Dropdown */
        .dropdown-menu {
            display: none;
            background: #FAF8F1;
            border-radius: var(--radius-sm);
            padding: 0.5rem;
            box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
            border: 1px solid var(--border-light);
            list-style: none;
            width: 100%;
            margin-top: 0.2rem;
        }

        .dropdown-menu.open {
            display: block;
        }

        @media (min-width: 1024px) {
            .dropdown-menu {
                position: absolute;
                top: calc(100% + 8px);
                left: 50%;
                transform: translateX(-50%) translateY(-8px);
                min-width: 520px;
                padding: 1.2rem 1.5rem;
                border-radius: var(--radius-md);
                margin-top: 0;
                width: auto;
                background: var(--bg-white);
                box-shadow: var(--shadow-lg);
                border: 1px solid var(--border-light);
                opacity: 0;
                visibility: hidden;
                pointer-events: none;
                transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
                display: block !important;
            }

            .nav-links>li.dropdown:hover>.dropdown-menu {
                opacity: 1;
                visibility: visible;
                transform: translateX(-50%) translateY(0);
                pointer-events: auto;
            }

            .nav-links>li.dropdown:hover>.dropdown-menu.mega {
                transform: translateX(-50%) translateY(0);
            }

            .nav-links>li.dropdown:hover>.dropdown-toggle .arrow {
                transform: rotate(180deg);
            }

            .dropdown-menu.open-desktop {
                opacity: 1 !important;
                visibility: visible !important;
                transform: translateX(-50%) translateY(0) !important;
                pointer-events: auto !important;
            }

            .dropdown-menu::before {
                content: '';
                position: absolute;
                top: -8px;
                left: 50%;
                transform: translateX(-50%);
                border-left: 8px solid transparent;
                border-right: 8px solid transparent;
                border-bottom: 8px solid var(--bg-white);
            }

            .dropdown-menu.mega {
                min-width: 680px;
                left: 50%;
                transform: translateX(-50%) translateY(-8px);
            }

            .dropdown-menu.mega.open-desktop {
                transform: translateX(-50%) translateY(0) !important;
            }
        }

        .dropdown-menu li {
            width: 100%;
        }

        .dropdown-menu a {
            text-decoration: none;
            color: var(--text-dark);
            padding: 0.4rem 0.6rem;
            border-radius: 8px;
            display: block;
            font-size: 0.8rem;
            font-weight: 500;
            transition: var(--transition);
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        @media (min-width: 768px) {
            .dropdown-menu a {
                padding: 0.5rem 0.8rem;
                font-size: 0.85rem;
                border-radius: 10px;
            }
        }

        .dropdown-menu a:hover {
            background: #EEF5F0;
            color: var(--primary);
        }

        .dropdown-menu .dropdown-title {
            font-weight: 700;
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted);
            padding: 0.3rem 0.6rem;
            cursor: default;
        }

        @media (min-width: 768px) {
            .dropdown-menu .dropdown-title {
                font-size: 0.7rem;
                padding: 0.4rem 0.8rem;
            }
        }

        .dropdown-menu .dropdown-title:hover {
            background: transparent;
            color: var(--text-muted);
        }

        .mega-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.2rem;
        }

        @media (min-width: 480px) {
            .mega-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (min-width: 768px) {
            .mega-grid {
                grid-template-columns: 1fr 1fr 1fr;
                gap: 0.3rem;
            }
        }

        .mega-grid .col {
            display: flex;
            flex-direction: column;
            gap: 0.05rem;
        }

        .mega-grid .col .col-title {
            font-weight: 700;
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            color: var(--text-muted);
            padding: 0.3rem 0.6rem;
            cursor: default;
        }

        @media (min-width: 768px) {
            .mega-grid .col .col-title {
                font-size: 0.75rem;
                padding: 0.4rem 0.8rem;
            }
        }

        .mega-grid .col .col-title:hover {
            background: transparent;
            color: var(--text-muted);
        }

        .btn-primary-nav {
            background: var(--primary);
            color: white !important;
            border-radius: var(--radius-xl) !important;
            padding: 0.5rem 1.2rem !important;
            font-weight: 700 !important;
            box-shadow: 0 8px 16px -6px rgba(47, 111, 94, 0.3);
            justify-content: center !important;
        }

        .btn-primary-nav:hover {
            background: var(--primary-dark) !important;
            transform: translateY(-2px);
            box-shadow: 0 12px 24px -8px rgba(47, 111, 94, 0.4);
        }

        @media (min-width: 1024px) {
            .btn-primary-nav {
                margin-left: 0.5rem;
                padding: 0.6rem 1.4rem !important;
            }
        }

        /* ============================================
                   WORKSPACE
                   ============================================ */
        .workspace {
            display: grid;
            grid-template-columns: 1fr;
            gap: 16px;
            margin-top: 0.6rem;
        }

        @media (min-width: 768px) {
            .workspace {
                gap: 20px;
            }
        }

        @media (min-width: 1024px) {
            .workspace {
                grid-template-columns: minmax(0, 1fr) 200px minmax(0, 1fr);
            }
        }

        .editor-card {
            background: var(--bg-white);
            border-radius: var(--radius-md);
            padding: 0.8rem;
            box-shadow: var(--shadow-md);
            transition: box-shadow var(--transition);
            border: 1px solid rgba(255, 255, 255, 0.5);
            backdrop-filter: blur(2px);
            display: flex;
            flex-direction: column;
            min-height: 0;
            min-width: 0;
            width: 100%;
            max-width: 100%;
            overflow: hidden;
        }

        @media (min-width: 768px) {
            .editor-card {
                padding: 1.2rem;
                border-radius: var(--radius-lg);
            }
        }

        .editor-card:hover {
            box-shadow: 0 28px 48px -16px rgba(31, 59, 51, 0.16);
        }

        /* Fullscreen editor mode */
        .editor-card.is-fullscreen {
            position: fixed;
            inset: 0;
            z-index: 9500;
            max-width: none;
            width: 100vw;
            height: 100vh;
            margin: 0;
            border-radius: 0;
            padding: 1rem;
        }

        @media (min-width: 768px) {
            .editor-card.is-fullscreen {
                padding: 1.5rem 2rem;
            }
        }

        .editor-card.is-fullscreen .CodeMirror {
            height: calc(100vh - 140px) !important;
            border-radius: var(--radius-sm);
        }

        @media (min-width: 768px) {
            .editor-card.is-fullscreen .CodeMirror {
                height: calc(100vh - 170px) !important;
            }
        }

        body.editor-fullscreen-active {
            overflow: hidden;
        }

        .badge-fullscreen {
            border: none;
            padding: 0.2rem 0.6rem;
            border-radius: var(--radius-xl);
            font-size: 0.6rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 3px;
            white-space: nowrap;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            background: var(--primary);
            color: white;
        }

        .badge-fullscreen:hover {
            background: var(--primary-dark);
            transform: scale(1.02);
        }

        @media (min-width: 768px) {
            .badge-fullscreen {
                padding: 0.3rem 1rem;
                font-size: 0.75rem;
                gap: 4px;
            }
        }

        .editor-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.6rem;
            flex-wrap: wrap;
            gap: 0.4rem;
            flex-shrink: 0;
        }

        @media (min-width: 768px) {
            .editor-header {
                margin-bottom: 0.8rem;
                gap: 0.5rem;
            }
        }

        .editor-header h3 {
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-dark);
            letter-spacing: -0.2px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        @media (min-width: 768px) {
            .editor-header h3 {
                font-size: 1.1rem;
                gap: 6px;
            }
        }

        .editor-header h3 span {
            background: #EAF2EE;
            padding: 0.05rem 0.5rem;
            border-radius: var(--radius-xl);
            font-size: 0.6rem;
            font-weight: 600;
            color: var(--primary);
            letter-spacing: 0.3px;
        }

        @media (min-width: 768px) {
            .editor-header h3 span {
                padding: 0.1rem 0.6rem;
                font-size: 0.65rem;
            }
        }

        .editor-header-actions {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
            flex-shrink: 0;
        }

        @media (min-width: 768px) {
            .editor-header-actions {
                gap: 6px;
            }
        }

        .badge-clear,
        .badge-paste,
        .badge-upload,
        .badge-url {
            border: none;
            padding: 0.2rem 0.6rem;
            border-radius: var(--radius-xl);
            font-size: 0.6rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 3px;
            white-space: nowrap;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        @media (min-width: 768px) {

            .badge-clear,
            .badge-paste,
            .badge-upload,
            .badge-url {
                padding: 0.3rem 1rem;
                font-size: 0.75rem;
                gap: 4px;
            }
        }

        .badge-clear {
            background: #EFECE2;
            color: var(--text-dark);
        }

        .badge-clear:hover {
            background: #E3DFD0;
            color: var(--text-dark);
        }

        .badge-paste {
            background: var(--primary);
            color: white;
        }

        .badge-paste:hover {
            background: var(--primary-dark);
            transform: scale(1.02);
        }

        .badge-upload {
            background: var(--purple);
            color: white;
        }

        .badge-upload:hover {
            background: #5F4B82;
            transform: scale(1.02);
        }

        .badge-url {
            background: var(--teal);
            color: white;
        }

        .badge-url:hover {
            background: #1F5C4F;
            transform: scale(1.02);
        }

        /* Hidden file input */
        #fileInput {
            display: none;
        }

        /* URL modal */
        .url-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            z-index: 9998;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .url-modal.active {
            display: flex;
        }

        .url-modal-content {
            background: var(--bg-white);
            border-radius: var(--radius-lg);
            padding: 2rem;
            max-width: 500px;
            width: 100%;
            box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.3);
            animation: modalIn 0.3s ease;
        }

        @keyframes modalIn {
            from {
                transform: scale(0.9);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .url-modal-content h3 {
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
            color: var(--text-dark);
        }

        .url-modal-content p {
            color: var(--text-muted);
            font-size: 0.9rem;
            margin-bottom: 1.2rem;
        }

        .url-modal-content .url-input-group {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .url-modal-content .url-input-group input {
            flex: 1;
            padding: 0.7rem 1rem;
            border: 2px solid var(--border-light);
            border-radius: var(--radius-sm);
            font-size: 0.9rem;
            font-family: inherit;
            min-width: 200px;
            transition: border var(--transition);
        }

        .url-modal-content .url-input-group input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.1);
        }

        .url-modal-content .url-actions {
            display: flex;
            gap: 10px;
            margin-top: 1rem;
            flex-wrap: wrap;
        }

        .url-modal-content .url-actions button {
            padding: 0.6rem 1.4rem;
            border: none;
            border-radius: var(--radius-xl);
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            font-size: 0.85rem;
            -webkit-tap-highlight-color: transparent;
        }

        .url-modal-content .url-actions .btn-fetch {
            background: var(--primary);
            color: white;
        }

        .url-modal-content .url-actions .btn-fetch:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }

        .url-modal-content .url-actions .btn-cancel {
            background: #EFECE2;
            color: var(--text-dark);
        }

        .url-modal-content .url-actions .btn-cancel:hover {
            background: #E3DFD0;
        }

        /* CodeMirror */
        .CodeMirror {
            height: 280px;
            border-radius: 14px;
            font-size: 12px;
            font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
            box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02);
            border: 1px solid var(--border-light);
            transition: border var(--transition);
            width: 100%;
            min-height: 150px;
            max-width: 100%;
        }

        .CodeMirror pre.CodeMirror-line,
        .CodeMirror pre.CodeMirror-line-like {
            word-break: break-word !important;
            overflow-wrap: anywhere !important;
        }

        .CodeMirror-scroll {
            max-width: 100%;
        }

        @media (min-width: 768px) {
            .CodeMirror {
                height: 450px !important;
                font-size: 14px;
                border-radius: var(--radius-md);
                min-height: 200px;
            }
        }

        @media (min-width: 1024px) {
            .CodeMirror {
                height: 500px !important;
            }
        }

        .CodeMirror-focused {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.08);
        }

        .editor-card .CodeMirror {
            background: #1e293b;
            flex-shrink: 0;
        }

        /* Size stats */
        .size-stats {
            display: flex;
            gap: 6px;
            font-size: 0.6rem;
            color: var(--text-muted);
            padding: 4px 8px;
            background: #FAF8F1;
            border-radius: var(--radius-md);
            margin-top: 6px;
            flex-wrap: wrap;
            border: 1px solid var(--border-light);
            flex-shrink: 0;
            min-height: 28px;
            align-items: center;
        }

        @media (min-width: 768px) {
            .size-stats {
                gap: 20px;
                font-size: 0.78rem;
                padding: 8px 16px;
                border-radius: var(--radius-xl);
                min-height: 40px;
                margin-top: 10px;
            }
        }

        .size-stats strong {
            color: var(--text-dark);
            font-weight: 700;
        }

        .size-stats .stat-item {
            display: flex;
            align-items: center;
            gap: 2px;
            white-space: nowrap;
        }

        @media (min-width: 768px) {
            .size-stats .stat-item {
                gap: 3px;
            }
        }

        .size-stats .stat-item .label {
            opacity: 0.7;
        }

        .size-stats .diff-positive {
            color: var(--danger);
        }

        .size-stats .diff-negative {
            color: var(--success);
        }

        .size-stats .diff-neutral {
            color: var(--text-muted);
        }

        /* Toolbar */
        .toolbar {
            background: var(--bg-white);
            border-radius: var(--radius-md);
            padding: 0.8rem 0.6rem;
            box-shadow: 0 16px 32px -12px rgba(31, 59, 51, 0.10);
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 6px;
            border: 1px solid rgba(255, 255, 255, 0.6);
            backdrop-filter: blur(4px);
            position: sticky;
            top: 8px;
            z-index: 100;
            min-height: 48px;
        }

        @media (min-width: 768px) {
            .toolbar {
                padding: 1rem 0.8rem;
                border-radius: 30px;
                gap: 10px;
                min-height: 60px;
                top: 10px;
            }
        }

        @media (min-width: 1024px) {
            .toolbar {
                flex-direction: column;
                padding: 1.2rem 0.8rem;
                border-radius: var(--radius-xl);
                position: sticky;
                top: 20px;
                gap: 14px;
                min-height: 200px;
            }
        }

        .toolbar .btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            border: none;
            background: transparent;
            font-weight: 600;
            font-size: 0.7rem;
            padding: 0.4rem 0.7rem;
            border-radius: 30px;
            cursor: pointer;
            transition: var(--transition);
            color: var(--text-dark);
            background: #FAF8F1;
            border: 1px solid var(--border-light);
            white-space: nowrap;
            flex: 1 1 auto;
            min-width: 55px;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
			    flex-direction: column;
        }

        @media (min-width: 768px) {
            .toolbar .btn {
                font-size: 0.9rem;
                padding: 0.6rem 1.2rem;
                min-width: 80px;
                gap: 6px;
            }
        }

        @media (min-width: 1024px) {
            .toolbar .btn {
                width: 100%;
                padding: 0.7rem 1.4rem;
                min-width: unset;
            }
        }

        .toolbar .btn-primary {
            background: var(--primary);
            color: white;
            border: none;
            box-shadow: 0 10px 18px -8px #2F6F5E66;
        }

        .toolbar .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 16px 24px -10px #2F6F5E99;
        }

        .toolbar .btn-outline:hover {
            background: #EEF5F0;
            border-color: var(--primary);
            transform: scale(1.01);
        }

        .toolbar .btn svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        @media (min-width: 768px) {
            .toolbar .btn svg {
                width: 18px;
                height: 18px;
            }
        }

        .toolbar .btn-group {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            justify-content: center;
            width: 100%;
        }

        @media (min-width: 768px) {
            .toolbar .btn-group {
                gap: 8px;
            }
        }

        @media (min-width: 1024px) {
            .toolbar .btn-group {
                flex-direction: column;
                width: 100%;
                gap: 10px;
            }
        }
article {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px 50px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}



/* --- Entry Header --- */
.entry-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 3px solid #f0f4f8;
    position: relative;
}

.entry-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
}

.entry-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Entry Content --- */
.entry-content {
    color: #2d3748;
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

/* --- Images --- */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entry-content img:hover {
    transform: scale(1.01);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* --- Headings --- */
.entry-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 45px 0 20px;
    padding-left: 20px;
    border-left: 5px solid #667eea;
    line-height: 1.3;
}

.entry-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 30px 0 15px;
}

/* --- Strong / Bold Text --- */
.entry-content strong {
    color: #4a5568;
    background: linear-gradient(135deg, #667eea15, #764ba215);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

/* --- Feature Highlights (For "Top Features" section) --- */
.entry-content h2 + p {
    background: #f7fafc;
    padding: 25px 30px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin: 20px 0 30px;
    font-size: 1.05rem;
}

/* --- Feature List (Custom) --- */
.entry-content ul.feature-list,
.entry-content ol.feature-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.entry-content ul.feature-list li,
.entry-content ol.feature-list li {
    padding: 15px 20px 15px 55px;
    background: #f7fafc;
    margin-bottom: 12px;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #edf2f7;
}

.entry-content ul.feature-list li:hover,
.entry-content ol.feature-list li:hover {
    background: #edf2f7;
    transform: translateX(5px);
    border-color: #667eea;
}

.entry-content ul.feature-list li::before {
    content: '✦';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.3rem;
}

.entry-content ol.feature-list li::before {
    content: counter(item) '.';
    counter-increment: item;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-weight: 700;
    font-size: 1.1rem;
}

.entry-content ol.feature-list {
    counter-reset: item;
}

/* --- Feature Cards (Grid Layout) --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.feature-card {
    background: #f7fafc;
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #edf2f7;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px;
}

.feature-card p {
    font-size: 0.95rem;
    color: #4a5568;
    margin: 0;
}

/* --- Stats/Badge Section --- */
.stats-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 5px 0;
}

/* --- CTA/Button Styles --- */
.entry-content .btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 10px 10px 10px 0;
    border: none;
    cursor: pointer;
}

.entry-content .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.entry-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.entry-content .btn-secondary {
    background: #edf2f7;
    color: #2d3748;
}

.entry-content .btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* --- Line Break Separator --- */
.entry-content hr {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    margin: 40px 0;
}

        /* ============================================
                   FOOTER
                   ============================================ */
        .footer {
            margin-top: 3rem;
            background: var(--bg-white);
            border-radius: var(--radius-lg);
            padding: 2rem 1.5rem 1.5rem;
            box-shadow: var(--shadow-sm);
            border: 1px solid rgba(255, 255, 255, 0.6);
        }

        @media (min-width: 768px) {
            .footer {
                padding: 3rem 2.5rem 2rem;
                border-radius: 32px;
                margin-top: 4rem;
            }
        }

        .footer-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
            margin-bottom: 2rem;
        }

        @media (min-width: 640px) {
            .footer-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (min-width: 1024px) {
            .footer-grid {
                grid-template-columns: 2fr 1fr 1fr 1fr;
            }
        }

        .footer-brand {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .footer-brand .logo {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            text-decoration: none;
        }

        .footer-brand .logo img {
            max-height: 36px;
            width: auto;
        }

        .footer-brand .logo span {
            font-size: 1.2rem;
            font-weight: 700;
            background: linear-gradient(145deg, #1F3B33, var(--primary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .footer-brand p {
            color: var(--text-muted);
            font-size: 0.9rem;
            max-width: 320px;
            line-height: 1.7;
        }

        .footer-social {
            display: flex;
            gap: 0.8rem;
            margin-top: 0.5rem;
        }

        .footer-social a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: #EFECE2;
            color: var(--text-dark);
            text-decoration: none;
            transition: var(--transition);
            font-size: 1rem;
        }

        .footer-social a:hover {
            background: var(--primary);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 8px 16px -6px rgba(47, 111, 94, 0.3);
        }

        .footer-heading {
            font-weight: 700;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-dark);
            margin-bottom: 0.8rem;
        }

        .footer-links-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }

        .footer-links-list a {
            text-decoration: none;
            color: var(--text-muted);
            font-size: 0.85rem;
            transition: var(--transition);
            display: inline-block;
        }

        .footer-links-list a:hover {
            color: var(--primary);
            transform: translateX(4px);
        }

        .footer-bottom {
            border-top: 1px solid var(--border-light);
            padding-top: 1.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.8rem;
            text-align: center;
        }

        @media (min-width: 768px) {
            .footer-bottom {
                flex-direction: row;
                justify-content: space-between;
                text-align: left;
            }
        }

        .footer-bottom p {
            color: var(--text-muted);
            font-size: 0.8rem;
        }

        .footer-bottom-links {
            display: flex;
            gap: 1.5rem;
            flex-wrap: wrap;
            justify-content: center;
        }

        .footer-bottom-links a {
            text-decoration: none;
            color: var(--text-muted);
            font-size: 0.8rem;
            transition: var(--transition);
        }

        .footer-bottom-links a:hover {
            color: var(--primary);
        }

        /* ============================================
                   STORY SECTION
                   ============================================ */
        .story-section {
            background: rgba(255, 255, 255, 0.84);
            backdrop-filter: blur(4px);
            border-radius: var(--radius-md);
            padding: 1rem;
            margin-top: 1.5rem;
            box-shadow: var(--shadow-sm);
            border: 1px solid rgba(255, 255, 255, 0.6);
        }

        @media (min-width: 768px) {
            .story-section {
                padding: 2.2rem 2.5rem;
                border-radius: 36px;
                margin-top: 3rem;
            }
        }

        .story-section h2 {
            font-size: 1rem;
            font-weight: 700;
            margin-top: 1.2rem;
            margin-bottom: 0.4rem;
            color: var(--text-dark);
            letter-spacing: -0.3px;
            word-break: break-word;
        }

        @media (min-width: 768px) {
            .story-section h2 {
                font-size: 1.5rem;
                margin-top: 2.2rem;
                margin-bottom: 0.6rem;
            }
        }

        .story-section h2:first-of-type {
            margin-top: 0;
        }

        .story-section h3 {
            font-size: 0.9rem;
            font-weight: 600;
            margin: 1rem 0 0.2rem 0;
            color: #234F42;
        }

        @media (min-width: 768px) {
            .story-section h3 {
                font-size: 1.2rem;
                margin: 1.4rem 0 0.3rem 0;
            }
        }

        .story-section p {
            color: #2A362F;
            line-height: 1.6;
            margin-bottom: 0.8rem;
            max-width: 780px;
            word-break: break-word;
            font-size: 0.85rem;
        }

        @media (min-width: 768px) {
            .story-section p {
                line-height: 1.7;
                margin-bottom: 1rem;
                font-size: 1rem;
            }
        }

        .story-section ul {
            padding-left: 1rem;
            margin: 0.6rem 0 1rem 0;
        }

        @media (min-width: 768px) {
            .story-section ul {
                padding-left: 1.4rem;
                margin: 0.8rem 0 1.2rem 0;
            }
        }

        .story-section ul li {
            margin-bottom: 0.3rem;
            color: #2A362F;
            line-height: 1.5;
            word-break: break-word;
            font-size: 0.85rem;
        }

        @media (min-width: 768px) {
            .story-section ul li {
                margin-bottom: 0.4rem;
                line-height: 1.6;
                font-size: 1rem;
            }
        }

        hr {
            border: none;
            border-top: 1px solid var(--border-light);
            margin: 1rem 0;
        }

        @media (min-width: 768px) {
            hr {
                margin: 1.8rem 0;
            }
        }

        /* ============================================
                   TOAST
                   ============================================ */
        .toast {
            position: fixed;
            bottom: 16px;
            right: 16px;
            left: 16px;
            background: var(--text-dark);
            color: white;
            padding: 10px 16px;
            border-radius: 30px;
            font-weight: 500;
            font-size: 0.75rem;
            box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.3);
            transform: translateY(100px);
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 9999;
            text-align: center;
            max-width: 400px;
            margin: 0 auto;
        }

        @media (min-width: 768px) {
            .toast {
                bottom: 30px;
                right: 30px;
                left: auto;
                padding: 12px 24px;
                font-size: 0.9rem;
                border-radius: var(--radius-xl);
                max-width: 500px;
            }
        }

        .toast.show {
            transform: translateY(0);
            opacity: 1;
        }

        .toast.copy-success {
            background: var(--success);
            box-shadow: 0 12px 28px -8px rgba(62, 142, 90, 0.4);
        }

        /* ============================================
                   LOADING SPINNER
                   ============================================ */
        .loading-spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
            margin-right: 6px;
        }

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

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

        .mt-1 {
            margin-top: 0.5rem;
        }

        .mt-2 {
            margin-top: 1rem;
        }

        .mt-3 {
            margin-top: 1.5rem;
        }

        .mb-1 {
            margin-bottom: 0.5rem;
        }

        .mb-2 {
            margin-bottom: 1rem;
        }

        .mb-3 {
            margin-bottom: 1.5rem;
        }

        /* Print styles */
        @media print {

            .navbar,
            .toolbar,
            .footer,
            .footer-links,
            .toast {
                display: none !important;
            }

            .editor-card {
                box-shadow: none !important;
                border: 1px solid #ddd !important;
            }

            .CodeMirror {
                height: auto !important;
                min-height: 300px !important;
            }
        }