        .waterfall-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 10px 5px;
            /* Reduced from 20px 10px to save space */
        }

        .waterfall-container.active {
            display: block;
        }

        .waterfall-content {
            column-count: 2;
            column-gap: 12px;
            /* Reduced from 20px to save space */
            /* Enhanced background with subtle pattern */
            background:
                linear-gradient(90deg, rgba(254, 44, 85, 0.02) 1px, transparent 1px),
                linear-gradient(rgba(254, 44, 85, 0.02) 1px, transparent 1px),
                var(--bg-gradient-start);
            background-size: 50px 50px;
        }

        @media (max-width: 1024px) {
            .waterfall-content {
                column-count: 2;
            }
        }

        @media (max-width: 767px) {
            .waterfall-content {
                column-count: 1;
            }
        }

        /* On very wide screens, allow 3 columns */
        @media (min-width: 1400px) {
            .waterfall-content {
                column-count: 3;
            }
        }

        .waterfall-card {
            display: block;
            background: var(--container-bg);
            border-radius: 20px;
            overflow: hidden;
            margin-bottom: 15px;
            /* Increased from 12px for better spacing */
            break-inside: avoid;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            cursor: pointer;
            height: 340px;
            /* Increased from 300px for better proportions */
            display: flex;
            flex-direction: column;
            border: 1px solid rgba(254, 44, 85, 0.08);
            /* Subtle border for depth */
            /* Enhanced texture effects */
            position: relative;
            background: var(--container-bg);
            /* Base background */
        }

        .waterfall-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;

            /* Subtle texture using SVG noise pattern */
            background-image:
                radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15) 1.5px, transparent 2px),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15) 1.5px, transparent 2px),
                radial-gradient(circle at 40% 40%, rgba(0, 0, 0, 0.08) 1px, transparent 1.5px),
                radial-gradient(circle at 60% 60%, rgba(0, 0, 0, 0.08) 1px, transparent 1.5px),
                /* Subtle noise texture */
                url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
            background-size: 60px 60px, 70px 70px, 45px 45px, 35px 35px, 256px 256px;

            /* Set transparency and blend mode for natural texture effect */
            opacity: 0.5;
            mix-blend-mode: overlay;

            pointer-events: none;
            /* Ensure pseudo-element doesn't interfere with mouse events */
            border-radius: 20px;
            /* Match card border-radius */
        }

        .waterfall-card:hover::before {
            /* Enhanced texture effect on hover */
            background-image:
                radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 1.5px, transparent 2px),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 1.5px, transparent 2px),
                radial-gradient(circle at 40% 40%, rgba(0, 0, 0, 0.1) 1px, transparent 1.5px),
                radial-gradient(circle at 60% 60%, rgba(0, 0, 0, 0.1) 1px, transparent 1.5px),
                /* More prominent noise on hover */
                url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
            background-size: 60px 60px, 70px 70px, 45px 45px, 35px 35px, 256px 256px;
            opacity: 0.6;
        }

        .waterfall-card:hover {
            transform: translateY(-5px) scale(1.02);
            /* Added subtle scale */
            box-shadow: var(--card-shadow-hover);
            /* Enhanced texture effect on hover with more intensity */
            background-image:
                radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 1.5px, transparent 2px),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 1.5px, transparent 2px),
                radial-gradient(circle at 40% 40%, rgba(0, 0, 0, 0.1) 1px, transparent 1.5px),
                radial-gradient(circle at 60% 60%, rgba(0, 0, 0, 0.1) 1px, transparent 1.5px),
                /* Add subtle noise on hover for extra texture */
                url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
            background-size: 50px 50px, 60px 60px, 40px 40px, 30px 30px, 256px 256px;
        }

        .color-block {
            width: 100%;
            height: 200px;
            /* Increased from 170px for better text visibility */
            display: block;
            position: relative;
            /* Base gradient for background */
            background:
                linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(255, 255, 255, 0.05) 100%);
            transition: all 0.3s ease;
        }

        .color-block::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;

            /* Rice paper texture using SVG pattern */
            background-image:
                /* Base texture - subtle paper */
                url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E"),
                /* Additional canvas-like pattern */
                repeating-linear-gradient(0deg,
                    rgba(0, 0, 0, 0.03) 0px,
                    rgba(0, 0, 0, 0.03) 1px,
                    transparent 1px,
                    transparent 2px),
                repeating-linear-gradient(90deg,
                    rgba(0, 0, 0, 0.03) 0px,
                    rgba(0, 0, 0, 0.03) 1px,
                    transparent 1px,
                    transparent 2px);
            background-size:
                100px 100px,
                4px 4px,
                4px 4px;

            /* Set transparency and blend mode for natural texture effect */
            opacity: 0.3;
            mix-blend-mode: multiply;

            pointer-events: none;
            /* Ensure pseudo-element doesn't interfere with mouse events */
        }

        .color-block:hover::after {
            /* Enhanced texture effect on hover */
            background-image:
                /* Base texture - more prominent on hover */
                url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.25'/%3E%3C/svg%3E"),
                /* Additional canvas-like pattern */
                repeating-linear-gradient(0deg,
                    rgba(0, 0, 0, 0.05) 0px,
                    rgba(0, 0, 0, 0.05) 1px,
                    transparent 1px,
                    transparent 2px),
                repeating-linear-gradient(90deg,
                    rgba(0, 0, 0, 0.05) 0px,
                    rgba(0, 0, 0, 0.05) 1px,
                    transparent 1px,
                    transparent 2px);
            background-size:
                100px 100px,
                4px 4px,
                4px 4px;
            opacity: 0.4;
        }

        .overlay-text {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10;
            padding: 20px;
        }

        .dark-mode .overlay-text {
            color: #ffffff;
        }

        /* Mode 1: Vertical layout (suitable for 5/7-character poems) */
        .layout-vertical {
            flex-direction: row-reverse;
            /* Ancient Chinese reads from right to left */
            gap: 12px;
        }

        .layout-vertical .poem-line {
            writing-mode: vertical-rl;
            /* Vertical text */
            text-orientation: upright;
            font-family: 'Noto Serif SC', serif;
            font-size: 1.4rem;
            /* Vertical text can be larger */
            letter-spacing: 0.3em;
            /* Increase letter spacing for more breathing room */
            color: rgba(255, 255, 255, 0.95);
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
            border-left: 1px solid rgba(255, 255, 255, 0.2);
            /* Decorative line */
            padding-left: 8px;
        }

        .layout-vertical .poem-line:last-child {
            border-left: none;
        }

        .dark-mode .layout-vertical .poem-line {
            color: rgba(255, 255, 255, 0.98);
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
        }

        /* Mode 2: Horizontal center layout (suitable for ci/named phrases) */
        .layout-horizontal-center {
            flex-direction: column;
            gap: 16px;
        }

        .layout-horizontal-center .poem-line {
            font-family: 'Noto Serif SC', serif;
            font-size: 1.3rem;
            letter-spacing: 0.1em;
            color: white;
            text-align: center;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
            position: relative;
        }

        .dark-mode .layout-horizontal-center .poem-line {
            color: #ffffff;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
        }



        /* Article mode for long texts */
        .article-mode {
            text-align: left !important;
            text-indent: 2em;
            max-width: 100%;
            margin: 0 auto;
            display: block !important; /* Ensure it behaves like a block */
        }

        /* Add decoration like quotes for horizontal quotes */
        .layout-horizontal-center::before {
            content: "“";
 font-family: serif;
            font-size: 4rem;
            position: absolute;
            top: 10px;
            left: 15px;
            opacity: 0.3;
            color: white;
        }

        /* Fallback for default layout - keep the original styling */
        .layout-horizontal {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 1.2rem;
            /* Increased from 1rem for better readability */
            font-weight: 500;
            text-align: center;
            width: 98%;
            /* Reduced from 85% for better centering */
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
            /* Enhanced shadow for better contrast */
            z-index: 10;
            /* Allow text to wrap to multiple lines */
            white-space: normal;
            word-wrap: break-word;
            overflow: hidden;
            /* Keep text within bounds */
            line-height: 1.8;
            /* Increased from 1.6 for seven-character poems */
            letter-spacing: 0.05em;
            /* Better spacing for Chinese characters */
            font-family: 'Noto Serif SC', 'STSong', 'Songti SC', serif;
            /* Use Chinese typography for proper character alignment */
        }

        .seal-decoration {
            position: absolute;
            bottom: 20px;
            right: 20px;
            width: 28px;
            height: 28px;
            background:
                radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
                linear-gradient(135deg, #c81e1e, #8a0a0a);
            color: white;
            border-radius: 4px;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: serif;
            border: 1px solid rgba(255, 255, 255, 0.5);
            box-shadow:
                0 2px 4px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            z-index: 11;
            opacity: 0.9;
            /* Add texture to the seal */
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
        }

        .color-block-container {
            position: relative;
            width: 100%;
            height: 200px;
            /* Increased from 170px for better text visibility */
            border-radius: 20px 20px 0 0;
            overflow: hidden;
        }

        .waterfall-content-section {
            padding: 12px 15px;
            /* Increased from 4px 6px for better spacing */
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 4px;
            /* Add gap between title and author */
            /* Paper-like texture background */
            background:
                /* Base color with subtle texture */
                linear-gradient(0deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 245, 240, 0.9) 100%),
                /* Paper fiber texture */
                repeating-linear-gradient(0deg,
                    rgba(0, 0, 0, 0.02) 0px,
                    rgba(0, 0, 0, 0.02) 1px,
                    transparent 1px,
                    transparent 2px),
                repeating-linear-gradient(90deg,
                    rgba(0, 0, 0, 0.02) 0px,
                    rgba(0, 0, 0, 0.02) 1px,
                    transparent 1px,
                    transparent 2px);
            /* Subtle inner shadow for depth */
            box-shadow:
                inset 2px 2px 4px rgba(0, 0, 0, 0.05),
                inset -2px -2px 4px rgba(255, 255, 255, 0.5);
        }

        .dark-mode .waterfall-content-section {
            /* Paper-like texture background for dark mode */
            background:
                /* Base color with subtle texture */
                linear-gradient(0deg, rgba(40, 40, 40, 0.9) 0%, rgba(30, 30, 30, 0.9) 100%),
                /* Paper fiber texture */
                repeating-linear-gradient(0deg,
                    rgba(255, 255, 255, 0.02) 0px,
                    rgba(255, 255, 255, 0.02) 1px,
                    transparent 1px,
                    transparent 2px),
                repeating-linear-gradient(90deg,
                    rgba(255, 255, 255, 0.02) 0px,
                    rgba(255, 255, 255, 0.02) 1px,
                    transparent 1px,
                    transparent 2px);
            /* Subtle inner shadow for depth in dark mode */
            box-shadow:
                inset 2px 2px 4px rgba(0, 0, 0, 0.2),
                inset -2px -2px 4px rgba(80, 80, 80, 0.1);
        }

        .waterfall-title {
            font-size: 1rem;
            /* Increased from 0.9rem for better readability */
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .waterfall-author {
            font-size: 0.8rem;
            /* Increased from 0.75rem for better readability */
            color: var(--text-tertiary);
            margin: 0;
            /* Removed margin, using gap in parent instead */
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .poem-content.symmetric-layout {
            display: flex;
        }

        .poem-content.waterfall-layout {
            display: none;
        }

        .poem-content.waterfall-active {
            display: none;
        }

        .poem-content.symmetric-active {
            display: flex;
        }
