/* CSS Variables for consistent theming */
:root {
    --primary-green: #3ff04d;
    --secondary-green: #32dd3b;
    --dark-green: #2b9731;
    --light-green: #48b14f;
    --accent-green: #179217;
    
    --bg-black: #000000;
    --bg-dark: #0a0a0a;
    --text-white: #ffffff;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-subtle: rgba(255, 255, 255, 0.6);
    
    --transition-speed: 0.4s;
    --transition-fast: 0.3s;
    --transition-slow: 0.8s;
    --transition-ease: ease;
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 15px 40px rgba(0, 0, 0, 0.5);
    --shadow-hard: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-green: 0 0 30px rgba(53, 240, 69, 0.644);
    
    --border-radius: 15px;
    --border-radius-large: 20px;
    --border-radius-full: 50px;
    
    --overlay-dark: rgba(0, 0, 0, 0.7);
    --overlay-strong: rgba(0, 0, 0, 0.8);
    --overlay-darker: rgba(0, 0, 0, 0.85);
    --overlay-darkest: rgba(0, 0, 0, 0.95);
    
    --green-alpha-light: rgba(74, 182, 83, 0.1);
    --green-alpha-medium: rgba(67, 214, 79, 0.3);
    --green-alpha-strong: rgba(49, 250, 66, 0.6);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-speed: 0.01s;
        --transition-fast: 0.01s;
        --transition-slow: 0.01s;
    }
    
    * {
        animation-duration: 0.01s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01s !important;
    }
}

/* Disable heavy background-attachment on touch/low-power devices */
@media (pointer: coarse), (max-width: 768px) {
    body::before {
        background-attachment: scroll;
        background-position: center top;
        filter: blur(2px) saturate(0.9);
    }

    /* Reduce glow and box-shadows for performance */
    .logo, .gallery-img, .ca-box, .btn, header h1 {
        box-shadow: none;
    }

    .animated-overlay, .animated-gradient {
        animation: none;
    }
}

/* Further reduce animations for low-motion preference */
@media (prefers-reduced-motion: reduce) {
    .animated-overlay, .animated-gradient, .logo, header, .gallery-img, .particles, .particle {
        animation: none !important;
        transition: none !important;
    }

    body::before, body::after {
        background-attachment: scroll;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-black);
    color: var(--text-white);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Laser background effect - darker overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/laser-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -3;
}

/* Dark overlay to darken the background image */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    z-index: -2;
    pointer-events: none;
}

/* Animated horizontal green glow overlay - darker and more subtle */
.animated-overlay {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(51, 250, 68, 0.336) 0%,
        rgba(48, 194, 56, 0.253) 25%,
        rgba(5, 177, 19, 0.37) 50%,
        rgba(119, 233, 125, 0.5) 75%,
        rgba(0, 255, 21, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: horizontalPulse 10s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes horizontalPulse {
    0% {
        background-position: -200% 0;
        opacity: 0.2;
    }
    50% {
        background-position: 0% 0;
        opacity: 0.4;
    }
    100% {
        background-position: 200% 0;
        opacity: 0.2;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

header {
    background: linear-gradient(135deg, var(--overlay-dark), var(--overlay-darker));
    text-align: center;
    padding: 80px 0;
    position: relative;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--green-alpha-medium);
}

/* Darker glowing border effect */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent,
        var(--green-alpha-light),
        transparent
    );
    background-size: 200% 100%;
    animation: slowBorderGlow 12s linear infinite;
    pointer-events: none;
}

@keyframes slowBorderGlow {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--text-white);
    text-shadow: 0 0 20px var(--green-alpha-strong);
    margin-bottom: 20px;
    animation: slowGlow 8s ease-in-out infinite alternate;
}

@keyframes slowGlow {
    from {
        text-shadow: 0 0 20px var(--green-alpha-strong);
    }
    to {
        text-shadow: 0 0 40px rgba(40, 255, 57, 0.8), 0 0 50px var(--green-alpha-medium);
    }
}

header p {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-muted);
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    border-radius: 50%;
    border: 4px solid var(--green-alpha-strong);
    animation: slowLogoGlow 10s ease-in-out infinite;
    box-shadow: var(--shadow-green);
}

