/* ==========================================================================
   ۱. استایل‌های پایه، کمیک‌بوکی و باکس ویجت (تستتو آرکید)
   ========================================================================== */
.comic-widget-card {
    background: #fdf2d5; 
    border: 4px solid #222; 
    border-radius: 16px;
    padding: 30px; 
    text-align: center; 
    box-shadow: 8px 8px 0 #222;
    position: relative; 
    overflow: hidden; 
    font-family: Tahoma, sans-serif;
}

.comic-badge-tag {
    position: absolute; 
    top: 10px; 
    right: -30px; 
    background: #ff4757; 
    color: #fff;
    padding: 5px 35px; 
    transform: rotate(45deg); 
    font-weight: bold; 
    border: 2px solid #222;
}

.comic-button {
    background: #f7ca18; 
    color: #222; 
    border: 4px solid #222; 
    border-radius: 8px;
    padding: 12px 24px; 
    font-weight: 900; 
    font-size: 16px; 
    cursor: pointer;
    box-shadow: 4px 4px 0 #222; 
    transition: all 0.1s ease; 
    margin-top: 15px;
    font-family: inherit;
}

.comic-button:active { 
    transform: translate(4px, 4px); 
    box-shadow: 0 0 0 #222; 
}

.comic-btn-danger { 
    background: #ff4757; 
    color: #fff; 
    border: 4px solid #222; 
    border-radius: 8px; 
    padding: 10px 20px; 
    font-weight: 900; 
    cursor: pointer; 
    box-shadow: 4px 4px 0 #222; 
    transition: all 0.1s ease;
    font-family: inherit;
}

.comic-btn-danger:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #222;
}

/* ==========================================================================
   ۲. مدال‌های مرکزی (Hub) و سیستم پاپ‌آپ‌ها
   ========================================================================== */
.arcade-hub-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.8); 
    z-index: 999999;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    backdrop-filter: blur(5px);
}

.comic-panel-central {
    background: #fff; 
    border: 6px solid #222; 
    border-radius: 20px;
    padding: 30px; 
    box-shadow: 15px 15px 0 #f7ca18; 
    max-width: 600px; 
    width: 90%;
    position: relative; 
    text-align: center;
}

.close-hub-btn {
    position: absolute; 
    top: 10px; 
    right: 10px; 
    background: transparent;
    border: none; 
    font-size: 30px; 
    font-weight: bold; 
    cursor: pointer; 
    color: #ff4757;
}

.game-selection-grid { 
    display: flex; 
    gap: 20px; 
    margin-top: 20px; 
    flex-wrap: wrap; 
}

.game-card-select {
    flex: 1; 
    min-width: 200px; 
    border: 4px solid #222; 
    border-radius: 12px;
    padding: 20px; 
    cursor: pointer; 
    transition: 0.2s; 
    background: #f4f4f4;
}

.game-card-select:hover { 
    transform: translateY(-5px); 
    background: #e3f9e5; /* سبز روشن تستتو */
    box-shadow: 6px 6px 0 #222; 
}

.game-icon { 
    font-size: 40px; 
    margin-bottom: 10px; 
}

.comic-boom-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #f7ca18;
    -webkit-text-stroke: 2px #222;
    text-shadow: 4px 4px 0 #222;
    margin-bottom: 15px;
}

/* ==========================================================================
   ۳. ماشین تخریب (Smasher) - کنترلر، ماوس و افکت ذرات
   ========================================================================== */
.testeto-smasher-toolbox {
    position: fixed; 
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%);
    background: #fff; 
    border: 4px solid #222; 
    padding: 15px; 
    border-radius: 15px;
    box-shadow: 6px 6px 0 #222; 
    z-index: 999999; 
    display: flex; 
    gap: 15px; 
    align-items: center;
}

.t-btn { 
    background: #eee; 
    border: 2px solid #222; 
    padding: 8px 12px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: all 0.1s;
}

.t-btn.active-tool { 
    background: #f7ca18; 
}

