/* ppuzzl.party - Arcade Party Neon Theme */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Courier Prime', monospace;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.01em;
    color: #FFFFFF;
    background: #0A0E27;
    overflow-x: hidden;
}

/* ===== ANIMATED BACKGROUND SHAPES ===== */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.15;
}

.shape-diamond {
    width: 80px;
    height: 80px;
    background: transparent;
    border: 3px solid #FF00FF;
    transform: rotate(45deg);
}

.shape-square {
    width: 60px;
    height: 60px;
    background: transparent;
    border: 3px solid #00FFFF;
}

.shape-1 {
    top: 8%;
    left: 5%;
    border-color: #FF00FF;
    animation: floatRotate1 25s linear infinite;
}

.shape-2 {
    top: 15%;
    right: 10%;
    border-color: #00FFFF;
    width: 100px;
    height: 100px;
    animation: floatRotate2 35s linear infinite;
}

.shape-3 {
    top: 40%;
    left: 15%;
    border-color: #FFFF00;
    width: 50px;
    height: 50px;
    animation: floatRotate3 20s linear infinite;
}

.shape-4 {
    top: 55%;
    right: 20%;
    border-color: #FF00FF;
    width: 70px;
    height: 70px;
    animation: floatRotate1 30s linear infinite reverse;
}

.shape-5 {
    top: 70%;
    left: 30%;
    border-color: #00FFFF;
    width: 90px;
    height: 90px;
    animation: floatRotate2 45s linear infinite;
}

.shape-6 {
    top: 80%;
    right: 5%;
    border-color: #FFFF00;
    width: 55px;
    height: 55px;
    animation: floatRotate3 28s linear infinite;
}

.shape-7 {
    top: 25%;
    left: 60%;
    border-color: #FF6B35;
    width: 65px;
    height: 65px;
    opacity: 0.12;
    animation: floatRotate1 40s linear infinite;
}

.shape-8 {
    top: 90%;
    left: 50%;
    border-color: #FFB81C;
    width: 75px;
    height: 75px;
    opacity: 0.18;
    animation: floatRotate2 33s linear infinite reverse;
}

@keyframes floatRotate1 {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.15); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(0.85); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes floatRotate2 {
    0% { transform: rotate(45deg) scale(0.9); }
    33% { transform: rotate(165deg) scale(1.1); }
    66% { transform: rotate(285deg) scale(0.95); }
    100% { transform: rotate(405deg) scale(0.9); }
}

@keyframes floatRotate3 {
    0% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(180deg) translateY(-20px); }
    100% { transform: rotate(360deg) translateY(0); }
}

/* ===== CONFETTI CANVAS ===== */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===== GLITCH OVERLAY ===== */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.05s;
}

.glitch-overlay.active {
    opacity: 1;
    background:
        linear-gradient(transparent 0%, transparent 48%, rgba(0, 255, 255, 0.08) 48%, rgba(0, 255, 255, 0.08) 50%, transparent 50%, transparent 98%, rgba(255, 0, 255, 0.06) 98%, rgba(255, 0, 255, 0.06) 100%);
    background-size: 100% 4px;
    animation: glitchFlicker 0.35s steps(2) forwards;
}

@keyframes glitchFlicker {
    0% { opacity: 1; transform: translateX(-2px); }
    25% { opacity: 0.8; transform: translateX(2px); }
    50% { opacity: 1; transform: translateX(-1px); }
    75% { opacity: 0.6; transform: translateX(1px); }
    100% { opacity: 0; transform: translateX(0); }
}

/* ===== TYPOGRAPHY ===== */
h1, h2 {
    font-family: 'VT323', monospace;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.6), 0 0 40px rgba(0, 255, 255, 0.4);
}

h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.body-text {
    font-family: 'Courier Prime', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
    background: #0A0E27;
}

.hero-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: gridScroll 45s linear infinite;
    z-index: 0;
}

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

