/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #0a0015;
    color: #d4a5ff;
    overflow-x: hidden;
    position: relative;
}

/* === BACKGROUND EFFECTS === */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(138, 43, 226, 0.03) 0px,
            rgba(138, 43, 226, 0.03) 1px,
            transparent 1px,
            transparent 2px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(138, 43, 226, 0.03) 0px,
            rgba(138, 43, 226, 0.03) 1px,
            transparent 1px,
            transparent 2px
        );
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, #0a0015 100%);
    pointer-events: none;
    z-index: 1;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 2;
    animation: scanline 8s linear infinite;
}

.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #8a2be2, #9d4edd, #c77dff);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.1s;
}

/* === CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* === HEADER === */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: rgba(138, 43, 226, 0.1);
    border: 2px solid #8a2be2;
    border-radius: 0;
    box-shadow: 
        0 0 20px rgba(138, 43, 226, 0.5),
        inset 0 0 20px rgba(138, 43, 226, 0.1);
    position: relative;
}

.header::before,
.header::after {
    content: '░▒▓█';
    position: absolute;
    top: 10px;
    font-size: 12px;
    color: #8a2be2;
    animation: blink 1s infinite;
}

.header::before {
    left: 10px;
}

.header::after {
    right: 10px;
}

.glitch-text {
    font-size: 48px;
    font-weight: bold;
    color: #d4a5ff;
    text-shadow: 
        2px 2px 0 #8a2be2,
        -2px -2px 0 #c77dff,
        0 0 10px #8a2be2,
        0 0 20px #8a2be2;
    position: relative;
    display: inline-block;
    animation: glitch-text 5s infinite;
}

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

.glitch-text::before {
    animation: glitch-before 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translateX(-2px);
}

.glitch-text::after {
    animation: glitch-after 2s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    transform: translateX(2px);
}

.subtitle {
    margin-top: 15px;
}

.pixel-text {
    font-size: 16px;
    color: #ff00ff;
    text-shadow: 0 0 5px #ff00ff;
    letter-spacing: 3px;
}

/* === MARQUEE === */
.marquee-container {
    background: #1a0033;
    border: 1px solid #8a2be2;
    margin-bottom: 30px;
    overflow: hidden;
    padding: 10px 0;
}

.marquee {
    display: flex;
    animation: marquee 20s linear infinite;
}

.marquee span {
    white-space: nowrap;
    color: #ff00ff;
    font-size: 14px;
    padding-right: 100%;
    text-shadow: 0 0 5px #ff00ff;
}

/* === NAVIGATION PANEL === */
.nav-panel {
    background: rgba(26, 0, 51, 0.8);
    border: 2px solid #8a2be2;
    margin-bottom: 30px;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

.panel-header {
    background: #1a0033;
    padding: 10px 15px;
    border-bottom: 2px solid #8a2be2;
    color: #d4a5ff;
    font-weight: bold;
    text-align: center;
    font-size: 18px;
}

.panel-content {
    padding: 20px;
}

.ascii-art {
    font-family: monospace;
    font-size: 12px;
    color: #8a2be2;
    text-align: center;
    white-space: pre;
    line-height: 1.2;
}

/* === FORUM GRID === */
.forum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.forum-card {
    background: rgba(26, 0, 51, 0.9);
    border: 2px solid #8a2be2;
    padding: 0;
    transition: all 0.3s;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.forum-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8a2be2, #c77dff, #8a2be2);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.forum-card:hover::before {
    opacity: 1;
    animation: border-glow 1.5s linear infinite;
}

.forum-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 5px 20px rgba(138, 43, 226, 0.6),
        inset 0 0 20px rgba(138, 43, 226, 0.2);
}

.card-header {
    background: #1a0033;
    padding: 15px;
    border-bottom: 2px solid #8a2be2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.board-icon {
    font-size: 24px;
    animation: float 3s ease-in-out infinite;
}

