/* CSS Zen Garden Matrix Theme */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono:wght@400&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background: #000;
    color: #00ff41;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Subtle grid overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('images/matrixrain1.jpg') no-repeat center center/cover; /* Fallback image */
}

/* Overlay to ensure content readability over background */
body > .page-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    z-index: 0;
    pointer-events: none;
}

/* Header Styles */
header {
    text-align: center;
    padding: 60px 20px;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)),
        url('images/matrixriver.jpg') center/cover;
    border-bottom: 2px solid #00ff41;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.03) 2px,
        rgba(0, 255, 65, 0.03) 4px
    );
    pointer-events: none;
}

h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    color: #00ff41;
    text-shadow: 
        0 0 5px #00ff41,
        0 0 10px #00ff41,
        0 0 20px #00ff41;
    margin-bottom: 10px;
    animation: glitch 2.2s linear infinite;
}

@keyframes glitch {
    0%, 94%, 96%, 100% { 
        transform: translateX(0);
        text-shadow: 
            0 0 5px #00ff41,
            0 0 10px #00ff41,
            0 0 20px #00ff41;
    }
    95% { 
        transform: translateX(-2px);
        text-shadow: 
            0 0 5px #00ff41,
            0 0 10px #ff00ff,
            0 0 20px #00ff41;
    }
    97% { 
        transform: translateX(2px);
        text-shadow: 
            0 0 5px #00ff41,
            0 0 10px #00ffff,
            0 0 20px #00ff41;
    }
}

h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    color: #8fbc8f;
    text-transform: uppercase;
    letter-spacing: 3px;
    overflow: hidden;
    border-right: 3px solid #00ff41;
    white-space: nowrap;
    margin: 0 auto;
    width: 0;
    animation: 
        typing 5.5s steps(40, end) forwards,
        blink-caret 1.75s step-end infinite;
    animation-delay: 0s, 0s;
}

@keyframes typing {
    from { 
        width: 0;
    }
    to { 
        width: 100%;
        max-width: 600px;
    }
}

@keyframes blink-caret {
    from, to { 
        border-color: transparent;
    }
    50% { 
        border-color: #00ff41;
        box-shadow: 0 0 5px #00ff41;
    }
}

/* Section Styles */
.intro, .main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.summary, .preamble, .explanation, .participation, .benefits, .requirements {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8));
    margin: 30px 0;
    padding: 30px;
    border: 1px solid #00ff41;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 65, 0.3),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.summary:hover, .preamble:hover, .explanation:hover, 
.participation:hover, .benefits:hover, .requirements:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 30px rgba(0, 255, 65, 0.5),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
}

.summary::before, .preamble::before, .explanation::before, 
.participation::before, .benefits::before, .requirements::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 65, 0.1),
        transparent
    );
    transition: left 0.7s;
}

.summary:hover::before, .preamble:hover::before, .explanation:hover::before,
.participation:hover::before, .benefits:hover::before, .requirements:hover::before {
    left: 100%;
}

h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    color: #00ff41;
    text-shadow: 0 0 10px #00ff41;
    margin-bottom: 20px;
    border-bottom: 1px solid #00ff41;
    padding-bottom: 10px;
    position: relative;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #00ff41;
    box-shadow: 0 0 10px #00ff41;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

p {
    margin-bottom: 15px;
    color: #8fbc8f;
    text-shadow: 0 0 5px rgba(143, 188, 143, 0.5);
}

/* Links */
a {
    color: #00ff41;
    text-decoration: none;
    text-shadow: 0 0 5px #00ff41;
    transition: all 0.3s;
    position: relative;
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #00ff41;
    box-shadow: 0 0 5px #00ff41;
    transition: width 0.3s;
}

a:hover::after {
    width: 100%;
}

/* Sidebar */
.sidebar {
    background: rgba(0, 0, 0, 0.95);
    padding: 30px;
    border-top: 2px solid #00ff41;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 1px,
        rgba(0, 255, 65, 0.05) 1px,
        rgba(0, 255, 65, 0.05) 2px
    );
    pointer-events: none;
}

/* Design Selection */
.design-selection {
    margin-bottom: 40px;
    padding: 25px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.design-selection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at center, rgba(0, 255, 65, 0.15) 0%, transparent 70%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.05) 2px,
            rgba(0, 255, 65, 0.05) 4px
        );
    pointer-events: none;
}

/* Design Archives */
.design-archives {
    margin-bottom: 40px;
    padding: 25px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 5px;
    background: radial-gradient(circle at center, rgba(0, 255, 65, 0.15) 0%, transparent 70%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.05) 2px,
            rgba(0, 255, 65, 0.05) 4px
        ),
        url('images/matrixpussycat.jpg');
    background-size: 70%;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: visible;
}

/* Resources */
.design-selection {
    margin-bottom: 40px;
    padding: 25px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 5px;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8)),
        url('images/matrixmonk.jpg') center/cover;
    position: relative;
    overflow: hidden;
}
.zen-resources {
 margin-bottom: 40px;
    padding: 25px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 5px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), url('images/agents.jpg') center/cover;
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: visible;
}

.zen-resources::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(0, 255, 65, 0.03) 3px,
            rgba(0, 255, 65, 0.03) 6px
        );
    pointer-events: none;
}

.sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.sidebar ul {
    list-style: none;
    position: relative;
    z-index: 1;
}

.sidebar li {
    margin-bottom: 10px;
    padding: 8px;
    border-left: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.sidebar li:hover {
    border-left-color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    transform: translateX(5px);
}

.design-name, .designer-name {
    display: inline-block;
    margin-right: 10px;
}

.designer-name {
    color: #8fbc8f;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.9);
    text-align: center;
    padding: 30px 20px;
    border-top: 2px solid #00ff41;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(180deg, rgba(0, 255, 65, 0.1) 0%, transparent 30%, transparent 70%, rgba(0, 255, 65, 0.1) 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.05) 2px,
            rgba(0, 255, 65, 0.05) 4px
        );
    pointer-events: none;
}

footer a {
    display: inline-block;
    margin: 0 15px;
    padding: 10px 15px;
    border: 1px solid #00ff41;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.7);
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

footer a:hover {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

/* Abbreviations */
abbr {
    text-decoration: none;
    border-bottom: 1px dotted #00ff41;
    cursor: help;
}

/* Extra divs for additional styling */
.extra1, .extra2, .extra3, .extra4, .extra5, .extra6 {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    .main {
        order: 1;
    }
    
    .sidebar {
        order: 2;
    }
    
    h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    h3 {
        font-size: 1.4rem;
    }
    
    .intro, .main {
        padding: 20px 15px;
    }
    
    .summary, .preamble, .explanation, .participation, .benefits, .requirements {
        padding: 20px;
        margin: 20px 0;
    }
    
    .sidebar {
        padding: 20px 15px;
    }
    
    .design-selection, .design-archives, .zen-resources {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    footer a {
        margin: 5px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .matrix-character {
        font-size: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .intro, .main, .sidebar {
        padding: 15px 10px;
    }
    
    .summary, .preamble, .explanation, .participation, .benefits, .requirements {
        padding: 15px;
    }
    
    footer a {
        display: block;
        margin: 5px 0;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .matrix-character {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark theme */
}

/* Print styles */
@media print {
    .matrix-character,
    body::before {
        display: none;
    }
    
    .page-wrapper {
        background: white;
        color: black;
    }
    
    a {
        color: black;
        text-shadow: none;
    }
    
    header, .summary, .preamble, .explanation, 
    .participation, .benefits, .requirements,
    .sidebar, footer {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}
