:root {
	--sidebar-width: 300px;
	--accent: #265cff;
	--accent-hover: #4d4cff;
}

* { box-sizing: border-box; }

.app-container {
	display: flex;
}

.sidebar1 {
	width: var(--sidebar-width);
	min-width: var(--sidebar-width);
	padding-right: 24px;
	overflow-y: auto;
	flex-shrink: 0;
}

.control-group { margin-bottom: 0px; }

.flex-row { 
	display: flex; 
	justify-content: space-between; 
	align-items: center; 
	margin-bottom: 8px; 
}

label { font-size: 0.85rem; font-weight: 600; color: #475569; }

.value-badge {
	font-family: monospace;
	font-size: 0.75rem;
	background: #f1f5f9;
	color: var(--accent);
	padding: 2px 8px;
	border-radius: 6px;
}

input[type="range"] { width: 100%; cursor: pointer; accent-color: var(--accent);}
input[type="color"] { 
	-webkit-appearance: none;
    appearance: none;
	width: 100%; height: 20px; 
	border: 1px solid #cccccc; 
	border-radius: 4px; 
	cursor: pointer; 
	background: none; 
	border-radius: 12px;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 10px;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 10px;
}

.preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.preset-grid button {
	padding: 6px; font-size: 0.75rem; border: 1px solid #e2e8f0;
	background: white; border-radius: 4px; cursor: pointer; transition: 0.2s;
}
.preset-grid button:hover { background: #f8fafc; border-color: var(--accent); color: var(--accent); }

.random-btn {
	width: 100%; margin-top: 8px; padding: 7px 10px; background: var(--accent);
	color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: bold;
}

.main-content {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	
}
.stick-it {
	position:sticky;
	top:80px;	
}

.preview-area {
	height: 400px;
	min-height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: url('image1.jpg') center/cover;
	transition: 0.4s;
	padding: 20px;
	border-radius: 10px;
}

.glass-wrapper {
    width: 100%;
    max-width: 450px;
	min-height: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    transform: translateZ(0); 
}

.glass-content {
    width: 100%;
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.output-area {
	flex-grow: 0;
	overflow-y: auto;
	margin-top:5px;
}

.bg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.bg-option { aspect-ratio: 16/9; border-radius: 4px; cursor: pointer; border: 2px solid transparent; }

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0px 6px;
}

.header-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.label-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.bg-grid-mini {
    display: flex;
    gap: 8px;
}

.bg-grid-mini .bg-option {
    width: 54px;
    height: 32px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
    transition: transform 0.2s;
}

.bg-grid-mini .bg-option:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 1px var(--accent);
}

.shuffle-bg-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    margin-left: 4px;
}

.shuffle-bg-btn:hover {
    background: var(--accent);
    color: white;
    transform: rotate(15deg);
}

/* Grouping Cards */
.settings-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 16px;
    margin-bottom: 16px;
}

.section-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 12px;
}

.no-margin { margin: 0; }
.mt-12 { margin-top: 12px; }

.spinner-loader {
    position: absolute;
    top: 75px;
    right: 20px;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-loader.show {
    opacity: 1;
}

@media (max-width: 900px) {
	.app-container { flex-direction: column; overflow-y: auto; }
	.sidebar1 { width: 100%; height: auto; border-right: none; border-bottom: 1px solid #e2e8f0; }
	.preview-area { height: 350px; min-height: 350px; }
	.glass-card { width: 90%; padding: 20px; }
	.preview-header {flex-direction: column;}
}