/* Base styles */
body {
    background-color: #050505;
    color: #e0e0e0;
    overflow-x: hidden;
    font-family: "Chakra Petch", sans-serif;
}

/* Scanline effect */
.scanlines {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 50;
}

.hero-bg {
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.neon-text {
    text-shadow: 0 0 10px rgba(204, 255, 0, 0.7);
}

.neon-box {
    box-shadow: 0 0 15px rgba(204, 255, 0, 0.2);
    border: 1px solid #ccff00;
}

.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(38px, 9999px, 84px, 0); }
    20% { clip: rect(12px, 9999px, 96px, 0); }
    40% { clip: rect(68px, 9999px, 4px, 0); }
    60% { clip: rect(18px, 9999px, 55px, 0); }
    80% { clip: rect(92px, 9999px, 16px, 0); }
    100% { clip: rect(48px, 9999px, 74px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(15px, 9999px, 62px, 0); }
    20% { clip: rect(82px, 9999px, 14px, 0); }
    40% { clip: rect(2px, 9999px, 34px, 0); }
    60% { clip: rect(54px, 9999px, 91px, 0); }
    80% { clip: rect(22px, 9999px, 46px, 0); }
    100% { clip: rect(72px, 9999px, 12px, 0); }
}

/* Marquee animation */
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.marquee {
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    font-family: "Share Tech Mono", monospace;
    font-weight: bold;
    font-size: 1.125rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a; 
}
::-webkit-scrollbar-thumb {
    background: #2a2a2a; 
    border: 1px solid #ccff00;
}
::-webkit-scrollbar-thumb:hover {
    background: #ccff00; 
}

/* Selection style */
::selection {
    background-color: #ccff00;
    color: black;
}

/* Tailwind custom color classes that need to be preserved */
.chem-acid { color: #ccff00; }
.chem-dark { color: #0a0a0a; }
.chem-steel { color: #2a2a2a; }
.chem-rust { color: #8b4513; }
.chem-glow { color: rgba(204, 255, 0, 0.6); }
.chem-gray { color: #888888; }

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 500px;
}

/* Mobile responsive calendar */
@media (max-width: 640px) {
    .modal-container {
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .modal-large {
        max-width: 100%;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-title {
        font-size: 1.125rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Calendar controls */
    .calendar-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .calendar-controls button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    #calendar-month-year {
        font-size: 1.25rem;
        order: -1;
    }
    
    /* Calendar grid */
    .calendar-day {
        min-height: 40px;
        padding: 0.25rem;
    }
    
    .calendar-day .day-number {
        font-size: 0.875rem;
    }
    
    .calendar-day .patch-badge {
        font-size: 0.5rem;
        padding: 0.0625rem 0.25rem;
    }
    
    .weekday-header > div {
        font-size: 0.625rem;
        padding: 0.5rem 0;
    }
    
    /* Patch legend */
    .patch-legend {
        font-size: 0.75rem;
        gap: 0.5rem;
    }
    
    .patch-legend .w-4 {
        width: 0.75rem;
        height: 0.75rem;
    }
}

/* Background colors */
.bg-chem-acid { background-color: #ccff00; }
.bg-chem-dark { background-color: #0a0a0a; }
.bg-chem-steel { background-color: #2a2a2a; }

/* Border colors */
.border-chem-acid { border-color: #ccff00; }
.border-chem-steel { border-color: #2a2a2a; }
.border-chem-rust { border-color: #8b4513; }

/* Accessibility - Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only.focus\:not-sr-only:focus {
    position: absolute;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}
