/* ==========================================================================
   FriendKick — CSS & Responsive Layout (16:9 Widescreen Arcade Soccer)
   ========================================================================== */

.yf-kick-app {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
}

/* Barra superiore topbar identica a YouRacer / Capitan Lemon */
.yf-kick-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0d1520;
    padding: 10px 16px;
    border-radius: 12px 12px 0 0;
    border: 1px solid #1f2e42;
    border-bottom: none;
}

.yf-kick-player .yf-player-badge {
    background: #1a293e;
    color: #39ff14;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #2a4160;
}

.yf-kick-player .yf-guest-badge {
    color: #8da4be;
    font-size: 13px;
}

.yf-kick-player .yf-guest-badge a {
    color: #00e5ff;
    text-decoration: underline;
    font-weight: bold;
}

.yf-kick-topbar-controls {
    display: flex;
    gap: 8px;
}

.yf-kick-topbar-controls .yf-icon-btn {
    background: #1a293e;
    border: 1px solid #2a4160;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.yf-kick-topbar-controls .yf-icon-btn:hover {
    background: #2a4160;
    border-color: #00e5ff;
}

/* Stage principale e Viewport 16:9 */
.yf-kick-main-stage {
    background: #000000;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    border: 1px solid #1f2e42;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.yf-kick-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050a12;
    overflow: hidden;
    touch-action: none; /* Previene scroll e zoom durante lo swipe di tiro */
}

#yf-kick-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* HUD sovraimpresso sul campo */
.yf-kick-hud {
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 10;
}

.yf-kick-hud-left,
.yf-kick-hud-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yf-kick-stat-box {
    background: rgba(10, 20, 32, 0.82);
    border: 1px solid rgba(56, 189, 248, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    padding: 3px 8px;
    display: flex;
    flex-direction: column;
    min-width: 65px;
}

.yf-kick-stat-label {
    font-size: 9px;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
}

.yf-kick-stat-val {
    font-size: 16px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.yf-kick-balls-container {
    display: flex;
    gap: 3px;
    margin-top: 1px;
    font-size: 15px;
}

.yf-ball-icon.lost {
    opacity: 0.25;
    filter: grayscale(1);
}

.yf-kick-combo-badge {
    background: linear-gradient(135deg, #ff8c00, #ff0055);
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 14px;
    align-self: flex-end;
    box-shadow: 0 0 12px rgba(255, 0, 85, 0.6);
    display: none;
}

.yf-kick-hud-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.yf-kick-wind-badge {
    background: rgba(15, 30, 48, 0.85);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

/* Banner Notifiche Gol / Parata / Incrocio */
.yf-kick-banner-msg {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.95), 0 0 10px currentColor;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    pointer-events: none;
}

.yf-kick-banner-msg.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
}

.yf-kick-banner-msg.goal { color: #39ff14; }
.yf-kick-banner-msg.sette { color: #ffd700; }
.yf-kick-banner-msg.saved { color: #ff3366; }
.yf-kick-banner-msg.miss { color: #94a3b8; }
.yf-kick-banner-msg.target { color: #00e5ff; }

/* ==========================================================================
   ADSENSE SHIELD: Blocca qualsiasi annuncio pubblicitario o banner auto-inserito nel gioco
   ========================================================================== */
.yf-kick-app ins.adsbygoogle,
.yf-kick-app .google-auto-placed,
.yf-kick-app div[id^="google_ads_iframe"],
.yf-kick-app iframe[id^="google_ads_iframe"],
.yf-kick-app iframe[src*="googlesyndication"],
.yf-kick-app iframe[src*="googleads"],
.yf-kick-app div[data-google-query-id],
.yf-kick-app .ad-placement,
.yf-kick-main-stage ins,
.yf-kick-viewport ins,
.yf-kick-viewport .google-auto-placed,
.yf-kick-viewport iframe {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -9999 !important;
    overflow: hidden !important;
}

/* Overlay e Finestre di Dialogo (Priorità Assoluta su AdSense e Temi) */
.yf-kick-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(5, 12, 22, 0.92) !important;
    backdrop-filter: blur(8px) !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    padding: 16px !important;
    pointer-events: auto !important;
}

.yf-kick-overlay.hidden,
.yf-kick-overlay[style*="display: none"] {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.yf-kick-dialog {
    position: relative !important;
    z-index: 100000 !important;
    pointer-events: auto !important;
    background: #0f1c2c;
    border: 2px solid #00e5ff;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
    border-radius: 16px;
    padding: 24px 30px;
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.yf-kick-logo {
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.8);
    margin-bottom: 4px;
}

.yf-kick-subtitle {
    color: #38bdf8;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.yf-kick-instructions {
    background: #08121e;
    border-radius: 10px;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 20px;
}

.yf-kick-instructions p,
.yf-kick-instructions .yf-kick-inst-item {
    margin: 6px 0;
}

.yf-kick-instructions strong {
    color: #ffffff;
}

.yf-kick-action-btn {
    position: relative !important;
    z-index: 100001 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    background: linear-gradient(135deg, #00e5ff, #0077ff);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    border: none;
    padding: 14px 36px;
    border-radius: 30px;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0, 119, 255, 0.5);
    transition: all 0.2s ease;
    display: inline-block;
}

.yf-kick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.7);
}

.yf-kick-action-btn:active {
    transform: translateY(1px);
}

.yf-kick-gameover-title {
    font-size: 28px;
    font-weight: 900;
    color: #ff3366;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.yf-kick-final-score-label {
    font-size: 12px;
    letter-spacing: 1px;
    color: #94a3b8;
    text-transform: uppercase;
}

.yf-kick-final-score-val {
    font-size: 42px;
    font-weight: 900;
    color: #39ff14;
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
    margin: 4px 0 12px;
}

.yf-kick-final-stats {
    background: #08121e;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-around;
}

.yf-kick-final-stats strong {
    color: #00e5ff;
}

.yf-kick-save-status {
    font-size: 13px;
    margin-bottom: 14px;
    min-height: 20px;
}

.yf-kick-save-status.success { color: #39ff14; }
.yf-kick-save-status.guest { color: #fbbf24; }

/* Adattamento Responsive Mobile */
@media (max-width: 600px) {
    .yf-kick-dialog {
        padding: 18px 20px;
    }
    .yf-kick-logo {
        font-size: 26px;
    }
    .yf-kick-final-score-val {
        font-size: 34px;
    }
    .yf-kick-banner-msg {
        font-size: 20px;
    }
    .yf-kick-stat-val {
        font-size: 16px;
    }
}
