* { box-sizing: border-box; }

body {
    background: #0b0d0f radial-gradient(circle at 50% 100%, #ff007f 0%, #7000ff 30%, #0b0d0f 70%) no-repeat;
    background-attachment: fixed;
    color: #f0f0f0;
    font-family: 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column; 
    align-items: center; 
    padding: 20px 20px 60px; /* Space for status bar */
    min-height: 100vh;
    margin: 0;
}

.app-container { width: 100%; max-width: 1200px; }

header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.brand h1 { font-family: "Brush Script MT", cursive; color: #00BFFF; font-size: 3.5em; margin: 0; }
.brand p { margin: 0; font-size: 0.8em; color: #00BFFF; text-transform: uppercase; letter-spacing: 2px; }

.toolbar { display: flex; gap: 10px; }
.toolbar button {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(0, 191, 255, 0.4);
    color: #fff; padding: 10px 18px; border-radius: 30px; cursor: pointer; transition: 0.3s;
}
.toolbar button:hover { background: rgba(0, 191, 255, 0.2); }

/* LAYOUT */
.flex-layout { display: flex; gap: 30px; align-items: flex-start; margin-bottom: 30px; }
.flex-layout.swapped { flex-direction: row-reverse; }

.column {
    flex: 1; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(15px);
    padding: 30px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.1);
}

/* INPUTS & DASHED SELECTOR */
#customFileSelector {
    display: block; padding: 30px; margin-bottom: 25px; border: 2px dashed #00BFFF;
    text-align: center; cursor: pointer; border-radius: 12px; transition: 0.3s;
}
#imageInput { display: none; }
.input-row { display: flex; gap: 15px; margin-bottom: 15px; }
.input-group { flex: 1; }
label { display: block; margin-bottom: 8px; color: #00BFFF; font-size: 0.75em; font-weight: bold; text-transform: uppercase; }
input[type="number"] { width: 100%; padding: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; border-radius: 8px; }

.toggle-group { display: flex; flex-direction: column; gap: 10px; margin: 15px 0; }
.checkbox-label { display: flex; align-items: center; font-size: 0.9em; cursor: pointer; text-transform: none; color: #fff; }

/* PRESETS */
.glass-select {
    width: 100%; padding: 12px; background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1); color: white; border-radius: 10px; margin-bottom: 10px;
}
.glass-select option { background: #0b0d0f; }

/* PREVIEW BOX */
#previewContainer {
    background: rgba(0, 0, 0, 0.35); border-radius: 15px; padding: 20px;
    min-height: 450px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#imageCanvas { max-width: 100%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }

/* BUTTONS */
.glass-btn {
    display: block; width: 100%; padding: 15px; background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; border-radius: 10px;
    cursor: pointer; font-weight: bold; text-decoration: none; text-align: center; transition: 0.3s;
}
.glass-btn:hover { background: rgba(255, 255, 255, 0.2); border-color: #00BFFF; }
.action-btn { margin-top: 20px; border-color: rgba(0, 191, 255, 0.5); }
.download-btn { margin-top: 25px; border-color: rgba(255, 0, 127, 0.5); }

/* BULK QUEUE & FEATURES */
.container { background: rgba(255, 255, 255, 0.03); padding: 30px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.05); }
#fileList { max-height: 120px; overflow-y: auto; background: rgba(0, 0, 0, 0.3); padding: 10px; border-radius: 8px; font-family: monospace; font-size: 0.8em; margin-bottom: 15px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 20px; }
.feature-card { padding: 20px; background: rgba(255,255,255,0.02); border-radius: 15px; border: 1px solid rgba(255,255,255,0.05); }

/* STATUS BAR */
.system-status-bar {
    position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(11, 13, 15, 0.95);
    display: flex; justify-content: center; gap: 30px; padding: 10px; font-size: 0.7em; color: rgba(255,255,255,0.4); border-top: 1px solid rgba(0, 191, 255, 0.2);
}
.dot { height: 8px; width: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.green { background: #00ff88; box-shadow: 0 0 8px #00ff88; }
.blue { background: #00BFFF; box-shadow: 0 0 8px #00BFFF; }

.hidden { display: none !important; }

/* FIXED MOBILE VIEW: Stacks columns up and down */
@media (max-width: 900px) {
    .flex-layout { 
        flex-direction: column !important; 
        gap: 20px; 
    }
    
    /* Corrects vertical swap logic on mobile */
    .flex-layout.swapped { 
        flex-direction: column-reverse !important; 
    }

    .column {
        width: 100%;
    }

    header { 
        flex-direction: column; 
        gap: 15px; 
        text-align: center; 
    }

    .toolbar {
        justify-content: center;
        width: 100%;
    }
}

/* OVERLAY */
#fullScreenOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 2000; display: flex; align-items: center; justify-content: center; }
#fullResImage { max-width: 90%; max-height: 85%; border: 1px solid #00BFFF; }
#closeOverlay { position: absolute; top: 20px; right: 20px; background: #ff007f; color: #fff; border: none; padding: 10px 20px; cursor: pointer; }