/* نشانگرهای سفارشی ماوس با اموجی‌های محلی SVG */
body.smasher-tool-hammer { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40"><text y="30" font-size="30">🔨</text></svg>') 10 10, crosshair !important; }
body.smasher-tool-scooter { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40"><text y="30" font-size="30">🏍️</text></svg>') 10 10, crosshair !important; }
body.smasher-tool-espresso { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40"><text y="30" font-size="30">☕</text></svg>') 10 10, crosshair !important; }

/* انیمیشن‌ها و کلاس‌های فیزیک تخریب کدهای فرانت */
.smashed-element { 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    pointer-events: none !important; 
}

.smash-hammer-fx { 
    transform: scale(0.1) rotate(45deg); 
    opacity: 0; 
}

.smash-scooter-fx { 
    transform: skewX(-30deg) translateX(50px); 
    border-bottom: 6px dashed #222 !important; 
    opacity: 0.2; 
    filter: grayscale(100%) blur(1px); 
}

.smash-espresso-fx { 
    transform: translateY(100px) scaleY(0.2); 
    filter: blur(4px) sepia(100%) hue-rotate(30deg) saturate(300%); 
    opacity: 0; 
}

/* پاپ‌آپ نوشته‌های اکشن کمیک (POW!) */
.comic-pow {
    position: absolute;
    color: #f7ca18;
    -webkit-text-stroke: 2px #222;
    font-size: 3rem;
    font-weight: 900;
    z-index: 9999999;
    pointer-events: none;
    animation: powAnim 0.5s forwards;
    text-shadow: 4px 4px 0 #222;
}

@keyframes powAnim {
    0% { transform: scale(0.5) rotate(-20deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 0; }
}

/* افکت ذرات دود و قطرات قهوه */
.smash-particle { 
    position: absolute; 
    pointer-events: none; 
    z-index: 999999; 
    font-size: 30px; 
    animation: particleAnim 0.8s forwards ease-out; 
}

@keyframes particleAnim {
    0% { transform: scale(0.5) translateY(0); opacity: 1; }
    100% { transform: scale(2) translateY(-50px); opacity: 0; }
}

/* ==========================================================================
   ۴. بازی پلتفرمر ۱۶-بیتی (Retro Run)
   ========================================================================== */
body.platformer-active { 
    overflow: hidden !important; 
}

.testeto-platformer-hud {
    position: fixed; 
    top: 20px; 
    left: 20px; 
    background: #222; 
    color: #00ff00;
    font-family: monospace; 
    border: 4px solid #fff; 
    padding: 15px; 
    z-index: 999999; 
    border-radius: 8px; 
    font-size: 16px;
}

/* کاراکتر پیکسلی کمیک */
#testeto-player {
    position: absolute; 
    width: 40px; 
    height: 40px; 
    background-color: #ff4757;
    border: 4px solid #222; 
    border-radius: 8px; 
    z-index: 999998;
    box-shadow: inset -5px -5px 0 rgba(0,0,0,0.3); 
    transition: transform 0.1s;
}

#testeto-player::before, #testeto-player::after {
    content: ''; 
    position: absolute; 
    top: 10px; 
    width: 8px; 
    height: 8px; 
    background: #fff; 
    border-radius: 50%;
}
#testeto-player::before { left: 8px; } 
#testeto-player::after { right: 8px; }

/* هایلایت سکوهای شناسایی شده در ساختار DOM */
.platformer-highlight {
    border: 3px solid #00ff00 !important; 
    box-shadow: 0 0 10px #00ff00 !important;
    position: relative; 
    z-index: 999997;
}

/* ==========================================================================
   ۵. تنظیمات هوشمند ریسپانسیو و موبایل (Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
    .testeto-smasher-toolbox { 
        flex-direction: row;
        flex-wrap: wrap; 
        bottom: 10px; 
        width: 90%; 
        left: 50%;
        transform: translateX(-50%);
        justify-content: center; 
        gap: 8px;
        padding: 10px;
    }

    .t-btn {
        font-size: 13px;
        padding: 8px;
        flex: 1 1 auto;
        text-align: center;
    }

    .game-selection-grid { 
        flex-direction: column; 
        gap: 12px;
    }

    .comic-button {
        font-size: 14px;
        padding: 10px 20px;
    }

    .comic-panel-central {
        width: 95%;
        padding: 20px 15px;
    }

    .comic-pow {
        font-size: 2rem;
    }
}
/* ==========================================================================
   ۶. شاهکار پلتفرمر: انیمیشن‌ها، باگ‌ها و آیتم‌ها (Retro Run 2.0)
   ========================================================================== */
/* انیمیشن راه رفتن و پرش کاراکتر */
@keyframes playerWalk {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(10deg); }
    100% { transform: translateY(0) rotate(0deg); }
}
.player-walking { animation: playerWalk 0.2s infinite; }
.player-jumping { filter: drop-shadow(0 15px 5px rgba(0,0,0,0.3)); }
.player-flip { transform: scaleX(-1); }

/* باگ‌های متحرک دشمن (Enemies) */
.testeto-enemy-bug {
    position: absolute;
    font-size: 30px;
    z-index: 999998;
    transition: transform 0.1s;
    user-select: none;
    pointer-events: none;
    text-shadow: 2px 2px 0 #ff4757;
}
.bug-squashed {
    transform: scaleY(0.2) translateY(30px) !important;
    opacity: 0;
    transition: all 0.3s ease-out;
}

/* قهوه‌های امتیازی (Collectibles) */
.testeto-collectible {
    position: absolute;
    font-size: 25px;
    z-index: 999998;
    animation: floatItem 1s infinite alternate ease-in-out;
    user-select: none;
    text-shadow: 2px 2px 0 #f7ca18;
}
@keyframes floatItem {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

/* افکت لرزش صفحه هنگام برخورد با باگ */
@keyframes screenShake {
    0% { transform: translate(10px, 10px); }
    25% { transform: translate(-10px, -10px); }
    50% { transform: translate(10px, -10px); }
    75% { transform: translate(-10px, 10px); }
    100% { transform: translate(0, 0); }
}
.body-shake { animation: screenShake 0.3s; }