.hero-zone {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-zone-top {
    flex: 0 0 20%;
    padding-top: 2rem;
}

.hero-zone-center {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-zone-bottom {
    flex: 0 0 20%;
    padding-bottom: 2rem;
    overflow: hidden;
}

.arcade-badge {
    font-family: 'VT323', monospace;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #FFFF00;
    border: 2px solid #FFFF00;
    padding: 0.4rem 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    animation: pulseBadge 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 7rem);
    text-shadow: 0 0 30px #FF00FF, 0 0 50px #00FFFF, 0 0 80px rgba(255, 0, 255, 0.3);
    color: #FFFFFF;
    text-align: center;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.6rem);
    color: #00FFFF;
    letter-spacing: 0.06em;
    margin-top: 0.8rem;
    display: flex;
    gap: 0.5em;
}

.subtitle-word {
    display: inline-block;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInWord 0.6s ease forwards;
}

.subtitle-word:nth-child(1) { animation-delay: 0.5s; }
.subtitle-word:nth-child(2) { animation-delay: 1.1s; }

@keyframes slideInWord {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Motif Strip */
.motif-strip {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.motif-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.motif-icon svg {
    animation: slowSpin 30s linear infinite;
}

.motif-1 svg { animation-duration: 25s; }
.motif-2 svg { animation-duration: 30s; }
.motif-3 svg { animation-duration: 35s; }
.motif-4 svg { animation-duration: 28s; }
.motif-5 svg { animation-duration: 32s; }
.motif-6 svg { animation-duration: 27s; }

@keyframes slowSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.motif-icon span {
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    color: #E8E8E8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.section-dark {
    background: #0A0E27;
}

.section-light {
    background: #F5F5F5;
    color: #1A1F3A;
}

.section-wave-top {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    z-index: 3;
    line-height: 0;
}

.section-wave-top svg {
    width: 100%;
    height: 40px;
    display: block;
}

.section-heading {
    font-family: 'VT323', monospace;
    font-size: clamp(1.8rem, 6vw, 5.2rem);
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.6), 0 0 40px rgba(0, 255, 255, 0.4);
    color: #FFFFFF;
    text-align: center;
    letter-spacing: 0.08em;
}

.section-heading-dark {
    color: #1A1F3A;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.3), 0 0 40px rgba(0, 255, 255, 0.2);
}

/* Glitch text effect */
.glitch-text {
    position: relative;
}

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

.glitch-text.glitching::before {
    color: #FF00FF;
    opacity: 0.8;
    animation: glitchShift1 0.3s steps(2) forwards;
}

.glitch-text.glitching::after {
    color: #00FFFF;
    opacity: 0.8;
    animation: glitchShift2 0.3s steps(2) forwards;
}

@keyframes glitchShift1 {
    0% { transform: translate(-2px, -1px); }
    50% { transform: translate(2px, 1px); }
    100% { transform: translate(0, 0); opacity: 0; }
}

@keyframes glitchShift2 {
    0% { transform: translate(2px, 1px); }
    50% { transform: translate(-2px, -1px); }
    100% { transform: translate(0, 0); opacity: 0; }
}

/* ===== BENTO GRID ===== */
.bento-grid {
    display: grid;
    gap: 1.2rem;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-about {
    grid-template-columns: repeat(7, 1fr);
    padding-top: 5rem;
}

.bento-about .bento-tall {
    grid-column: 1 / 5;
    grid-row: 1 / 3;
}

.bento-about .bento-wide {
    grid-column: 5 / 8;
    grid-row: 1 / 2;
}

.bento-about .bento-square:nth-child(3) {
    grid-column: 5 / 7;
    grid-row: 2 / 3;
}

.bento-about .bento-square:nth-child(4) {
    grid-column: 7 / 8;
    grid-row: 2 / 3;
}

.bento-cell {
    background: rgba(26, 31, 58, 0.6);
    border: 1px solid rgba(255, 0, 255, 0.2);
    border-radius: 8px;
    padding: 1.8rem;
    transition: border-color 0.3s, transform 0.3s;
    opacity: 0;
    transform: translateY(30px);
}

.bento-cell.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s, box-shadow 0.3s;
}

.section-light .bento-cell {
    background: #FFFFFF;
    border-color: rgba(26, 31, 58, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.bento-cell:hover {
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

/* Section 1: About */
.bento-tall h2 {
    margin-bottom: 1.2rem;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
}

.bento-tall .body-text {
    color: #E8E8E8;
    font-size: 1rem;
    line-height: 1.7;
}

/* Arcade screen */
.arcade-screen {
    position: relative;
    background: #000;
    border: 3px solid #00FFFF;
    border-radius: 6px;
    padding: 1.5rem;
    min-height: 120px;
    overflow: hidden;
}

.screen-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.screen-content {
    position: relative;
    z-index: 2;
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    color: #00FFFF;
    display: flex;
    align-items: center;
}

.blink-cursor {
    animation: cursorBlink 0.8s steps(1) infinite;
    margin-right: 0.3rem;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Pixel counters */
.pixel-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.counter-value {
    font-family: 'VT323', monospace;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #FFB81C;
    text-shadow: 0 0 15px rgba(255, 184, 28, 0.5);
}

.counter-label {
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    color: #E8E8E8;
    letter-spacing: 0.1em;
    margin-top: 0.4rem;
}

/* ===== SECTION 2: EXPLORE ===== */
.bento-explore {
    grid-template-columns: repeat(3, 1fr);
    padding-top: 5rem;
}

.bento-wide-full {
    grid-column: 1 / -1;
    background: transparent;
    border: none;
    padding: 1rem;
}

.section-light .bento-wide-full {
    background: transparent;
    box-shadow: none;
}

.bento-wide-full:hover {
    border-color: transparent;
    box-shadow: none;
}

.bento-card {
    text-align: center;
    padding: 2.5rem 1.8rem;
}

.card-icon {
    margin-bottom: 1.2rem;
}

.card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    color: #1A1F3A;
    margin-bottom: 0.8rem;
    letter-spacing: 0.04em;
}

.card-desc {
    font-family: 'Courier Prime', monospace;
    font-size: 0.95rem;
    color: #1A1F3A;
    line-height: 1.6;
    opacity: 0.85;
}

.card-1:hover { border-color: #FF00FF; box-shadow: 0 0 25px rgba(255, 0, 255, 0.15); }
.card-2:hover { border-color: #00FFFF; box-shadow: 0 0 25px rgba(0, 255, 255, 0.15); }
.card-3:hover { border-color: #FFB81C; box-shadow: 0 0 25px rgba(255, 184, 28, 0.15); }

/* ===== SECTION 3: PUZZLE ===== */
.bento-play {
    grid-template-columns: 2fr 1fr;
    padding-top: 5rem;
}

.bento-play .bento-wide-full {
    grid-column: 1 / -1;
}

.puzzle-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 300px;
    margin: 0 auto 1.5rem;
}

.puzzle-piece {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'VT323', monospace;
    font-size: 2rem;
    color: #0A0E27;
    background: linear-gradient(135deg, #FF00FF, #00FFFF);
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    user-select: none;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 0, 255, 0.3);
}

.puzzle-piece:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 255, 0.5);
}

.puzzle-piece:active {
    transform: scale(0.95);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.puzzle-empty {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    box-shadow: none;
    cursor: default;
}

.puzzle-empty:hover {
    transform: none;
    box-shadow: none;
}

.puzzle-piece.correct {
    background: linear-gradient(135deg, #F7931E, #FFB81C);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), 0 0 15px rgba(247, 147, 30, 0.4);
}

.puzzle-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.move-counter {
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    color: #FFFF00;
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.4);
}

/* Arcade button */
.arcade-btn {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: #0A0E27;
    background: #FF00FF;
    border: none;
    padding: 0.6rem 1.8rem;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 0 #990099, 0 0 15px rgba(255, 0, 255, 0.4);
    transition: transform 0.1s, box-shadow 0.1s;
    transform: rotate(-1deg);
}

.arcade-btn:hover {
    transform: scale(1.08) rotate(1deg);
    box-shadow: 0 5px 0 #990099, 0 0 25px rgba(255, 0, 255, 0.6);
    background: #00FFFF;
    box-shadow: 0 5px 0 #009999, 0 0 25px rgba(0, 255, 255, 0.6);
}

.arcade-btn:active {
    transform: scale(0.95) rotate(-1deg);
    box-shadow: 0 1px 0 #990099;
}

.arcade-btn-big {
    font-size: 1.8rem;
    padding: 1rem 3rem;
    background: #FFFF00;
    color: #0A0E27;
    box-shadow: 0 6px 0 #999900, 0 0 30px rgba(255, 255, 0, 0.4);
    transform: rotate(1deg);
}

.arcade-btn-big:hover {
    transform: scale(1.1) rotate(-1deg);
    background: #FF00FF;
    color: #FFFFFF;
    box-shadow: 0 7px 0 #990099, 0 0 40px rgba(255, 0, 255, 0.6);
}

.arcade-btn-big:active {
    transform: scale(0.95) rotate(1deg);
    box-shadow: 0 2px 0 #999900;
}

/* Score panel */
.bento-score-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
}

.score-display {
    text-align: center;
}

.score-label {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: #E8E8E8;
    letter-spacing: 0.15em;
    margin-bottom: 0.4rem;
}

.score-value {
    font-family: 'VT323', monospace;
    font-size: 2.5rem;
    color: #FFB81C;
    text-shadow: 0 0 15px rgba(255, 184, 28, 0.5);
}

.status-text {
    color: #00FFFF;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

/* ===== SECTION 4: COMMUNITY ===== */
.bento-community {
    grid-template-columns: 1fr;
    padding-top: 5rem;
    text-align: center;
}

.bento-cta-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 3rem 2rem;
}

.cta-text {
    font-family: 'Courier Prime', monospace;
    font-size: 1.1rem;
    color: #1A1F3A;
    max-width: 600px;
    line-height: 1.7;
}

/* Ticker */
.bento-ticker {
    overflow: hidden;
    padding: 1rem 0;
    border: 1px solid rgba(26, 31, 58, 0.15);
}

.ticker-strip {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 20s linear infinite;
}

.ticker-item {
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    color: #FF00FF;
    letter-spacing: 0.1em;
    padding: 0 0.5rem;
}

.ticker-sep {
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    color: #00FFFF;
    padding: 0 0.5rem;
}

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

/* ===== FOOTER ===== */
.footer-drawer {
    position: relative;
    z-index: 10;
    background: #0A0E27;
    border-top: 2px solid rgba(255, 0, 255, 0.3);
    text-align: center;
}

.footer-toggle {
    background: none;
    border: none;
    color: #00FFFF;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.6rem 2rem;
    width: 100%;
    transition: color 0.2s;
}

.footer-toggle:hover {
    color: #FF00FF;
}

.footer-toggle-arrow {
    display: inline-block;
    transition: transform 0.3s;
}

.footer-drawer.open .footer-toggle-arrow {
    transform: rotate(180deg);
}

.footer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 2rem;
}

.footer-drawer.open .footer-content {
    max-height: 80px;
    padding: 0.8rem 2rem 1.2rem;
}

.footer-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: #E8E8E8;
    opacity: 0.6;
}

/* ===== STAGGER ANIMATIONS ===== */
.bento-cell:nth-child(1).visible { transition-delay: 0ms; }
.bento-cell:nth-child(2).visible { transition-delay: 50ms; }
.bento-cell:nth-child(3).visible { transition-delay: 100ms; }
.bento-cell:nth-child(4).visible { transition-delay: 150ms; }
.bento-cell:nth-child(5).visible { transition-delay: 200ms; }

/* ===== PARALLAX DEPTH ===== */
.shape {
    will-change: transform;
}

/* ===== SECTION PADDING SCALING ===== */
#section-about {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

#section-explore {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

#section-play {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}

#section-community {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .bento-about {
        grid-template-columns: 1fr;
    }

    .bento-about .bento-tall,
    .bento-about .bento-wide,
    .bento-about .bento-square:nth-child(3),
    .bento-about .bento-square:nth-child(4) {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .bento-explore {
        grid-template-columns: 1fr;
    }

    .bento-play {
        grid-template-columns: 1fr;
    }

    .motif-strip {
        gap: 1.5rem;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }
}

@media (max-width: 600px) {
    .bento-grid {
        padding: 2rem 1rem;
        gap: 0.8rem;
    }

    .bento-cell {
        padding: 1.2rem;
    }

    .motif-strip {
        gap: 1rem;
    }

    .motif-icon svg {
        width: 30px;
        height: 30px;
    }
}
