/* Stacked List Items - Glass Effect with Tubes Background */

/* ========================================
   Electric Border Effect - Aquamarine
   ======================================== */

/* Hide the SVG filter definition */
.electric-filter-svg {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Wrapper that contains everything */
.electric-border-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0;
    border-radius: 12px;
    z-index: 1;
}

/* Glow layers - multiple for depth effect */
.electric-glow {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    pointer-events: none;
}

.electric-glow-1 {
    background: transparent;
    border: 3px solid rgba(127, 255, 212, 0.6); /* Aquamarine */
    filter: url(#electric-distortion) blur(8px);
    opacity: 0.8;
}

.electric-glow-2 {
    background: transparent;
    border: 2px solid rgba(0, 255, 255, 0.5); /* Cyan */
    filter: url(#electric-distortion) blur(12px);
    opacity: 0.6;
}

.electric-glow-3 {
    background: transparent;
    border: 4px solid rgba(64, 224, 208, 0.4); /* Turquoise */
    filter: url(#electric-distortion) blur(20px);
    opacity: 0.5;
}

/* The main distorted border */
.electric-border {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: transparent;
    border: 2px solid #7FFFD4; /* Aquamarine */
    filter: url(#electric-distortion);
    pointer-events: none;
    box-shadow:
        0 0 10px rgba(127, 255, 212, 0.8),
        0 0 20px rgba(127, 255, 212, 0.5),
        0 0 40px rgba(127, 255, 212, 0.3),
        inset 0 0 10px rgba(127, 255, 212, 0.2);
}

/* Shimmer overlay */
.electric-overlay {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(127, 255, 212, 0.1) 50%,
        transparent 70%
    );
    mix-blend-mode: overlay;
    pointer-events: none;
    animation: electric-shimmer 3s ease-in-out infinite;
}

@keyframes electric-shimmer {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-5%);
    }
    50% {
        opacity: 0.7;
        transform: translateX(5%);
    }
}

/* ========================================
   WebGL Cursor Tubes Canvas
   ======================================== */

#cursor-tubes-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   CSS Cursor Trail Effect (Fallback)
   Used when WebGL is not available
   ======================================== */

/* Container for cursor trail particles */
.cursor-trail-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Individual trail particle */
.cursor-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
    /* Glow effect matching your color scheme */
    box-shadow:
        0 0 6px currentColor,
        0 0 12px currentColor,
        0 0 24px currentColor;
}

/* Particle color variations - matches original tubes colors */
.cursor-particle--red {
    background: radial-gradient(circle, #CD5C5C 0%, #8B0000 70%, transparent 100%);
    color: #8B0000;
}

.cursor-particle--brown {
    background: radial-gradient(circle, #CD853F 0%, #A52A2A 70%, transparent 100%);
    color: #A52A2A;
}

.cursor-particle--gold {
    background: radial-gradient(circle, #FFD700 0%, #DAA520 70%, transparent 100%);
    color: #DAA520;
}

/* Fade out animation */
@keyframes particle-fade {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

/* Optional: Add subtle ambient glow orbs that float in background */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    opacity: 0.15;
    z-index: 0;
    animation: ambient-float 20s ease-in-out infinite;
}

.ambient-glow--1 {
    width: 300px;
    height: 300px;
    background: #8B0000;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.ambient-glow--2 {
    width: 400px;
    height: 400px;
    background: #DAA520;
    top: 60%;
    right: 10%;
    animation-delay: -7s;
}

.ambient-glow--3 {
    width: 250px;
    height: 250px;
    background: #A52A2A;
    bottom: 20%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes ambient-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -20px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 30px) scale(0.9);
    }
    75% {
        transform: translate(-30px, -10px) scale(1.05);
    }
}

.stacked-list-container {
    /* Glass effect - see through */
    background: linear-gradient(
        -75deg,
        rgba(250, 248, 240, 0.15),
        rgba(245, 240, 230, 0.25),
        rgba(250, 248, 240, 0.15)
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(127, 255, 212, 0.3); /* Subtle aquamarine inner border */
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.stacked-list-container > * {
    position: relative;
    z-index: 1;
}

.stacked-list-container h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #FAF8F0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: 0.05em;
    font-family: Georgia, 'Times New Roman', serif;
}

.stacked-list-container .subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: #DAA520;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 2.5rem;
    text-align: center;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* Section titles for multiple list sections */
.stacked-list-container .section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #CD5C5C;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 0.03em;
    font-family: Georgia, 'Times New Roman', serif;
}

.stacked-list-container .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, transparent, #CD5C5C, transparent);
    margin: 0.5rem auto 0;
}

/* Red accent line - traditional Japanese color */
.stacked-list-container h1::after {
    content: '';
    display: block;
    width: 120px;
    height: 3px;
    background: linear-gradient(to right, transparent, #CD5C5C, transparent);
    margin: 1rem auto 0;
}

.precepts-list {
    list-style: none;
    counter-reset: precept-counter;
    padding: 0;
    margin: 2rem 0;
}

.precepts-list li {
    --btn-border-width: 1px;
    counter-increment: precept-counter;
    position: relative;
    padding-left: 70px;
    padding-right: 70px;
    margin: 15px;
    text-align: justify;
    /* Glass background - see through */
    background: linear-gradient(
        -75deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.18),
        rgba(255, 255, 255, 0.08)
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 999px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #FAF8F0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    /* Multi-layer shadow for depth */
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1),
        0 4px 8px -2px rgba(0, 0, 0, 0.3),
        0 0 0 3px inset rgba(255, 255, 255, 0.08);
}

/* Gradient border using pseudo-element */
.precepts-list li::before {
    content: counter(precept-counter);
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    /* Glass number badge */
    background: linear-gradient(
        -75deg,
        rgba(139, 0, 0, 0.6),
        rgba(139, 0, 0, 0.8),
        rgba(139, 0, 0, 0.6)
    );
    color: #FAF8F0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    box-shadow:
        0 2px 8px rgba(139, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

/* Gradient border overlay */
.precepts-list li::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    padding: var(--btn-border-width);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.4),
        rgba(255, 255, 255, 0.1) 50%,
        rgba(0, 0, 0, 0.15)
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.precepts-list li:hover {
    transform: scale(0.98) translateX(8px);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.5),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.35),
        0 0 0 3px inset rgba(255, 255, 255, 0.12),
        0 0 20px rgba(139, 0, 0, 0.3);
}

.precepts-list li:hover::after {
    background: linear-gradient(
        180deg,
        rgba(139, 0, 0, 0.5),
        rgba(139, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.15)
    );
}

.author-attribution {
    margin-top: 3rem;
    font-style: italic;
    color: #DAA520;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    font-size: 2rem;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .electric-border-wrapper {
        margin: 1.5rem 1rem;
        padding: 4px;
    }

    .stacked-list-container {
        padding: 2rem 1.5rem;
    }

    .stacked-list-container h1 {
        font-size: 2.5rem;
    }

    .stacked-list-container .subtitle {
        font-size: 1.2rem;
        text-align: center;
    }

    .precepts-list li {
        padding: 1.25rem 1rem 1.25rem 4.5rem;
        font-size: 1rem;
    }

    .precepts-list li::before {
        left: 1rem;
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
}

/* Print styles */
@media print {
    .stacked-list-container {
        box-shadow: none;
        background: white;
    }

    .precepts-list li {
        page-break-inside: avoid;
    }
}