.card-header h2 {
    color: #d4a5ff;
    font-size: 24px;
    margin: 0;
    text-shadow: 0 0 10px #8a2be2;
}

.card-body {
    padding: 20px 15px;
}

.board-desc {
    color: #b794f6;
    margin-bottom: 15px;
    font-size: 14px;
}

.stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(138, 43, 226, 0.2);
    padding: 5px 10px;
    border: 1px solid #8a2be2;
    font-size: 12px;
    color: #ff00ff;
}

.board-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #8a2be2;
    padding: 15px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s;
}

.board-link:hover {
    background: #9d4edd;
    padding-left: 25px;
}

.arrow {
    font-size: 20px;
    transition: transform 0.3s;
}

.board-link:hover .arrow {
    transform: translateX(5px);
}

/* === SIDEBAR === */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-box {
    background: rgba(26, 0, 51, 0.8);
    border: 2px solid #8a2be2;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

.info-header {
    background: #1a0033;
    padding: 10px 15px;
    border-bottom: 2px solid #8a2be2;
    text-align: center;
    font-weight: bold;
}

.info-content {
    padding: 15px;
}

.info-content p {
    margin-bottom: 10px;
    color: #d4a5ff;
    font-size: 14px;
}

.rules-box {
    border-color: #ff00ff;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.rules-box .info-header {
    border-bottom-color: #ff00ff;
    background: #1a0033;
}

.pixel-container {
    background: rgba(26, 0, 51, 0.8);
    border: 2px solid #8a2be2;
    padding: 20px;
}

.pixel-box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    text-align: center;
}

.pixel-emoji {
    font-size: 32px;
    display: block;
    animation: pixel-bounce 2s ease-in-out infinite;
}

.pixel-emoji:nth-child(1) { animation-delay: 0s; }
.pixel-emoji:nth-child(2) { animation-delay: 0.2s; }
.pixel-emoji:nth-child(3) { animation-delay: 0.4s; }
.pixel-emoji:nth-child(4) { animation-delay: 0.6s; }

/* === FOOTER === */
.footer {
    background: rgba(26, 0, 51, 0.9);
    border: 2px solid #8a2be2;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
}

.footer-text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 14px;
}

.separator {
    color: #8a2be2;
}

.glitch-small {
    position: relative;
    color: #d4a5ff;
    text-shadow: 0 0 5px #8a2be2;
}

.timestamp {
    color: #ff00ff;
    font-weight: bold;
}

.footer-ascii {
    font-size: 16px;
    color: #8a2be2;
    letter-spacing: 2px;
    margin-top: 10px;
}

/* === ANIMATIONS === */
@keyframes glitch-text {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, -2px);
    }
}

@keyframes glitch-before {
    0%, 95%, 100% {
        transform: translateX(0);
    }
    96% {
        transform: translateX(-5px);
        color: #ff00ff;
    }
    98% {
        transform: translateX(5px);
        color: #00ffff;
    }
}

@keyframes glitch-after {
    0%, 93%, 100% {
        transform: translateX(0);
    }
    94% {
        transform: translateX(5px);
        color: #00ffff;
    }
    96% {
        transform: translateX(-5px);
        color: #ff00ff;
    }
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

.blink {
    animation: blink 1s infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pixel-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes border-glow {
    0%, 100% { background-position: 0 0; }
    50% { background-position: 400% 0; }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 32px;
    }
    
    .forum-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-text {
        flex-direction: column;
        gap: 10px;
    }
    
    .pixel-box {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) {
    .container {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 20px;
        grid-template-areas:
            "header header"
            "marquee marquee"
            "nav nav"
            "main sidebar"
            "footer footer";
    }
    
    .header { grid-area: header; }
    .marquee-container { grid-area: marquee; }
    .nav-panel { grid-area: nav; }
    .forum-grid { grid-area: main; }
    .sidebar { grid-area: sidebar; }
    .footer { grid-area: footer; }
}