/* Stile generale */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

#image-viewer-container h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

#image-viewer-container h2, h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

#image-viewer-container button {
    background-color: #3498db !important;
    color: white;
    border: none;
    padding: 4px 7px !important;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 5px;
}

#image-viewer-container button:hover {
    background-color: #2980b9;
}

#image-viewer-container input[type="text"] {
    padding: 8px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Demo controls */
.demo-controls {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

/* Image viewer */
#image-viewer-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

#image-viewer-container.hidden {
    display: none;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#close-viewer {
    background-color: #e74c3c;
}

#close-viewer:hover {
    background-color: #c0392b;
}

.viewer-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.image-container {
    flex: 1;
    position: relative;
    overflow: auto; /* Per mostrare le barre di scorrimento */
    background-color: rgba(0, 0, 0, 0.2); /* Opzionale, per vedere meglio i limiti del contenitore */
}

#viewer-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center; /* Questo assicura che lo zoom avvenga dal centro */
    /* La trasformazione verrà applicata via JavaScript */
}


/* Controls panel */
.controls-panel {
    width: 300px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    overflow-y: auto;
    border-radius: 6px;
}

.control-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.control-group:last-child {
    border-bottom: none;
}

.slider-control {
    margin-bottom: 10px;
}

.slider-control label {
    display: block;
    margin-bottom: 5px;
    color:#000;
}

.slider-control input[type="range"] {
    width: 100%;
}

.slider-control span{
    color:#000;
}

.tip {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .viewer-content {
        flex-direction: column;
    }

    .controls-panel {
        width: 100%;
        margin-top: 15px;
    }
}
