/* general */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
    transition: 0.3s ease;
}

/* dark mode */
body.dark-mode {
    background: #0f172a;
    color: white;
}

/* light mode */
body.light-mode {
    background: #f1f5f9;
    color: #1e293b;
}

/* button (Dark/Light) */
.mode-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    background: #6366f1;
    color: white;
    font-weight: bold;
    z-index: 1000;
}

/* the large display container*/
.container {
    width: 95%;
    max-width: 1300px;
    margin: 60px auto;
    padding: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* editing the container in bright mode*/
body.light-mode .container {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
}

/* image display section*/
.image-section {
    flex: 2;
    min-width: 350px;
}

/*Preview box for the uploaded image*/
.img-box {
    width: 100%;
    height: 500px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed #444;
    position: relative; 
}


#image-node {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    z-index: 2; 
}


#image-node[src=""] {
    display: none;
}


.action-bar {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    font-weight: bold;
    color: white;
}

.upload-btn {
    background: #6366f1;
    text-align: center;
}

.save-btn {
    background: #10b981;
}

.reset-btn {
    background: #ef4444;
}


.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


.control-section {
    flex: 1;
    min-width: 300px;
    background: rgba(0, 0, 0, 0.05);
    padding: 20px;
    border-radius: 15px;
}

.title {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
}

.box {
    margin-bottom: 15px;
}

.box label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    opacity: 0.8;
}


input[type=range] {
    width: 100%;
    cursor: pointer;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    z-index: 1; 
    pointer-events: none;
}

.plus-icon {
    font-size: 4rem;
    color: #6366f1;
    margin-bottom: 10px;
}

.upload-placeholder p {
    font-weight: bold;
    opacity: 0.6;
}