@keyframes slowLogoGlow {
    0%, 100% {
        box-shadow: var(--shadow-green);
        border-color: var(--green-alpha-strong);
    }
    50% {
        box-shadow: 0 0 50px rgba(60, 255, 76, 0.7), 0 0 70px var(--green-alpha-medium);
        border-color: rgba(51, 196, 63, 0.8);
    }
}

h1, h2 {
    color: var(--primary-green);
}

h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    font-weight: 700;
    color: var(--text-white);
    text-shadow: 0 0 15px rgba(74, 182, 83, 0.5);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
    border-radius: 2px;
}

section {
    padding: 80px 0;
    position: relative;
}

#lore {
    background: var(--overlay-darker);
    color: var(--text-white);
    border-radius: var(--border-radius-large);
    margin: 40px 20px;
    padding: 60px 40px;
    box-shadow: var(--shadow-hard);
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid var(--green-alpha-light);
}

/* Darker glowing border effect for lore section */
#lore::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg,
        var(--green-alpha-light),
        var(--green-alpha-medium),
        var(--green-alpha-light)
    );
    background-size: 200% 100%;
    border-radius: 22px;
    animation: slowBorderGlow 15s linear infinite;
    z-index: -1;
}

#lore ul {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

#lore li {
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 500;
    border-left: 4px solid var(--primary-green);
    padding-left: 20px;
    margin: 15px 0;
    position: relative;
    transition: all var(--transition-speed) var(--transition-ease);
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

#lore li::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-green), var(--secondary-green));
    transform: scaleY(0);
    transition: transform var(--transition-speed) var(--transition-ease);
}

#lore li:hover::before {
    transform: scaleY(1);
}

#lore li:hover {
    transform: translateX(10px) translateY(-3px);
    color: var(--primary-green);
    background: rgba(74, 182, 83, 0.05);
    box-shadow: 0 8px 25px rgba(74, 182, 83, 0.15);
}

#lore p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-light);
}

#lore, #media, #links {
    animation: fadeInUp 1s ease-out;
}

#media {
    text-align: center;
}

#media p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 30px;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin: 40px 0;
}

.gallery-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-speed) var(--transition-ease);
    cursor: pointer;
    position: relative;
    border: 3px solid var(--green-alpha-medium);
    opacity: 0;
    transform: translateY(30px);
}

.gallery-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, var(--green-alpha-light), transparent);
    opacity: 0;
    transition: opacity var(--transition-speed) var(--transition-ease);
    border-radius: 12px;
}

.gallery-img:hover::before {
    opacity: 1;
}

.gallery-img:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 25px 50px var(--green-alpha-medium);
    border-color: var(--primary-green);
}

#links {
    text-align: center;
    position: relative;
}

#links::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--overlay-strong), var(--overlay-darker));
    border-radius: var(--border-radius-large);
    z-index: -1;
    border: 1px solid var(--green-alpha-light);
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--dark-green), var(--accent-green));
    color: white;
    padding: 18px 40px;
    margin: 15px;
    text-decoration: none;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all var(--transition-speed) var(--transition-ease);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--green-alpha-medium);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left var(--transition-slow) var(--transition-ease);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px var(--green-alpha-medium);
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
}

.btn:active {
    transform: translateY(-3px) scale(0.98);
    transition: all var(--transition-fast) var(--transition-ease);
}

/* Accessibility: visible focus styles for keyboard users */
a, .btn, .nav-link, .logo, .copy-btn {
    outline: none;
}

a:focus, .btn:focus, .nav-link:focus, .copy-btn:focus {
    box-shadow: 0 0 0 3px rgba(74,182,83,0.25), 0 0 10px rgba(74,182,83,0.12);
    border-radius: 8px;
}

/* Org chart styles */
.org-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Modern boxed link style to replace default blue links */
.link-box {
    display: inline-block;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(74,182,83,0.12), rgba(53,158,58,0.06));
    color: var(--text-white);
    border: 1px solid rgba(74,182,83,0.12);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.18s var(--transition-ease), box-shadow 0.18s var(--transition-ease), background 0.18s ease;
}

.link-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74,182,83,0.08);
    background: linear-gradient(180deg, rgba(74,182,83,0.18), rgba(53,158,58,0.08));
}

.link-box:active { transform: translateY(-1px); }

.link-box:focus {
    box-shadow: 0 0 0 4px rgba(74,182,83,0.16);
}

