/* gabs.games - Pop Art Vibrant Showcase */
/* Palette: #ffd93d, #ef4444, #3b82f6, #22c55e, #0a0a0a, #ffffff */

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

/* ===== BASE ===== */
html {
    scroll-behavior: smooth;
}

body {
    background: #ffd93d;
    color: #0a0a0a;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== HALFTONE OVERLAY ===== */
.halftone-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, #0a0a0a 1px, transparent 1px);
    background-size: 4px 4px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(1.4rem, 3vw, 2rem);
    text-decoration: underline;
    text-decoration-color: #0a0a0a;
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* ===== HERO ZONE ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background: #ffd93d;
}

.burst {
    position: absolute;
    width: 400px;
    height: 400px;
    background: #ffffff;
    clip-path: polygon(
        50% 0%, 63% 25%, 93% 7%, 75% 35%,
        100% 50%, 75% 65%, 93% 93%, 63% 75%,
        50% 100%, 37% 75%, 7% 93%, 25% 65%,
        0% 50%, 25% 35%, 7% 7%, 37% 25%
    );
    opacity: 0.25;
    z-index: 0;
    animation: burst-rotate 20s linear infinite;
}

.burst-1 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.burst-2 {
    width: 250px;
    height: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    animation-direction: reverse;
    animation-duration: 30s;
}

@keyframes burst-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 10vw, 7rem);
    -webkit-text-stroke: 3px #0a0a0a;
    color: #ffd93d;
    position: relative;
    z-index: 1;
    text-align: center;
    letter-spacing: -0.02em;
    text-shadow: 4px 4px 0 rgba(0,0,0,0.1);
    animation: brand-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

@keyframes brand-pop {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

.speech-bubble {
    background: #ffffff;
    border: 3px solid #0a0a0a;
    border-radius: 24px;
    padding: 0.75rem 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: bubble-float 3s ease-in-out infinite;
}

.speech-bubble:hover {
    transform: scale(1.08);
    box-shadow: 4px 4px 0 #0a0a0a;
}

.bubble-tail {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid #0a0a0a;
}

.bubble-tail::before {
    content: '';
    position: absolute;
    bottom: 3px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff;
}

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

.bubble-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: #0a0a0a;
}

.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    margin-top: 2rem;
    opacity: 0.7;
    position: relative;
    z-index: 1;
    animation: tagline-fade 1s 0.5s ease forwards;
    opacity: 0;
}

@keyframes tagline-fade {
    to { opacity: 0.7; }
}

/* ===== GAME BOARD ===== */
.games-section {
    position: relative;
    min-height: 200vh;
    padding: 4rem 1.5rem;
    background: #0a0a0a;
    overflow: hidden;
}

.games-section .section-title {
    color: #ffffff;
    text-decoration-color: #ffd93d;
    text-align: center;
}

.games-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.game-card {
    border: 3px solid #0a0a0a;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
}

.game-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.game-card:hover {
    transform: translateY(-6px) rotate(-1deg);
    box-shadow: 8px 8px 0 rgba(255,217,61,0.4);
}

.card-inner {
    padding: 1.5rem;
    position: relative;
}

.card-red { background: #ef4444; color: #ffffff; }
.card-blue { background: #3b82f6; color: #ffffff; }
.card-green { background: #22c55e; color: #ffffff; }
.card-yellow { background: #ffd93d; color: #0a0a0a; }

.badge {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(0,0,0,0.2);
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
}

.card-yellow .badge {
    background: rgba(0,0,0,0.12);
}

.game-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0.6rem 0 0.4rem;
    line-height: 1.2;
}

.game-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid rgba(0,0,0,0.15);
    padding-top: 0.75rem;
}

.player-count {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    opacity: 0.85;
}

.count-num {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.card-action {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    background: rgba(255,255,255,0.25);
    padding: 4px 14px;
    border-radius: 4px;
    border: 2px solid rgba(255,255,255,0.4);
    transition: background 0.2s ease;
}

.card-yellow .card-action {
    background: rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.2);
}

.game-card:hover .card-action {
    background: rgba(255,255,255,0.45);
}

.card-yellow:hover .card-action {
    background: rgba(0,0,0,0.2);
}

/* ===== LEADERBOARD ===== */
.leaderboard-section {
    position: relative;
    padding: 4rem 1.5rem;
    background: #ffffff;
    min-height: 70vh;
}

.leaderboard-section .section-title {
    text-align: center;
    text-decoration-color: #ef4444;
}

.leaderboard-list {
    max-width: 700px;
    margin: 0 auto;
}

.rank-row {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.2rem;
    border: 2px solid #0a0a0a;
    border-radius: 8px;
    margin-bottom: 0.6rem;
    gap: 1rem;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    opacity: 0;
    transform: translateX(-20px);
}

.rank-row.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.rank-row:hover {
    transform: translateX(6px);
    box-shadow: 4px 4px 0 #ffd93d;
}

.rank-highlight {
    background: rgba(255,217,61,0.2);
}

.rank-num {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    width: 44px;
    flex-shrink: 0;
    color: #0a0a0a;
}

.rank-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 0.7rem;
    color: #ffffff;
    flex-shrink: 0;
}

.rank-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    min-width: 100px;
}

.rank-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(0,0,0,0.08);
    border-radius: 4px;
    overflow: hidden;
}

.rank-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ffd93d, #ef4444);
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.rank-score {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
    color: #0a0a0a;
}

/* ===== POWER-UPS ===== */
.powerups-section {
    position: relative;
    padding: 5rem 1.5rem;
    background: #ffd93d;
    overflow: hidden;
    text-align: center;
}

.pow-burst, .zap-burst {
    display: inline-block;
    position: relative;
    z-index: 1;
}

.pow-burst span, .zap-burst span {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.5rem);
    -webkit-text-stroke: 2px #0a0a0a;
    color: #ef4444;
    display: inline-block;
    transform: rotate(-8deg);
    animation: pow-bounce 2s ease-in-out infinite;
}

.zap-burst span {
    color: #3b82f6;
    transform: rotate(8deg);
    animation-delay: 1s;
}

@keyframes pow-bounce {
    0%, 100% { transform: rotate(-8deg) scale(1); }
    50% { transform: rotate(-8deg) scale(1.1); }
}

.powerups-title {
    text-decoration-color: #0a0a0a;
    margin-top: 1.5rem;
}

.powerups-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 2rem 1rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.powerups-scroll::-webkit-scrollbar {
    display: none;
}

.powerup-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    background: #ffffff;
    border: 3px solid #0a0a0a;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    min-width: 110px;
}

.powerup-item:hover {
    transform: translateY(-4px) rotate(2deg);
    box-shadow: 4px 4px 0 #0a0a0a;
}

.powerup-icon svg {
    display: block;
}

.powerup-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0a0a0a;
}

/* ===== FOOTER ===== */
.footer-section {
    position: relative;
    padding: 5rem 2rem;
    background: #0a0a0a;
    text-align: center;
    overflow: hidden;
}

.burst-footer {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
    background: #ffd93d;
}

.footer-big {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: #ffd93d;
    -webkit-text-stroke: 2px #ffd93d;
    position: relative;
    z-index: 1;
}

.footer-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.75rem;
    position: relative;
    z-index: 1;
}

.footer-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: rgba(255,255,255,0.3);
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

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

    .rank-bar-wrap {
        display: none;
    }

    .rank-row {
        gap: 0.6rem;
    }

    .rank-name {
        min-width: auto;
        font-size: 0.85rem;
    }

    .powerups-scroll {
        padding: 1.5rem 0.5rem;
    }
}
