.popup-container {
    position: fixed;
    z-index: 10002;
    width: 100%;
    height: 100%;
    pointer-events: none;
    top: 0;
    left: 0;
}

.popup {
    position: absolute;
    background: var(--accent-color);
    border-radius: var(--popup-radius);
    box-shadow: var(--popup-shadow);
    overflow: hidden;
    pointer-events: auto;
    animation: popIn 0.3s ease-out;
    border: var(--popup-border);
    min-width: 150px;
    min-height: 100px;
    z-index: 10003;
}

.popup::before {
    content: "Reklama";
    display: block;
    background: linear-gradient(to bottom,
                var(--accent-color-light) 0%,
                var(--accent-color-light) 5%,
                var(--accent-color) 5%,
                var(--accent-color) 100%);
    color: var(--popup-title-color);
    font-weight: bold;
    padding: 5px 10px;
    font-family: 'Tahoma', sans-serif;
    font-size: 12px;
    text-align: left;
    height: 25px;
    line-height: 25px;
    text-shadow: none;
    border-radius: var(--popup-radius) var(--popup-radius) 0 0;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.popup-content {
    overflow: hidden;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.popup-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.close-popup {
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    border-radius: 0 var(--popup-radius) 0 0;
    background: linear-gradient(to bottom,
                var(--accent-color-dark) 0%,
                var(--accent-color) 45%,
                var(--accent-color) 50%,
                var(--accent-color-dark) 55%,
                var(--accent-color-darker) 100%);
    color: var(--popup-title-color);
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    line-height: 25px;
    cursor: pointer;
    z-index: 10004;
    border-left: 1px solid var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
    box-shadow: -1px 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.close-popup::before {
    content: "\00d7";
    display: block;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.close-popup:hover {
    background: linear-gradient(to bottom,
                var(--accent-color-light) 0%,
                var(--accent-color) 45%,
                var(--accent-color) 50%,
                var(--accent-color) 55%,
                var(--accent-color-dark) 100%);
}

.close-popup:active {
    background: linear-gradient(to bottom,
                var(--accent-color-dark) 0%,
                var(--accent-color-dark) 45%,
                var(--accent-color-darker) 50%,
                var(--accent-color-darker) 100%);
}

.popup::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, transparent 50%, var(--accent-color) 50%);
    border-radius: 0 0 var(--popup-radius) 0;
    cursor: nwse-resize;
}