/* Apply boxed style to nav links and quick links by default */
.nav-menu a, .nav-link, .footer-section a, .org-chart a { display: inline-block; }
.nav-menu a.link-box, .nav-link.link-box { padding: 8px 12px; border-radius: 10px; }

.org-chart .group {
    background: rgba(255,255,255,0.02);
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(74,182,83,0.06);
}
.org-chart h3 {
    font-size: 1.1rem;
    color: var(--primary-green);
    margin-bottom: 12px;
}
.org-chart ul { list-style: none; padding: 0; margin: 0; }
.org-chart li { margin: 10px 0; }
.org-chart a { color: var(--text-white); font-weight: 700; text-decoration: none; }
.org-chart .role { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

/* Ensure contrast for handles and roles */
.org-chart a { color: #e6ffe6; }
.org-chart .role { color: rgba(230,255,230,0.9); }

/* Footer credit spacing */
footer .footer-bottom p { margin: 6px 0; }

footer {
    background: var(--overlay-darkest);
    text-align: center;
    padding: 40px 0;
    border-top: 2px solid var(--green-alpha-light);
}

footer p {
    color: var(--text-subtle);
    font-size: 1rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) var(--transition-ease);
    z-index: 1000;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 15px 30px var(--green-alpha-medium);
}

.back-to-top:active {
    transform: translateY(-1px) scale(1.05);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add the animated overlay as a pseudo-element */
body {
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/laser-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -3;
}

/* Create the dark overlay and animated gradient as separate layers */
.dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    z-index: -2;
    pointer-events: none;
}

.animated-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(74, 182, 83, 0.05) 0%,
        rgba(53, 158, 58, 0.1) 25%,
        rgba(74, 182, 83, 0.15) 50%,
        rgba(53, 158, 58, 0.1) 75%,
        rgba(74, 182, 83, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: horizontalPulse 10s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

/* Particle system styles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-green);
    animation: particleFloat 5s linear infinite;
    opacity: 0.6;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Scroll progress indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 9999;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
    width: 0%;
    transition: width 0.3s ease;
}

/* Contract Address Section */
#contract-address {
    padding: 40px 0;
    background: linear-gradient(135deg, var(--overlay-darker), var(--overlay-strong));
    border-top: 1px solid var(--green-alpha-light);
    border-bottom: 1px solid var(--green-alpha-light);
}

.ca-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--green-alpha-medium);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.ca-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--green-alpha-light), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.ca-box h3 {
    color: var(--primary-green);
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ca-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    background: var(--bg-black);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--green-alpha-medium);
    margin-top: 15px;
}

.ca-text {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--text-white);
    background: rgba(74, 182, 83, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--green-alpha-light);
    word-break: break-all;
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.copy-btn {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-ease);
    white-space: nowrap;
    box-shadow: var(--shadow-soft);
}

.copy-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px var(--green-alpha-medium);
}

.copy-btn:active {
    transform: translateY(0) scale(0.98);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #28a745, #20c997);
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Merch Button Special Styling */
.merch-btn {
    background: linear-gradient(135deg, var(--primary-green) 0%, #32cd32 100%);
    border: 2px solid var(--primary-green);
    position: relative;
    overflow: hidden;
    font-weight: 600;
}

.merch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.merch-btn:hover::before {
    left: 100%;
}

.merch-btn:hover {
    background: linear-gradient(135deg, #32cd32 0%, var(--primary-green) 100%);
    box-shadow: 0 0 30px rgba(74, 182, 83, 0.6), 0 5px 15px rgba(0,0,0,0.3);
    transform: translateY(-5px) scale(1.02);
    border-color: #32cd32;
}

.merch-btn:active {
    transform: translateY(-3px) scale(1.01);
}

@media (max-width: 768px) {
    .ca-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .ca-text {
        min-width: auto;
        font-size: 0.9rem;
    }
    
    .ca-box {
        padding: 20px 15px;
    }
    
    .merch-btn {
        margin-top: 10px;
        font-size: 0.9rem;
    }

    /* Org-chart mobile improvements: stack groups, larger text for readability */
    .org-chart {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .org-chart .group {
        padding: 14px;
    }

    .org-chart a { font-size: 1rem; }
    .org-chart .role { font-size: 0.98rem; }
}