/* ── Cartellone Pubblicitario Overlay ───────────────────────────────── */
.billboard-overlay {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
}

/* ── Visibilità ───────────────────────────────────────────────────── */
.billboard-overlay.hidden {
    display: none;
}

/* ── Posizioni verticali ──────────────────────────────────────────── */
.billboard-overlay.position-top {
    top: 50px;
}

.billboard-overlay.position-center {
    top: 50%;
    transform: translateY(-50%);
}

.billboard-overlay.position-bottom {
    bottom: 0;
}

/* ── Posizioni orizzontali ───────────────────────────────────────── */
.billboard-overlay.position-left {
    left: 0;
}

.billboard-overlay.position-center-h {
    left: 50%;
    transform: translateX(-50%);
}

.billboard-overlay.position-right {
    right: 0;
}

/* ── Combinazioni ─────────────────────────────────────────────────── */
.billboard-overlay.position-center.position-left {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.billboard-overlay.position-center.position-right {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.billboard-overlay.position-center.position-center-h {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.billboard-overlay.position-top.position-left {
    top: 50px;
    left: 0;
}

.billboard-overlay.position-top.position-right {
    top: 50px;
    right: 0;
}

.billboard-overlay.position-top.position-center-h {
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.billboard-overlay.position-bottom.position-left {
    bottom: 0;
    left: 0;
}

.billboard-overlay.position-bottom.position-right {
    bottom: 0;
    right: 0;
}

.billboard-overlay.position-bottom.position-center-h {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* ── Pulsante Info Banner ─────────────────────────────────────────── */
.billboard-info-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 1001;
}

.billboard-info-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ── Popup Info Banner ───────────────────────────────────────────── */
.ad-info-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 2000;
    pointer-events: none;
}

.ad-info-popup.active {
    display: block;
}

.ad-info-content {
    position: fixed;
    background: #000900;
    border: 2px solid #00AA00;
    border-radius: 8px;
    padding: 15px;
    max-width: 250px;
    width: auto;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    pointer-events: auto;
    z-index: 2001;
}

.ad-info-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: #00FF00;
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.ad-info-close:hover {
    color: #FF0000;
}

.ad-info-content p {
    color: #00CC00;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    padding-right: 20px;
    padding-top: 5px;
}

/* ── Sistema Notifiche Personalizzate ────────────────────────────────── */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.custom-notification {
    background: #000900;
    border: 2px solid #00AA00;
    border-radius: 8px;
    padding: 15px;
    max-width: 300px;
    min-width: 200px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    pointer-events: auto;
    animation: notificationSlideIn 0.3s ease;
}

.custom-notification.notification-fade-out {
    animation: notificationFadeOut 0.3s ease;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notificationFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: #00FF00;
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: #FF0000;
}

.custom-notification p {
    color: #00CC00;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    padding-right: 20px;
    padding-top: 5px;
}

.custom-notification.notification-success {
    border-color: #00FF00;
    background: #001100;
}

.custom-notification.notification-success p {
    color: #00FF00;
}

.custom-notification.notification-error {
    border-color: #FF0000;
    background: #110000;
}

.custom-notification.notification-error p {
    color: #FF4444;
}

.custom-notification.notification-warning {
    border-color: #FFAA00;
    background: #111100;
}

.custom-notification.notification-warning p {
    color: #FFAA00;
}

/* ── Struttura del cartellone ───────────────────────────────────────── */
.billboard {
    position: relative;
    width: 200px;
    height: 300px;
    margin-left: 0;
    pointer-events: auto;
}

/* ── Cornice del cartellone ─────────────────────────────────────────── */
.billboard-frame {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #4a4a4a 50%, #2a2a2a 100%);
    border: 4px solid #3a3a3a;
    border-radius: 4px;
    box-shadow: 
        4px 0 8px rgba(0,0,0,0.3),
        0 4px 8px rgba(0,0,0,0.3),
        inset 0 0 20px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

/* ── Area contenuto del cartellone ─────────────────────────────────── */
.billboard-content {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

/* ── Immagine pubblicitaria ─────────────────────────────────────────── */
.billboard-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    display: none;
}

.billboard-image.active {
    display: block;
}

/* ── Testo quando non c'è immagine ─────────────────────────────────── */
.billboard-placeholder {
    text-align: center;
    color: #888;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    padding: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.billboard-placeholder i {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    color: #666;
}

/* ── Riflesso sul cartellone ─────────────────────────────────────────── */
.billboard-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .billboard {
        width: 150px;
        height: 225px;
    }
    
    .billboard-leg {
        height: 45px;
        bottom: -45px;
    }
    
    .billboard-foot {
        bottom: -51px;
    }
    
    .billboard-placeholder {
        font-size: 12px;
        padding: 15px;
    }
    
    .billboard-placeholder i {
        font-size: 24px;
        margin-bottom: 8px;
    }
}
