@font-face {
    font-family: 'PlayFreeGames';
    src: url('https://hellomangames.github.io/hmg/assets/play-free-games-free-font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* COLOR PALETTE: VIBRANT OBBY STYLE */
    --bg-sky: #00D2FF;           /* Bright Sky Blue */
    --bg-gradient-btm: #3A7BD5;
    --primary-purple: #9b59b6;   /* Obby Purple */
    --accent-yellow: #f1c40f;    /* Coin/Speed Yellow */
    --accent-red: #e74c3c;       /* Danger Red */
    --text-dark: #2c3e50;
    --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'PlayFreeGames', 'Comic Sans MS', sans-serif;
    background-color: var(--bg-sky);
    background-image: linear-gradient(180deg, var(--bg-sky) 0%, var(--bg-gradient-btm) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    overscroll-behavior-y: none; /* Prevent pull-to-refresh */
}

/* HEADER */
header {
    background: var(--white);
    border-bottom: 6px solid var(--primary-purple);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container { display: flex; align-items: center; gap: 15px; }
.secondary-logo { height: 50px; width: auto; animation: bounce 2s infinite; }
.main-logo { height: 60px; width: auto; display: none; }

.logo-link {
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s;
}
.logo-link:hover { transform: scale(1.05); }

/* HEADER BUTTON */
.more-games-btn {
    background: var(--accent-yellow);
    color: #000;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 4px solid #d35400;
    text-transform: uppercase;
    font-size: 1.1rem;
    animation: pulse-btn 2s infinite;
}
.more-games-btn:hover { transform: translateY(2px); border-bottom: 2px solid #d35400; }

@media(min-width: 600px) { .main-logo { display: block; } }

/* HERO SECTION */
.hero { text-align: center; padding: 30px 10px; max-width: 1200px; margin: 0 auto; }
h1 {
    font-size: 3rem; color: #fff;
    text-shadow: 4px 4px 0px var(--primary-purple), -2px -2px 0px #000;
    margin-bottom: 20px; text-transform: uppercase;
    letter-spacing: 2px; animation: pulse 3s infinite;
}

/* GAME CONTAINER */
.game-wrapper {
    position: relative; width: 100%; max-width: 900px; margin: 0 auto;
    background: var(--primary-purple); padding: 12px;
    border-radius: 20px; 
    box-shadow: 0 10px 0px #8e44ad, 0 20px 20px rgba(0,0,0,0.3);
    touch-action: none; /* Critical for mobile game controls */
}

.iframe-container {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    border-radius: 15px; background: #000;
    border: 4px solid #fff;
}

.iframe-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* CONTROLS */
.controls-row {
    display: flex; gap: 15px; max-width: 900px; margin: 25px auto 0 auto; flex-wrap: wrap;
}
.action-btn {
    flex: 1; padding: 15px; color: white;
    font-family: 'PlayFreeGames', sans-serif; font-size: 1.2rem;
    border: none; border-radius: 15px; cursor: pointer;
    text-transform: uppercase; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    min-width: 250px; transition: transform 0.1s;
}
.btn-fullscreen { background: var(--accent-red); box-shadow: 0 6px 0 #c0392b; }
.btn-more { background: var(--bg-sky); box-shadow: 0 6px 0 #2980b9; border: 2px solid #fff; }
.action-btn:active { transform: translateY(6px); box-shadow: none !important; }

/* ADS */
.ad-container {
    max-width: 900px; margin: 30px auto; padding: 10px;
    background: rgba(255, 255, 255, 0.7); border-radius: 15px;
    text-align: center; min-height: 100px; border: 2px dashed var(--primary-purple);
}

/* CONTENT CARD */
.seo-content {
    background: white; max-width: 900px; margin: 20px auto; padding: 30px;
    border-radius: 25px; border: 5px solid var(--accent-yellow);
    box-shadow: 0 10px 0 rgba(0,0,0,0.1); text-align: left;
}

h2 { color: var(--primary-purple); font-size: 2rem; margin-top: 30px; margin-bottom: 15px; text-shadow: 1px 1px 0 #000; border-bottom: 3px dashed var(--bg-sky); padding-bottom: 5px; }
h3 { color: #d35400; font-size: 1.5rem; margin-top: 25px; margin-bottom: 10px; }
p { font-size: 1.15rem; margin-bottom: 15px; }

ul { list-style-type: none; padding: 0; }
li { background: #fdf2e9; margin: 10px 0; padding: 12px; border-left: 6px solid var(--accent-yellow); border-radius: 8px; font-size: 1.1rem; }
.highlight { background-color: var(--accent-yellow); color: #000; padding: 2px 6px; border-radius: 4px; font-weight: bold; }

/* FAQ & TAGS */
details { margin-bottom: 12px; background: #f1f2f6; border-radius: 10px; padding: 12px; cursor: pointer; transition: background 0.2s; }
details:hover { background: #dfe4ea; }
summary { font-weight: bold; color: var(--primary-purple); outline: none; }

.tags-card {
    margin-top: 40px; background: #2f3542; color: #fff; padding: 20px;
    border-radius: 15px; text-align: center;
}
.tag-pill {
    display: inline-block; background: var(--primary-purple); padding: 5px 10px;
    margin: 5px; border-radius: 20px; font-size: 0.9rem; font-weight: bold;
}

/* INVISIBLE SEO (Screen Reader Accessible) */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* FOOTER */
footer { background: var(--primary-purple); color: white; text-align: center; padding: 40px 20px; margin-top: 60px; border-top: 8px solid #8e44ad; }
.footer-logo { height: 50px; margin-bottom: 15px; transition: transform 0.2s; filter: drop-shadow(0 4px 0 rgba(0,0,0,0.2)); }
.footer-logo:hover { transform: scale(1.1); }

@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes pulse-btn { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

@media (max-width: 768px) { 
    h1 { font-size: 1.8rem; } 
    .seo-content { margin: 20px 10px; padding: 20px; }
    .game-wrapper { width: 98%; padding: 8px; }
    .controls-row { flex-direction: column; }
}

