.watermark-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.upload-section {
    text-align: center;
    margin-bottom: 20px;
}

.upload-info {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

#imageUpload {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    background: #f8f9fa;
    border: 2px dashed #007bff;
    border-radius: 4px;
    cursor: pointer;
}

.watermark-content {
    display: flex;
    gap: 20px;
}

.preview-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-column {
    min-height: 400px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

#previewCanvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.grid-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.grid-item {
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.grid-item.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px #007bff;
}

.controls-column {
    flex: 1;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.control-group input[type="text"],
.control-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.control-group input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.control-group input[type="range"] {
    width: 100%;
    margin: 8px 0;
    cursor: pointer;
}

.control-group span {
    font-size: 14px;
    color: #666;
    margin-left: 8px;
}

.button-group {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

.button-group button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

#applyWatermark {
    background: #28a745;
    color: white;
    flex: 2;
}

#applyWatermark:hover {
    background: #218838;
}

#downloadBtn {
    background: #007bff;
    color: white;
    flex: 1;
}

#downloadBtn:hover {
    background: #0056b3;
}

#resetBtn {
    background: #dc3545;
    color: white;
    flex: 1;
}

#resetBtn:hover {
    background: #c82333;
}

.progress-bar {
    margin-top: 20px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    width: 0;
    height: 20px;
    background: #007bff;
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}



/* Media Queries for Tablets and Mobile Phones */
@media screen and (max-width: 768px) {
    .watermark-content {
        flex-direction: column;
        gap: 30px;
    }

    .controls-column {
        width: 100%;
        padding: 15px;
    }

    .preview-section {
        width: 100%;
    }

    .preview-column {
        min-height: 300px;
    }

    .grid-preview {
        grid-template-columns: repeat(2, 1fr);
        max-height: 400px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }


@media screen and (max-width: 480px) {
    .watermark-container {
        padding: 10px;
    }

    .upload-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    #imageUpload {
        max-width: 100%;
    }

    .preview-column {
        min-height: 250px;
    }

    .grid-preview {
        grid-template-columns: 1fr;
    }

    .control-group {
        margin-bottom: 15px;
    }
}}