/* ============================================
   WOOFIE GAMES - SHELL CSS
   game-shell.css
   ============================================ */

:root {
    --wg-bg-deep: #1A5A68;
    --wg-bg-main: #2D7D8A;
    --wg-bg-light: #3A9BAA;
    --wg-accent-orange: #E8863A;
    --wg-accent-yellow: #F5B342;
    --wg-accent-blue: #5BB4C9;
    --wg-accent-green: #7CB342;
    --wg-accent-pink: #E91E63;
    --wg-accent-purple: #9C27B0;
    --wg-accent-teal: #00897B;
    --wg-accent-amber: #FFB300;
    --wg-text-cream: #FFF8F0;
    --wg-text-white: #FFFFFF;
    --wg-gold: #FFD700;
    --wg-card-bg: rgba(255, 255, 255, 0.12);
    --wg-card-bg-hover: rgba(255, 255, 255, 0.2);
    --wg-card-border: rgba(255, 255, 255, 0.15);
    --wg-radius: 28px;
    --wg-radius-sm: 16px;
    --wg-radius-xs: 12px;
    --wg-font: 'Nunito', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: #0a0a0a;
}

body.woofie-game-page {
    font-family: var(--wg-font);
    color: var(--wg-text-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.wg-loading {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #1A5A68 0%, #2D7D8A 50%, #3A9BAA 100%);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.wg-loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.wg-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.wg-loading-character {
    font-size: 80px;
    animation: wgBounce 1s ease-in-out infinite;
}

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

.wg-loading-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--wg-text-white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.wg-loading-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.wg-loading-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--wg-accent-orange), var(--wg-accent-yellow));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ============================================
   GAME CONTAINER
   ============================================ */
.wg-game {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 10;
}

/* ============================================
   REWARD OVERLAY
   ============================================ */
.wg-reward-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background 0.4s ease;
    backdrop-filter: blur(0px);
}
.wg-reward-overlay.active {
    background: rgba(0, 0, 0, 0.7);
    pointer-events: all;
    backdrop-filter: blur(8px);
}

.wg-reward-modal {
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 420px;
    width: 90%;
}
.wg-reward-overlay.active .wg-reward-modal {
    transform: translateY(0);
    opacity: 1;
}

.wg-rw-content {
    background: linear-gradient(180deg, rgba(30, 39, 82, 0.98), rgba(20, 28, 60, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    padding: 28px 24px 24px;
    text-align: center;
    color: var(--wg-text-white);
}

.wg-rw-stars {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}

.wg-rw-star {
    font-size: 40px;
    opacity: 0.3;
    transform: scale(0.85);
    transition: transform 0.24s ease, opacity 0.24s ease;
}

.wg-rw-star.earned {
    opacity: 1;
}

.wg-rw-star.empty {
    filter: grayscale(1);
}

.wg-rw-star.animated {
    transform: scale(1);
}

.wg-rw-message {
    font-size: 28px;
    line-height: 1.15;
    font-weight: 900;
    margin-bottom: 18px;
    color: #ffe08a;
}

.wg-rw-sticker {
    margin: 0 auto 22px;
    max-width: 280px;
    padding: 18px 16px 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.wg-rw-sticker.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.wg-rw-sticker-stack {
    margin-bottom: 4px;
}

.wg-rw-sticker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 auto 22px;
}

.wg-rw-sticker-grid .wg-rw-sticker {
    margin: 0;
    max-width: none;
    min-width: 0;
}

.wg-rw-sticker-icon {
    width: 128px;
    height: 128px;
    margin: 0 auto 12px;
    border-radius: 26px;
    background: radial-gradient(circle at 40% 30%, rgba(255, 224, 138, 0.34), rgba(255, 255, 255, 0.06) 60%, transparent 75%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wg-rw-sticker-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wg-rw-sticker-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
}

.wg-rw-sticker-label {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #f9c74f;
    margin-bottom: 8px;
}

.wg-rw-sticker-name {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 8px;
}

.wg-rw-sticker-copy {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 520px) {
    .wg-rw-sticker-grid {
        grid-template-columns: 1fr;
    }
}

.wg-rw-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wg-rw-buttons .wg-btn {
    width: 100%;
}

/* ============================================
   LANDSCAPE BLOCKER
   ============================================ */
.wg-landscape-blocker {
    display: none;
    position: fixed;
    inset: 0;
    background: #1A5A68;
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-family: var(--wg-font);
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    color: var(--wg-text-white);
}
.wg-landscape-icon { font-size: 48px; }

@media (max-width: 768px) and (orientation: landscape) {
    .wg-landscape-blocker { display: flex; }
}

/* ============================================
   SHARED UI COMPONENTS
   ============================================ */

/* Pill buttons (back, quit, etc) */
.wg-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--wg-radius-sm);
    padding: 10px 18px;
    color: var(--wg-text-white);
    font-family: var(--wg-font);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    outline: none;
}
.wg-pill:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Primary action button */
.wg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 40px;
    border-radius: 20px;
    font-family: var(--wg-font);
    font-size: 18px;
    font-weight: 900;
    color: var(--wg-text-white);
    background: linear-gradient(135deg, var(--wg-accent-orange), var(--wg-accent-yellow));
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(232, 134, 58, 0.4);
    outline: none;
}
.wg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 134, 58, 0.5);
}
.wg-btn:active {
    transform: translateY(0px) scale(0.97);
}

.wg-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
}
.wg-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

/* ============================================
   SCROLLBAR (for scrollable game areas)
   ============================================ */
.wg-game ::-webkit-scrollbar { width: 8px; }
.wg-game ::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
.wg-game ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 4px; }
