:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #ecf0f1;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    background-color: #f5f6fa;
}

.sidebar {
    width: 280px;
    height: 100vh;
    background-color: var(--primary-color);
    padding: 20px;
    color: var(--text-color);
    position: fixed;
    overflow: hidden;
    align-items: center;
}

.logo-name {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.logo-image img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo_name {
    font-size: 1.5rem;
    font-weight: 600;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="file"] {
    display: none;
}

input[type="range"] {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: var(--secondary-color);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.rotate-controls {
    display: flex;
    gap: 10px;
}

label {
    font-size: 0.9rem;
    margin-bottom: -10px;
}

main {
    margin-left: 280px;
    padding: 20px;
    width: calc(100% - 280px);
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.image-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 480px;         /* Fixed width in px */
    min-width: 480px;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 16px;
    box-sizing: border-box;
}
.image-container img#uploadedImage {
    display: block;
    width: 448px;         /* Fixed width in px (or cm/in if you want physical size) */
    height: 600px;        /* Fixed height in px */
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    object-fit: contain;
}
#image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Maintains aspect ratio/cover */
    position: relative;
    z-index: 2;
}

.error {
    color: #e74c3c;
    text-align: center;
}

/* Add these styles */
form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type="file"] {
    display: block;
    width: 100%;
    padding: 8px;
    background: var(--secondary-color);
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
}

button[name="upload-btn"] {
    width: 100%;
    padding: 10px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

button[name="upload-btn"]:hover {
    background: var(--secondary-color);
}

.adjustment-controls {
    background: var(--secondary-color);
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    transition: display 0.3s ease;
    z-index: 100;
}

.adjustment-controls.visible {
    display: block !important;
}


.background-image {
    position:absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    main {
        margin-left: 0;
        width: 100%;
    }

    body {
        flex-direction: column;
    }
}
/* Style for the resize slider */
#resize-slider{
    width: 80%;
    margin: 10px auto;
    display: block;
    appearance: none;
    height: 8px;
    background: #ddd;
    outline: none;
    border-radius: 5px;
    cursor: pointer;
}



#resize-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

#resize-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}
#adjust-controls.hidden{
    display: none;
}
#toggles-adjust{
    display: block;
    margin: 10px auto;
    padding: 8px 16px;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#toggles-controls:hover{
    background-color: #0056b3;
}
.background-dropdown{
    position: relative;

}
.background-option{
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 5px;
    border-radius: 5px;
   
}

#image-button {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    padding: 10px;
    width: 100%;
    max-width: 260px; /* Ensuring it fits within sidebar */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto; /* Allows scrolling if needed */
}

#confirmation-message {
    position: fixed;
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

#confirmation-message button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: #fff;
    cursor: pointer;
}

#confirmation-message button:hover {
    background-color: #3e8e41;
}



/* Styles for the sticker panel */

    