/* =========================
    Base & Typography
    ========================= */
:root {
	/* --- Nature's Vibration Theme --- */
	/* Sage (Primary) */
	--primary-color: #97B881;
	--primary-dark: #7A9665;
	--primary-light: #B5CEA5;
	--primary-color-rgb: 151, 184, 129;

	/* Coral (Secondary/Highlight) */
	--highlight-color: #E88D78;
	--highlight-dark: #C06C5A;
	--highlight-light: #F2B0A0;
	--highlight-dark-rgb: 192, 108, 90;

	/* Neutrals */
	--text-color: #2D3436; /* Charcoal */
	--text-light: #636E72; /* Slate Grey */
	--text-lighter: #9EADBA;
	--text-on-highlight: #FFFFFF;
	
	--secondary-color: #FFFFFF;
	--secondary-color-rgb: 255, 255, 255;
	--background-main: #FAFCF9; /* Off-White */
    --panel-bg: rgba(var(--secondary-color-rgb), 0.94);
	
	--border-color: #E0E6DE;
	--border-light: #F0F4EF;

	/* Enhanced Background Gradient (Nature's Vibration V1.7.0) */
	--celestial-dark: #eef5e9; /* Light Sage Forest */
	--celestial-mid: #f7faf3;  /* Morning Mist */
	--celestial-light: #fcfdfa; /* Pure Light */
	--celestial-accent: #fdf5f2; /* Soft Coral Glow */

	/* Structural Variables */
	--font-family: "Poppins", sans-serif;
	--heading-font: "Quicksand", sans-serif;
	--font-mono: "Fira Code", "Consolas", monospace;
	--transition: 0.3s ease-in-out;
	--border-radius: 12px;
	--panel-padding: 24px;
	--input-padding: 12px 16px;
	--control-gap: 18px;
	--shadow-xs: 0 1px 3px rgba(45, 52, 54, 0.04);
	--shadow-sm: 0 2px 8px rgba(45, 52, 54, 0.04);
	--shadow-md: 0 6px 16px rgba(45, 52, 54, 0.06);
	--shadow-lg: 0 15px 35px rgba(45, 52, 54, 0.08);
	--tag-color: #97B881;
	--navbar-height: 70px;
	--control-panel-width: 35%;
	--panel-bg-alpha: 0.95;
	--panel-blur: 10px;
}
html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--navbar-height);
}
/* NEW: Full-height layout for the studio app */
html,
body {
	height: 100%;
}
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
body {
	font-size: 16px;
	font-family: var(--font-family);
	color: var(--text-color);
	background: 
        radial-gradient(circle at 5% 5%, rgba(var(--primary-color-rgb), 0.12) 0%, transparent 50%),
        radial-gradient(circle at 95% 95%, rgba(var(--highlight-dark-rgb), 0.12) 0%, transparent 50%),
        linear-gradient(
            150deg,
            var(--celestial-dark) 0%,
            var(--celestial-mid) 30%,
            var(--celestial-light) 70%,
            var(--celestial-accent) 100%
        );
	background-attachment: fixed;
	transition: background var(--transition), color var(--transition);
	line-height: 1.7;
	padding-top: var(--navbar-height);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* NEW: Flex column layout for studio app */
	display: flex;
	flex-direction: column;
}

/* Disable scrolling when menu is open */
.no-scroll {
	overflow: hidden !important;
}
@media (max-width: 1200px) {
	body {
		padding-left: 0;
		padding-right: 0;
	}
}
@media (max-width: 768px) {
	body {
		padding-left: 0;
		padding-right: 0;
		font-size: 15px;
		height: auto; /* Revert to normal flow for mobile */
	}
	html {
		scroll-padding-top: var(--navbar-height);
		height: auto;
	}
}
h1,
h2,
h3 {
	font-family: var(--heading-font);
	font-weight: 700;
	line-height: 1.3;
	color: var(--primary-color);
}
h1.main-title {
	text-align: center;
	margin-bottom: 30px;
	font-size: 2.2em;
	font-weight: 700;
	color: var(--primary-color);
}
h2 {
	font-size: 1.6em;
	margin-bottom: 20px;
	font-weight: 600;
}
h3 {
	font-size: 1.2em;
	margin-bottom: 18px;
	font-weight: 600;
}
p {
	margin-bottom: 1.1em;
	color: var(--text-light);
	font-size: 0.95em;
}
a {
	color: var(--primary-color);
	text-decoration: none;
	transition: color var(--transition);
}
a:hover {
	color: var(--primary-dark);
	text-decoration: underline;
}
img {
	max-width: 100%;
	height: auto;
	display: block;
}
hr.section-divider {
	border: none;
	border-top: 1px solid var(--border-light);
	margin: 25px 0;
}

/* =========================
    Navbar (Modernized)
    ========================= */
.navbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: rgba(var(--secondary-color-rgb), 0.98);
	padding: 10px 4%; /* Use % for responsive padding */
	height: var(--navbar-height);
	box-shadow: var(--shadow-md); /* Standard shadow */
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%; /* Full width */
	z-index: 1000;
	transition: background 0.3s ease, box-shadow 0.3s ease;
	margin-bottom: 0;
	flex-shrink: 0; /* Prevent navbar from shrinking */
}
.navbar .logo img {
	width: 180px;
	vertical-align: middle;
	transition: transform var(--transition);
}
.navbar .logo img:hover {
	transform: scale(1.05);
}
.navbar-actions {
	display: flex;
	align-items: center;
	gap: 5px; /* Reduce space between buttons */
}
.studio-title-nav {
	font-size: 1.1em;
	font-weight: 600;
	color: var(--text-color);
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	padding: 8px 15px;
	background: rgba(255, 255, 255, 0.8);
	border-radius: 6px;
}
.navbar ul {
	list-style: none;
	display: flex;
	gap: 25px;
	align-items: center;
	margin-left: auto; /* Push nav items to the right */
}
.navbar ul li a {
	text-decoration: none;
	color: var(--text-light);
	font-size: 0.9em;
	font-weight: 500;
	text-transform: uppercase;
	padding: 8px 0;
	transition: color var(--transition);
	position: relative;
	letter-spacing: 0.5px;
}
.navbar ul li a::after {
	content: "";
	position: absolute;
	width: 100%;
	height: 2px;
	background-color: var(--primary-color);
	left: 0;
	bottom: -4px;
	transform: scaleX(0);
	transform-origin: bottom right;
	transition: transform var(--transition);
}
.navbar ul li a:hover,
.navbar ul li a:focus {
	color: var(--primary-color);
}
.navbar ul li a:hover::after,
.navbar ul li a:focus::after {
	transform-origin: bottom left;
	transform: scaleX(1);
}
.navbar ul li a:focus-visible {
	outline: 2px solid var(--primary-color);
	outline-offset: 4px;
}
.navbar .hamburger {
	display: none;
	font-size: 1.8em;
	cursor: pointer;
	color: var(--primary-color);
	padding: 6px 10px;
	background: none;
	border: none;
	transition: color var(--transition), transform var(--transition);
}
.navbar .hamburger:hover {
	color: var(--primary-dark);
	transform: scale(1.1);
}
@media (max-width: 992px) {
	.studio-title-nav {
		display: none;
	}
	.navbar .hamburger {
		display: block;
		margin-right: 5px;
	}
	.navbar ul {
		display: none;
		flex-direction: column;
		background: rgba(var(--secondary-color-rgb), 0.98); /* Semi-transparent background for dropdown */
		position: absolute;
		top: var(--navbar-height);
		right: 0;
		left: 0;
		width: 100%;
		box-shadow: var(--shadow-lg);
		overflow: hidden;
		padding: 10px 0;
		z-index: 1001;
		border-top: 1px solid var(--border-light);
		margin-left: 0; /* Reset margin for mobile view */
	}
	.navbar ul.active {
		display: flex;
	}
	.navbar ul li {
		text-align: center;
		margin: 0;
		width: 100%;
	}
	.navbar ul li a:not(.cta) {
		display: block;
		padding: 7px 20px;
		border-bottom: 1px solid var(--border-light);
		color: var(--text-color);
		font-size: 0.9em;
		font-weight: 500;
		text-transform: uppercase;
		transition: color var(--transition), background-color var(--transition);
	}
	.navbar ul li a:not(.cta):hover,
	.navbar ul li a:not(.cta):focus {
		color: var(--primary-color);
		background-color: rgba(var(--primary-color-rgb), 0.05);
	}
	.navbar ul.active li:has(a.cta) {
		padding: 5px 15px;
		border-bottom: none;
	}
	.navbar ul.active li a.cta {
		display: block;
		width: auto;
		margin: 5px auto;
		padding: 6px 20px;
		font-size: 0.8em;
	}
	.navbar ul li:last-child a:not(.cta) {
		border-bottom: none;
	}
	.navbar ul.active li:last-child:has(a.cta) {
		border-bottom: none;
	}
}

/* =========================
    Studio Layout (Full Screen)
    ========================= */
.studio-layout {
	display: flex;
	position: relative;
	gap: 10px;
	padding: 10px 1%; /* Responsive padding */
	max-width: 1920px;
	margin: 0 auto;
	flex-grow: 1; /* NEW: Makes layout fill remaining vertical space */
	min-height: 0; /* NEW: Fixes flexbox overflow issues */
}

/* =========================
    Unified Control Panel (Modernized)
    ========================= */
.control-panel {
	width: var(--control-panel-width);
	flex-shrink: 0;
	max-height: 100%; /* NEW: Constrain height to parent */
	display: flex;
	flex-direction: column;
	z-index: 10;
	background-color: var(--panel-bg);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}
.panel-tabs {
	display: flex;
	border-bottom: 2px solid var(--border-color); /* Thicker bottom border */
	flex-shrink: 0;
	background-color: rgba(var(--primary-color-rgb), 0.03);
}
.panel-tab-btn {
	flex: 1;
	padding: 14px 10px;
	font-size: 0.9em;
	font-weight: 600;
	color: var(--text-light);
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	transition: all var(--transition);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
    margin-bottom: -2px; /* Pull down to cover container border */
}
.panel-tab-btn:hover {
	background-color: rgba(var(--primary-color-rgb), 0.05);
	color: var(--primary-color);
}
.panel-tab-btn.active {
	color: var(--highlight-dark);
	border-bottom-color: var(--highlight-color);
	background-color: var(--secondary-color);
    border-top: 1px solid var(--border-color); /* Add top border */
    border-left: 1px solid var(--border-color); /* Add left border */
    border-right: 1px solid var(--border-color); /* Add right border */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* --- Visual Color Picker --- */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)); /* Adaptive columns */
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
}
.color-dot {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%; /* Circle */
    cursor: pointer;
    border: 3px solid transparent; /* Thicker border for selection visibility */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}
.color-dot:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 2;
}
.color-dot.active {
    border-color: var(--text-color);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.8), 0 4px 12px rgba(0,0,0,0.3);
}
.color-dot.active::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    font-size: 14px;
}

.randomize-section {
    margin-bottom: 20px !important;
}

/* --- Random Color Row --- */
.random-color-row {
    display: flex;
    gap: 6px; /* Slightly tighter gap to fit 10 */
    justify-content: space-evenly; 
    margin-top: 6px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}
@media (max-width: 480px) {
    .panel-tab-btn {
        flex-direction: column;
        font-size: 0.75em;
        padding: 8px 2px;
    gap: 1px;
    }
    .panel-tab-btn i {
        font-size: 1.1em;
    }
}
.random-color-row .color-dot {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

/* --- Eco Mode Button --- */
.btn-eco {
    width: 100%;
    justify-content: center;
    background: white;
    border: 2px dashed #94a3b8;
    color: #64748b;
    margin-bottom: 10px;
}
.btn-eco:hover {
    border-color: #64748b;
    background: #f1f5f9;
    color: #475569;
}
.btn-eco.active {
    background: #1e293b;
    color: white;
    border-style: solid;
    border-color: #1e293b;
}

/* --- Toggle Group Adjustments --- */
.toggle-group .tooltip {
    flex-basis: 100%;
}

.panel-tab-content {
	display: none;
	padding: var(--panel-padding);
	overflow-y: auto;
	flex-grow: 1;
}
.panel-tab-content.active {
	display: block;
}
.panel-tab-content details {
	border: none;
	border-bottom: 1px solid var(--border-light);
	border-radius: 0;
	margin-bottom: 0;
	background: transparent; /* Cleaner look */
	transition: border-color var(--transition);
}
.panel-tab-content details:last-of-type {
	border-bottom: none;
}
.panel-tab-content details[open] {
	border-color: var(--border-color);
}
.panel-tab-content summary {
	padding: 14px 10px; /* More breathable */
	font-weight: 600;
	color: var(--text-color);
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1em;
	transition: background-color var(--transition);
	border-radius: var(--border-radius);
}
.panel-tab-content summary:hover {
	background-color: rgba(var(--highlight-dark-rgb), 0.04);
}
.panel-tab-content summary i {
	color: var(--highlight-color);
}
.panel-tab-content summary::marker {
	display: none;
}
.panel-tab-content summary::-webkit-details-marker {
	display: none;
}
.panel-tab-content summary::after {
	content: "\25BC";
	font-size: 0.7em;
	margin-left: auto;
	transition: transform var(--transition);
	color: var(--text-light);
	transform: rotate(0deg);
}
.panel-tab-content details[open] > summary::after {
	transform: rotate(180deg);
}
.panel-tab-content details > div,
.panel-tab-content details > fieldset {
	padding: 5px 10px 15px 10px; /* Tighter padding */
	border-top: 1px solid var(--border-light);
}

/* =========================
    Main Content Area (Chart) (Modernized)
    ========================= */
.main-content {
	flex-grow: 1;
	padding: 0;
	position: relative;
	min-width: 0;
	display: flex;
	flex-direction: column;
	height: 100%;
	max-height: 100%;
}
#chart-preview-section {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 20px;
	background-color: var(--panel-bg);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
	margin-bottom: 25px;
}
#chartContainer {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 auto;
	border: 1px solid var(--border-color);
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.07);
	border-radius: var(--border-radius);
	overflow: hidden;
	max-width: 100%;
	flex-grow: 1;
	min-height: 250px;
	background-color: var(--secondary-color);
	width: 100%;
}
#chartCanvas {
	display: block;
	max-width: 100%;
	max-height: 100%;
	height: auto;
	object-fit: contain;
	transition: opacity 0.4s ease-in-out;
}
.canvas-info-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(45, 52, 54, 0.75);
	backdrop-filter: blur(8px);
	color: #fff;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 11px;
	font-family: var(--font-body);
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
	z-index: 10;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.fade-in {
	animation: fadeInCanvas 0.6s ease-out forwards;
}
@keyframes fadeInCanvas {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.spinner-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.95);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 5;
	border-radius: var(--border-radius);
}
.spinner-overlay.visible {
	display: flex;
}
.spinner-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}
.spinner-content i {
	font-size: 2.5em;
	color: var(--primary-color);
	animation: spin 1.5s linear infinite;
}
.spinner-text {
	font-size: 14px;
	font-weight: 500;
	color: var(--text-color);
}
.spinner-progress {
	width: 180px;
	height: 6px;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 3px;
	overflow: hidden;
}
.spinner-progress-fill {
	height: 100%;
	width: 0%;
	background: var(--primary-color);
	border-radius: 3px;
	transition: width 0.3s ease;
}
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
.labels-help {
	font-size: 0.85em;
	color: var(--text-lighter);
	margin-top: 8px;
	text-align: center;
	flex-shrink: 0;
}

/* =========================
    Enhanced Interactive Toolbar (Modernized)
    ========================= */
.chart-toolbar {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: var(--panel-bg);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-md);
	margin-bottom: 24px;
	position: relative;
	flex-wrap: wrap;
}
.toolbar-button {
	background: none;
	border: none;
	color: var(--text-light); /* Minimalist default */
	font-size: 1.1em;
	padding: 12px;
	border-radius: var(--border-radius);
	cursor: pointer;
	transition: all var(--transition);
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	position: relative;
}
.toolbar-button::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(var(--highlight-dark-rgb), 0.1);
	border-radius: var(--border-radius);
	opacity: 0;
	transition: opacity var(--transition);
}
.toolbar-button:hover::before {
	opacity: 1;
}
.toolbar-button:hover {
	color: var(--highlight-color);
	transform: translateY(-1px);
}
.toolbar-button.active {
	background: rgba(var(--highlight-dark-rgb), 0.15);
	box-shadow: inset 0 0 8px rgba(var(--highlight-dark-rgb), 0.2);
	color: var(--highlight-dark);
}
.toolbar-button:disabled {
	color: #aaa;
	cursor: not-allowed;
	transform: none;
}
.toolbar-button:disabled:hover {
	background-color: transparent;
}
.toolbar-button:disabled::before {
	opacity: 0;
}
.toolbar-button.disabled {
	opacity: 0.5;
}
.toolbar-separator {
	height: 24px;
	width: 1px;
	background: linear-gradient(
		180deg,
		transparent,
		var(--border-color),
		transparent
	);
	border: none;
	margin: 0 8px;
}
.slider-popup {
	display: none;
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	background-color: var(--secondary-color);
	padding: 10px 15px;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--border-color);
	z-index: 1010;
	align-items: center;
	gap: 10px;
	width: 220px;
}
.slider-popup.visible {
	display: flex;
}
.slider-popup input[type="range"] {
	flex-grow: 1;
	height: 6px;
	border-radius: 3px;
	background: var(--border-light);
	cursor: pointer;
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
}
.slider-popup input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--primary-color);
	cursor: pointer;
	border: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.slider-popup input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--primary-color);
	cursor: pointer;
	border: none;
}
.slider-popup span.value {
	font-size: 0.9em;
	color: var(--text-light);
	font-weight: 500;
	min-width: 25px;
	text-align: right;
}
.control-row {
	display: flex;
	justify-content: center;
	margin: 5px 0 5px 0;
	flex-shrink: 0;
}
.export-group {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 5px 0;
	flex-shrink: 0;
}

/* =========================
    Forms & Inputs within Panels
    ========================= */
.input-group {
	margin-bottom: var(--control-gap);
	position: relative;
}
.input-group label,
label {
	display: block;
	font-weight: 500;
	margin-bottom: 8px;
	color: var(--text-light);
	font-size: 0.95em;
	display: flex;
	align-items: center;
	gap: 8px;
}
.input-group label i {
	color: var(--highlight-color);
	font-size: 1.1em;
	width: 1.3em;
	text-align: center;
}
input[type="text"],
input[type="number"],
select {
	width: 100%;
	padding: var(--input-padding);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	background: var(--secondary-color);
	font-size: 0.95em;
	font-family: inherit;
	transition: box-shadow var(--transition), border-color var(--transition);
	color: var(--text-color);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}
select {
	padding-right: 35px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235e4259'%3E%3Cpath fill-rule='evenodd' d='M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd' /%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.8em center;
	background-size: 1.3em;
}
input:focus,
select:focus {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.15);
	outline: none;
}
.tooltip {
	font-size: 0.85em;
	color: var(--text-lighter);
	margin-top: 5px;
	margin-bottom: 5px;
	display: block;
}
.color-input-group {
	display: flex;
	align-items: center;
	gap: 8px;
}
.color-input-group label {
	margin-bottom: 0;
	flex-shrink: 0;
}
.color-input-group input[type="color"] {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	padding: 0;
	cursor: pointer;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* WebKit wrapper & swatch tweaks */
input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 50%;
}
input[type="color"]::-webkit-color-swatch {
	border: none;
	border-radius: 50%;
}
/* Hover & focus states */
input[type="color"]:hover {
	transform: scale(1.1);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
input[type="color"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.4);
}
.slider-group {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: var(--control-gap);
	flex-wrap: wrap;
}
.slider-group label {
	flex-basis: 120px;
	flex-shrink: 0;
	margin-bottom: 0;
	font-size: 0.95em;
}
/* SLIDER STYLE */
.slider-group input[type="range"] {
	flex: 1;
	min-width: 100px;
	-webkit-appearance: none;
	appearance: none;
	width: auto;
	height: 8px;
	border-radius: 4px;
	background: var(--border-color);
	outline: none;
	transition: background var(--transition);
	cursor: pointer;
	vertical-align: middle;
}
.slider-group input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--primary-color);
	cursor: pointer;
	border: none;
	transition: transform var(--transition), box-shadow var(--transition);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.slider-group input[type="range"]:hover::-webkit-slider-thumb {
	box-shadow: 0 0 0 5px rgba(var(--primary-color-rgb), 0.2);
	transform: scale(1.08);
}
.slider-group input[type="range"]:active::-webkit-slider-thumb {
	transform: scale(1.15);
}
.slider-group input[type="range"]::-moz-range-thumb {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--primary-color);
	cursor: pointer;
	border: none;
}
.slider-group input[type="range"]:focus {
	outline: none;
}
.slider-group input[type="range"]:focus::-webkit-slider-thumb {
	box-shadow: 0 0 0 5px rgba(var(--primary-color-rgb), 0.25);
}
.slider-group input[type="range"]:focus::-moz-range-thumb {
	box-shadow: 0 0 0 5px rgba(var(--primary-color-rgb), 0.25);
}
.slider-group span.value {
	width: 40px;
	text-align: right;
	font-weight: 500;
	font-size: 0.95em;
	color: var(--text-light);
	flex-shrink: 0;
}
.toggle-group {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}
.toggle-group label:first-of-type {
	flex-grow: 1;
	font-size: 0.9em;
	font-weight: 500;
}
.toggle-group .tooltip {
	flex-basis: 100%;
	text-align: left;
	margin-top: 2px;
	margin-bottom: 10px;
	padding-left: 0;
}
.toggle-container {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 22px;
	flex-shrink: 0;
}
.toggle-container input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}
.toggle-container .slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: var(--transition);
	border-radius: 22px;
}
.toggle-container .slider:before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: var(--transition);
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
input:checked + .slider {
	background-color: var(--highlight-color);
}
input:focus + .slider {
	box-shadow: 0 0 0 3px rgba(var(--highlight-dark-rgb), 0.25);
}
input:checked + .slider:before {
	transform: translateX(22px);
}
fieldset.settings-group {
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	padding: 20px;
	margin-bottom: 20px;
	background: rgba(var(--primary-color-rgb), 0.02);
	box-shadow: var(--shadow-sm);
}
fieldset.settings-group:first-of-type {
	margin-top: 0;
}
fieldset.settings-group legend {
	font-weight: 600;
	color: var(--primary-dark);
	padding: 0 10px;
	margin-left: 10px;
	font-size: 1.1em;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	width: auto;
}
fieldset.settings-group legend i {
	font-size: 1em;
	color: var(--primary-color);
}
.layers-container {
	margin-top: 12px;
	border: 1px solid rgba(var(--primary-color-rgb), 0.12);
	border-radius: var(--border-radius);
	padding: 5px;
	background: rgba(var(--primary-color-rgb), 0.02);
	box-shadow: var(--shadow-xs);
}
.layer-card {
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	background: var(--secondary-color);
	margin-bottom: 8px;
	box-shadow: var(--shadow-sm);
	transition: all var(--transition);
}
.layer-card:last-child {
	margin-bottom: 0;
}
.layer-card:hover {
	border-color: rgba(var(--primary-color-rgb), 0.3);
	box-shadow: var(--shadow-md);
}
.layer-card.selected {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.15),
		var(--shadow-md);
	background: rgba(var(--primary-color-rgb), 0.02);
}
/* New style for preset target */
.layer-card.preset-target {
	border-color: var(--highlight-color);
	box-shadow: 0 0 0 2px rgba(var(--highlight-dark-rgb), 0.25),
		var(--shadow-md);
}

.tag-container {
	flex: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	border: 1px solid var(--border-color);
	padding: 6px 8px;
	border-radius: var(--border-radius);
	min-height: 50px;
	background: var(--secondary-color);
	align-items: center;
	box-shadow: var(--shadow-xs);
	transition: all var(--transition);
}
.tag-container:hover {
	border-color: rgba(var(--primary-color-rgb), 0.2);
}
.tag-input {
	border: none;
	flex-grow: 1;
	min-width: 150px;
	font-size: 0.95em;
	outline: none;
	background: transparent;
	padding: 6px 0;
	font-family: inherit;
	color: var(--text-color);
}
.tag {
	background: linear-gradient(
		135deg,
		var(--primary-color),
		var(--primary-light)
	);
	color: var(--secondary-color);
	padding: 6px 10px;
	border-radius: var(--border-radius);
	font-size: 0.75em;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: move;
	transition: all var(--transition);
	white-space: nowrap;
	box-shadow: var(--shadow-sm);
	font-weight: 500;
}
.tag:hover {
	background: linear-gradient(
		135deg,
		var(--primary-dark),
		var(--primary-color)
	);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}
.tag .remove-tag {
	cursor: pointer;
	font-weight: bold;
	font-size: 1.2em;
	line-height: 1;
	opacity: 0.7;
	transition: all var(--transition);
	padding: 4px;
	display: inline-block;
	background: none;
	border: none;
	color: inherit;
	border-radius: 50%;
}
.tag:hover .remove-tag {
	opacity: 1;
	background: rgba(255, 255, 255, 0.2);
}
.tag-subtext {
	opacity: 0.7;
	font-size: 0.85em;
	font-weight: normal;
	border-left: 1px solid rgba(255,255,255,0.3);
	padding-left: 6px;
	margin-left: 2px;
}
.tag.has-color {
	padding-left: 16px;
	position: relative;
	overflow: hidden;
}
.tag.has-color::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 6px;
	background-color: var(--tag-color, transparent);
	box-shadow: 1px 0 3px rgba(0,0,0,0.1);
}
.remove-layer {
	background: none;
	border: 1px solid transparent;
	color: var(--text-light);
	font-size: 1.2em;
	cursor: pointer;
	padding: 0;
	transition: all var(--transition);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    line-height: 1;
}
.remove-layer:hover {
	color: #dc3545;
	background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
}
.dragging {
	opacity: 0.8;
	box-shadow: var(--shadow-lg);
	border-color: var(--primary-color);
}
.tag.dragging {
	opacity: 0.7;
	box-shadow: none;
}
.tag.drop-target {
	box-shadow: -4px 0 0 0 var(--highlight-color);
}
.tag.drop-after {
	box-shadow: 4px 0 0 0 var(--highlight-color);
}
.fade-in-tag {
	animation: fadeInTag 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInTag {
	from {
		opacity: 0;
		transform: scale(0.8) translateY(4px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}
.fade-out-tag {
	animation: fadeOutTag 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes fadeOutTag {
	from {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
	to {
		opacity: 0;
		transform: scale(0.8) translateY(4px);
	}
}
.layer-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 15px;
}
.layer-buttons,
.settings-io-buttons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
}
.layer-buttons .btn,
.settings-io-buttons .btn {
	padding: 8px 12px;
	font-size: 0.8em;
	border-radius: 20px;
}
.layer-buttons .btn.btn-secondary:hover,
.settings-io-buttons .btn.btn-secondary:hover {
	background: #e9ecef;
	border-color: #adb5bd;
	color: var(--primary-color);
}
.layer-buttons .btn-danger-hover {
	background-color: #ffe8e9;
	border-color: #fcc6cb;
	color: #c93e4a;
}
.layer-buttons .btn-danger-hover:hover {
	background-color: #ffc1c6;
	border-color: #f7adb3;
	color: #a0212e;
}
.quick-presets-section {
	margin-top: 5px;
}
.quick-presets-section label {
	margin-bottom: 10px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1em;
}
.quick-presets {
	margin-top: 6px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 12px;
}
.quick-preset {
	padding: 8px 16px;
	background: var(--border-light);
	border: 1px solid var(--border-color);
	border-radius: 20px;
	font-size: 0.9em;
	color: var(--text-light);
	font-weight: 500;
	cursor: pointer;
	transition: all var(--transition);
	box-shadow: var(--shadow-sm);
}
.quick-preset:hover {
	background: #e9ecef;
	border-color: #adb5bd;
	color: var(--highlight-color);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}
#openPresetModalBtn.btn-view-all {
	font-size: 0.9em !important;
	padding: 8px 16px !important;
	width: 100%;
	margin-top: 10px;
}

/* =========================
    Layer Header & Quick Actions (UPDATED)
    ========================= */
.layer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 8px;
	background-color: rgba(var(--primary-color-rgb), 0.03);
	border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.layer-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.layer-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-grow: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.layer-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.7em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.layer-summary {
    font-size: 0.75em;
    color: var(--text-light);
    white-space: nowrap;
    font-weight: 500;
}
.header-divider {
    width: 1px;
    height: 16px;
    background-color: var(--border-light);
    margin: 0 1px;
}
.layer-card.is-collapsed .layer-header {
	border-bottom-color: transparent;
}
.layer-toggle-btn {
	background: none;
	border: none;
	color: var(--text-light);
	cursor: pointer;
	padding: 5px;
	font-size: 1em;
	transition: transform var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.layer-toggle-btn i {
	display: block;
	transition: transform var(--transition);
}
.layer-card.is-collapsed .layer-toggle-btn i {
	transform: rotate(-90deg);
}
.move-up-btn,
.move-down-btn {
	padding: 5px !important;
	width: 26px !important;
	height: 26px !important;
	font-size: 0.9em !important;
}
.move-up-btn:disabled,
.move-down-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
	background-color: transparent !important;
}
.layer-quick-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}
.quick-action-btn {
	background: none;
	border: 1px solid transparent;
	color: var(--text-light);
	font-size: 0.9em;
	padding: 6px;
	border-radius: 4px;
	cursor: pointer;
	line-height: 1;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all var(--transition);
}
.quick-action-btn:hover:not(:disabled) {
	color: var(--primary-color);
	background-color: rgba(var(--primary-color-rgb), 0.1);
	border-color: rgba(var(--primary-color-rgb), 0.2);
}
.layer-color-control {
	display: flex;
	align-items: center;
	gap: 4px;
}
.quick-action-layer-color {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	border: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	padding: 0;
	background-color: #000;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quick-action-layer-color::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 50%;
}
.quick-action-layer-color::-webkit-color-swatch {
	border: none;
	border-radius: 50%;
}
.quick-action-layer-color:hover {
	transform: scale(1.2);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.clear-color-btn:hover {
	color: #dc3545;
	background-color: rgba(220, 53, 69, 0.1);
	border-color: rgba(220, 53, 69, 0.2);
}
.quick-actions-toggle-container {
	position: relative;
	display: inline-block;
}
.quick-actions-popup {
	position: absolute;
	top: calc(100% + 5px);
	right: 0;
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
	padding: 8px;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 4px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px) scale(0.95);
	transform-origin: top right;
	transition: opacity var(--transition), transform var(--transition),
		visibility 0s var(--transition);
}
.quick-actions-popup.visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	transition: opacity var(--transition), transform var(--transition),
		visibility 0s;
}

/* =========================
    Help Modal
   ========================= */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}
.shortcut-item {
    display: flex;
    align-items: center;
    background: rgba(var(--primary-color-rgb), 0.05);
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
}
.shortcut-keys {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-right: 15px;
}
.key-badge {
    background-color: #F8F9FA;
    border: 1px solid #DEE2E6;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-color);
    box-shadow: 0 2px 0 #CED4DA;
    font-family: var(--font-mono, 'Fira Code', 'Consolas', monospace);
}
.shortcut-description {
    font-size: 0.95em;
    color: var(--text-light);
}
.help-section {
    margin-bottom: 25px;
}
.help-section:last-child {
    margin-bottom: 0;
}
.help-section-title {
    font-size: 1.1em;
    color: var(--primary-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}
.quick-tips-list {
    list-style: none;
    padding: 20px;
    font-size: 0.9em;
    color: var(--text-color);
    background: #fdfdfe;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.quick-tips-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.6;
}
.quick-tips-list li:last-child {
    margin-bottom: 0;
}
.quick-tips-list i {
    color: var(--highlight-color);
    font-size: 1.1em;
    margin-top: 4px;
    width: 20px;
    text-align: center;
}
.shortcuts-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.shortcut-item-new {
    display: flex;
    align-items: center;
    background: #FAFAFA;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.shortcut-item-new:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}
.shortcut-keys-new {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-right: 12px;
}
.shortcut-description-new {
    font-size: 0.9em;
    color: var(--text-color);
}
.key-badge {
    background: #FFFFFF;
    border: 1px solid #DEE2E6;
    border-bottom-width: 3px;
    border-radius: 6px;
    padding: 4px 9px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--highlight-dark);
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
    font-family: 'Poppins', sans-serif;
    line-height: 1.4;
}

.layer-content {
	padding: 6px;
	overflow: hidden;
	transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
}
.layer-card.is-collapsed .layer-content {
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
	overflow: hidden;
}
.layer-card.is-hidden {
	opacity: 0.6;
	background-color: #f8f9fa; /* A slightly off-white to indicate disabled state */
}

.layer-card.is-hidden:hover {
	opacity: 0.8;
}

/* =========================
    Layer Height & Font Control (Unified)
    ========================= */
.layer-height-control,
.layer-font-control {
	position: relative;
}
.layer-height-popup,
.layer-font-popup {
	display: none;
	position: absolute;
	top: calc(100% + 5px);
	left: -50%;
	transform: translateX(-50%) scale(0.95);
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
	padding: 12px 15px;
	z-index: 20;
	opacity: 0;
	transition: opacity var(--transition), transform var(--transition);
	transform-origin: top center;
}
.layer-height-popup.visible,
.layer-font-popup.visible {
	display: block;
	opacity: 1;
	transform: translateX(-50%) scale(1);
}
.layer-height-popup-content {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}
.layer-height-popup .layer-height-slider,
.layer-font-popup .layer-font-slider {
	flex-grow: 1;
	-webkit-appearance: none;
	appearance: none;
	height: 6px;
	background: var(--border-light);
	outline: none;
	border-radius: 3px;
	cursor: pointer;
}
.layer-height-popup .layer-height-slider::-webkit-slider-thumb,
.layer-font-popup .layer-font-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	background: var(--primary-color);
	border-radius: 50%;
	cursor: pointer;
	border: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.layer-height-popup .layer-height-slider::-moz-range-thumb,
.layer-font-popup .layer-font-slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	background: var(--primary-color);
	border-radius: 50%;
	cursor: pointer;
	border: none;
}
.layer-height-popup .layer-height-value,
.layer-font-popup .layer-font-value {
	font-size: 0.9em;
	color: var(--text-light);
	font-weight: 500;
	min-width: 40px;
	text-align: right;
}
.layer-height-popup .layer-height-reset-btn,
.layer-font-popup .layer-font-reset-btn {
	background: none;
	border: none;
	color: var(--text-light);
	cursor: pointer;
	padding: 0;
	font-size: 1.1em;
	line-height: 1;
	transition: color 0.2s ease;
}
.layer-height-popup .layer-height-reset-btn:hover,
.layer-font-popup .layer-font-reset-btn:hover {
	color: var(--primary-color);
}

/* =========================
    Enhanced Buttons
    ========================= */
button,
.btn {
	padding: 12px 24px;
	font-size: 1em;
	font-family: inherit;
	border-radius: var(--border-radius);
	border: 2px solid transparent;
	cursor: pointer;
	transition: all var(--transition);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
	position: relative;
	overflow: hidden;
}
button:focus,
.btn:focus {
	outline: none;
	box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.25);
}
button:disabled,
.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	box-shadow: none !important;
	transform: none !important;
	background-color: #f8f9fa !important;
	border-color: #e9ecef !important;
	color: #6c757d !important;
}
.btn-primary,
#modalSaveBtn,
#titleModalSaveBtn,
#acceptCookiesModal,
#submitReviewBtn {
	background: linear-gradient(
		135deg,
		var(--primary-color),
		var(--primary-light)
	);
	color: var(--secondary-color);
	border-color: var(--primary-color);
	box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled),
#modalSaveBtn:hover:not(:disabled),
#titleModalSaveBtn:hover:not(:disabled),
#acceptCookiesModal:hover:not(:disabled),
#submitReviewBtn:hover:not(:disabled) {
	background: linear-gradient(
		135deg,
		var(--primary-dark),
		var(--primary-color)
	);
	border-color: var(--primary-dark);
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}
.btn-secondary,
#openPresetModalBtn,
.modal-buttons .btn:not(.btn-primary),
.preset-pagination button,
#rejectCookiesModal,
#modalCancelBtn,
#titleModalCancelBtn,
#presetCloseBtn,
#skipReviewBtn {
	background: var(--secondary-color);
	color: var(--text-color);
	border: 2px solid var(--border-color);
	box-shadow: var(--shadow-xs);
	font-size: 0.85em;
}
.btn-secondary:hover:not(:disabled),
#openPresetModalBtn:hover:not(:disabled),
.modal-buttons .btn:not(.btn-primary):hover:not(:disabled),
.preset-pagination button:hover:not(:disabled),
#rejectCookiesModal:hover:not(:disabled),
#modalCancelBtn:hover:not(:disabled),
#titleModalCancelBtn:hover:not(:disabled),
#presetCloseBtn:hover:not(:disabled),
#skipReviewBtn:hover:not(:disabled) {
	background: var(--border-light);
	border-color: var(--primary-color);
	color: var(--primary-color);
	box-shadow: var(--shadow-sm);
	transform: translateY(-1px);
}
#clearDataBtn {
	background: linear-gradient(135deg, #f8d7da, #f5c2c7);
	border-color: #f5c2c7;
	color: #842029;
	font-weight: 500;
}
#clearDataBtn:hover:not(:disabled) {
	background: linear-gradient(135deg, #f5c2c7, #e999a1);
	border-color: #e999a1;
	color: #842029;
	transform: translateY(-1px);
}
#addLayerBtn {
	background: linear-gradient(135deg, #d1e7dd, #b7e4c7);
	border-color: #b7e4c7;
	color: #0a3622;
	font-weight: 500;
}
#addLayerBtn:hover:not(:disabled) {
	background: linear-gradient(135deg, #b7e4c7, #95d5b2);
	border-color: #95d5b2;
	color: #0a3622;
	transform: translateY(-1px);
}

.btn-export,
#generateChartBtn,
.navbar .cta {
	background: linear-gradient(
		135deg,
		var(--highlight-color),
		var(--highlight-light)
	);
	color: var(--text-on-highlight);
	border: none;
	box-shadow: 0 4px 15px -5px rgba(var(--highlight-dark-rgb), 0.4);
	padding: 12px 24px;
	font-weight: 600;
	position: relative;
	text-decoration: none;
	text-transform: none;
	font-size: 1em;
	transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.btn-export:hover:not(:disabled),
#generateChartBtn:hover:not(:disabled),
.navbar .cta:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px -5px rgba(var(--highlight-dark-rgb), 0.5);
	color: var(--text-on-highlight);
	text-decoration: none;
}

.btn-export:active:not(:disabled),
#generateChartBtn:active:not(:disabled),
.navbar .cta:active:not(:disabled) {
	transform: translateY(1px);
	box-shadow: 0 2px 10px -3px rgba(var(--highlight-dark-rgb), 0.5);
	transition-duration: 0.05s;
}

#generateChartBtn {
	padding: 14px 40px;
	font-size: 1.1em;
}

/* =========================
    Modals (UPDATED)
    ========================= */
.modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background: rgba(0, 0, 0, 0.7);
	transition: opacity var(--transition);
}
.modal.is-visible {
	display: flex;
	align-items: center;
	justify-content: center;
}
.modal-content {
	background: var(--secondary-color);
	padding: 25px;
	border-radius: var(--border-radius);
	max-width: 500px;
	width: 90%;
	position: relative;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.modal-content > *:not(.modal-body) {
	flex-shrink: 0;
}
.modal-body {
    overflow-y: auto; /* Fallback for smaller screens */
    padding: 5px;
}

/* Correctly target the content container inside the Help Modal */
@media (min-width: 1024px) {
    #helpModal .shortcuts-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    #helpModal .modal-body {
        overflow-y: visible;
    }
}

/* Correctly target the content container inside the What's New Modal */
.whats-new-modal .whats-new-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}
@media (min-width: 1024px) {
    .whats-new-modal .whats-new-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    .whats-new-modal .modal-body {
        overflow-y: visible;
    }
}

/* [FIX] New class for scrollable modal content */
.modal-scrollable-content {
	overflow-y: auto;
	flex-grow: 1;
	padding-right: 15px;
	margin-right: -15px;
}
.modal-content h2 {
	font-size: 1.3em;
	margin-bottom: 5px;
	color: var(--primary-dark);
	text-align: left;
	border-bottom: 1px solid var(--border-light);
	padding-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.modal-content label,
.modal-label-static,
.modal-label-compact {
	font-size: 0.85em;
	margin-bottom: 5px;
	color: var(--text-light);
	display: block;
}
.modal-input-full {
	width: 100%;
	padding: 8px 10px;
	font-size: 0.9em;
	margin-bottom: 12px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	background: var(--secondary-color);
	min-height: 38px;
}
.modal-slider-group {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 15px;
	margin-bottom: 15px;
}
.modal-slider-group input[type="range"] {
	flex-grow: 1;
	-webkit-appearance: none;
	appearance: none;
	height: 6px;
	border-radius: 3px;
	background: var(--border-light);
	outline: none;
	cursor: pointer;
}
.modal-slider-group input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--primary-color);
	cursor: pointer;
	border: none;
}
.modal-slider-group input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--primary-color);
	cursor: pointer;
	border: none;
}
.modal-slider-group span.value {
	min-width: 30px;
	text-align: right;
	font-weight: 500;
	font-size: 0.95em;
	color: var(--text-light);
	flex-shrink: 0;
}
#titleModal .modal-control-row {
	margin-bottom: 15px;
}
#titleModal .modal-label-compact {
	width: auto;
	margin-right: 5px;
}
.modal-control-group {
	margin-bottom: 12px;
}
.modal-section-title {
	font-size: 0.95em;
	font-weight: 600;
	color: var(--primary-dark);
	margin-bottom: 12px;
	margin-top: 0;
}
.modal-control-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 15px;
	flex-wrap: wrap;
}
.modal-label-compact {
	font-size: 0.85em;
	color: var(--text-light);
	margin-bottom: 0;
	flex-shrink: 0;
	width: 75px;
}
.modal-slider-compact {
	flex-grow: 1;
	height: 6px;
	border-radius: 3px;
	background: var(--border-light);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	margin: 0;
}
.modal-slider-compact::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--primary-color);
	cursor: pointer;
	border: none;
}
.modal-slider-compact::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--primary-color);
	cursor: pointer;
	border: none;
}
.modal-value-display {
	font-size: 0.85em;
	color: var(--text-color);
	font-weight: 500;
	min-width: 25px;
	text-align: left;
	padding-left: 5px;
}
.modal-color-swatch-compact {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 30px;
	height: 30px;
	border: none;
	border-radius: 50%;
	padding: 0;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.modal-color-swatch-compact::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 50%;
}
.modal-color-swatch-compact::-webkit-color-swatch {
	border: none;
	border-radius: 50%;
}
.modal-color-swatch-compact:hover {
	transform: scale(1.1);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.modal-icon-btn {
	background: none;
	border: 1px solid transparent;
	color: var(--text-light);
	font-size: 0.9em;
	padding: 5px;
	border-radius: 4px;
	cursor: pointer;
	line-height: 1;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: auto;
}
.modal-control-row .modal-icon-btn {
	margin-left: 5px;
}
.modal-icon-btn:hover {
	color: var(--highlight-color);
	background-color: rgba(var(--highlight-dark-rgb), 0.05);
	border-color: rgba(var(--highlight-dark-rgb), 0.2);
}
.modal-icon-btn.active,
.modal-toggle-btn[aria-pressed="true"] {
	color: var(--highlight-color);
	background-color: rgba(var(--highlight-dark-rgb), 0.1);
}
.modal-toggle-btn {
	background: none;
	border: 1px solid var(--border-color);
	color: var(--text-light);
	font-size: 1em;
	padding: 6px 8px;
	border-radius: 4px;
	cursor: pointer;
	min-width: 36px;
}
.modal-toggle-btn:hover {
	border-color: var(--highlight-color);
	color: var(--highlight-color);
}
.modal-buttons-right {
	display: flex;
	gap: 8px;
}
.modal-buttons-compact {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 5px;
	padding-top: 15px;
	border-top: 1px solid var(--border-light);
}
.btn-compact-action {
	font-size: 0.8em;
	padding: 6px 10px;
	gap: 5px;
}
.btn-compact-action i {
	font-size: 1em;
}
#presetBtn {
	position: fixed;
	bottom: 32px;
	right: 32px;
	background: linear-gradient(
		135deg,
		var(--highlight-color),
		var(--highlight-light)
	);
	color: var(--text-on-highlight);
	border: none;
	border-radius: 50%;
	width: 64px;
	height: 64px;
	font-size: 1.8em;
	cursor: pointer;
	z-index: 1001;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-lg);
	transition: all var(--transition);
}
#presetBtn:hover {
	transform: scale(1.1) rotate(15deg);
	background: linear-gradient(
		135deg,
		var(--highlight-dark),
		var(--highlight-color)
	);
	box-shadow: var(--shadow-lg),
		0 0 20px rgba(var(--highlight-dark-rgb), 0.3);
}
#presetModal .modal-content {
	max-width: 700px;
}
.preset-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
	padding: 12px 8px;
}
.preset-item {
	background: var(--border-light);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	padding: 12px;
	cursor: pointer;
	text-align: left;
	transition: all var(--transition);
	font-size: 0.85em;
	box-shadow: var(--shadow-sm);
}
.preset-item strong {
	display: block;
	margin-bottom: 6px;
	color: var(--primary-dark);
	font-size: 1em;
	font-weight: 600;
}
.preset-item span {
	color: var(--text-light);
	font-size: 0.85em;
	line-height: 1.4;
	display: block;
	max-height: 4.2em;
	overflow: hidden;
	text-overflow: ellipsis;
}
.preset-item:hover {
	background: #e9ecef;
	border-color: var(--primary-light);
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}
.preset-pagination {
	display: flex;
	justify-content: center; /* [FIX] Changed from space-between */
	align-items: center;
	gap: 15px; /* [FIX] Added consistent gap */
	margin-top: 18px;
	padding-top: 12px;
	border-top: 1px solid var(--border-light);
}
/* [FIX] New styles for responsive pagination */
#presetPageInfo {
	flex-grow: 1;
	text-align: center;
}
#presetPrevBtn,
#presetNextBtn {
	flex-shrink: 0;
}
.preset-pagination button {
	padding: 7px 16px;
	font-size: 0.85em;
}
.preset-pagination button:disabled {
	background: #f0f0f0;
	border-color: #f0f0f0;
	color: var(--text-lighter);
	cursor: not-allowed;
}
#cookieConsentModal .modal-content p {
	text-align: left;
	margin-bottom: 18px;
	font-size: 0.9em;
	color: var(--text-light);
	line-height: 1.6;
}
#cookieConsentModal .modal-content p a {
	font-weight: 600;
	text-decoration: underline;
}
.modal-divider {
	border: none;
	border-top: 1px solid var(--border-light);
	margin: 25px 0 20px 0;
}

.donate-section {
	text-align: center;
}

.donate-section p {
	font-size: 0.9em;
	color: var(--text-light);
	margin-bottom: 15px;
	max-width: 350px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.6;
}

/* =========================
    Info Sections & Footer (for index.html)
    ========================= */
.info-sections-wrapper {
	background: var(--secondary-color);
	border: none;
	width: 100%;
	max-width: 1200px;
	margin: 30px auto;
	padding: 25px;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
}
.info-sections-wrapper .card {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	margin-bottom: 30px;
}
.info-sections-wrapper .card:last-child {
	margin-bottom: 0;
}
.info-sections-wrapper .card h2 {
	margin-top: 0;
	color: var(--primary-dark);
	font-size: 1.2em;
	margin-bottom: 18px;
	font-weight: 600;
	border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.2);
	padding-bottom: 12px;
	text-align: left;
	display: flex;
	align-items: center;
	gap: 10px;
}
.info-sections-wrapper .card h2 i {
	font-size: 1em;
	color: var(--primary-color);
}
.info-sections-wrapper .card p:first-of-type {
	font-size: 0.95em;
	color: var(--text-light);
	margin-bottom: 18px;
	line-height: 1.7;
}
.feature-section ul,
.guide-section ol {
	list-style: none;
	padding: 0;
	margin: 20px 0 0 0;
}
.feature-section li,
.guide-section li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 18px;
	padding-left: 4px;
}
.feature-section li i,
.guide-section li i {
	font-size: 1em;
	color: var(--primary-color);
	margin-top: 2px;
	flex-shrink: 0;
	width: 1.2em;
	text-align: center;
}
.feature-section li div strong,
.guide-section li div strong {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	color: var(--text-color);
	font-size: 1em;
}
.feature-section li div,
.guide-section li div {
	font-size: 0.9em;
	color: var(--text-light);
}
.guide-section ol {
	counter-reset: guide-counter;
}
.guide-section li {
	counter-increment: guide-counter;
	padding-left: 35px;
	position: relative;
}
.guide-section li::before {
	content: counter(guide-counter);
	position: absolute;
	left: 0;
	top: 0;
	background-color: var(--primary-color);
	color: white;
	font-weight: bold;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8em;
	box-shadow: var(--shadow-sm);
}
.guide-section li i {
	display: none;
}
.review-section .fb-comments {
	margin-top: 20px;
	background-color: var(--secondary-color);
	border-radius: var(--border-radius);
	padding: 8px;
}
.blog-section p {
	text-align: justify;
	margin-bottom: 1.1em;
	color: var(--text-light);
	font-size: 0.9em;
}
.info-card {
	padding: 0;
}
.donations-content,
.contact-content,
.terms-content,
.privacy-content {
	padding: 0;
}
.donations-content h3,
.contact-content h3,
.terms-content h3,
.privacy-content h3 {
	margin-top: 0;
	margin-bottom: 12px;
	font-size: 1.1em;
	color: var(--primary-dark);
	border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.2);
	padding-bottom: 8px;
	text-align: left;
	display: flex;
	align-items: center;
	gap: 8px;
}
.donations-content h3 i,
.contact-content h3 i,
.terms-content h3 i,
.privacy-content h3 i {
	color: var(--primary-color);
}
.donations-content p,
.contact-content p,
.terms-content p,
.privacy-content p {
	font-size: 0.9em;
	color: var(--text-light);
	margin-bottom: 10px;
}
.donations-content p strong,
.contact-list strong,
.privacy-content p strong {
	margin-right: 4px;
	font-weight: 600;
	color: var(--text-color);
}
.contact-list,
.usage-list {
	list-style: none;
	padding-left: 0;
	margin-top: 12px;
}
.contact-list li,
.usage-list li {
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.9em;
	color: var(--text-light);
}
.contact-list li i,
.usage-list li i {
	flex-shrink: 0;
	color: var(--primary-color);
	width: 1.2em;
	text-align: center;
	font-size: 1em;
}
.usage-list li i {
	color: #2e7d32;
}
.contact-list a {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 500;
}
.contact-list a:hover {
	text-decoration: underline;
	color: var(--primary-dark);
}
.info-columns {
	display: flex;
	gap: 30px;
	margin-bottom: 25px;
}
.info-columns > .info-card {
	flex: 1;
	margin-bottom: 0;
}
@media (max-width: 768px) {
	.info-columns {
		flex-direction: column;
		gap: 20px;
	}
}

/* =========================
    Footer Styling (Modernized)
    ========================= */
footer.copy {
	margin: 40px auto 15px auto;
	color: var(--text-lighter);
	font-size: 0.8em;
	text-align: center;
	background: var(--secondary-color); /* Solid background */
	border-radius: var(--border-radius);
	padding: 20px 25px;
	box-shadow: var(--shadow-lg);
	position: relative;
	z-index: 100;
	max-width: 1200px;
}
footer .footer a {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 500;
	transition: color var(--transition);
}
footer .footer a:hover {
	text-decoration: underline;
	color: var(--primary-dark);
}
footer .heart {
	font-size: 1em;
	position: relative;
	top: 2px;
	color: var(--primary-color);
	display: inline-block;
	transition: color var(--transition), transform var(--transition);
}
footer:hover .heart {
	animation: beat 0.6s infinite alternate ease-in-out;
}
@keyframes beat {
	to {
		transform: scale(1.1);
	}
}
footer .disclaimer {
	font-size: 0.9em;
	text-align: center;
	margin-top: 20px;
	color: #aaa;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.4;
}
footer .disclaimer p {
	margin-bottom: 8px;
}
@media (max-width: 768px) {
	footer.copy {
		padding: 15px;
		margin-top: 30px;
		width: calc(100% - 20px);
		margin-left: 10px;
		margin-right: 10px;
	}
	footer .disclaimer {
		font-size: 0.85em;
	}
}

/* =========================
      Utilities
      ========================= */
::-webkit-scrollbar {
	width: 18px;
	height: 18px;
}
::-webkit-scrollbar-track {
	background: var(--border-light);
	border-radius: var(--border-radius);
}
::-webkit-scrollbar-thumb {
	background-color: var(--primary-light);
	border-radius: var(--border-radius);
	border: 3px solid var(--border-light);
}
::-webkit-scrollbar-thumb:hover {
	background-color: var(--primary-color);
}
.fa-fw {
	width: 1.25em;
	text-align: center;
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* =========================
    Layout Adjustments for Appearance Tab
    ========================= */
.appearance-tab-columns {
	display: grid;
	grid-template-columns: repeat(2, 1fr); /* Two equal columns */
	gap: 25px; /* Space between columns */
}

.appearance-tab-columns .input-group {
	margin-bottom: var(--control-gap);
}

@media (max-width: 992px) {
	.appearance-tab-columns {
		grid-template-columns: 1fr; /* Stack columns on smaller screens */
		gap: 15px;
	}
}

/* =========================
    Responsiveness
    ========================= */
@media (max-width: 1200px) {
	:root {
		--control-panel-width: 35%;
	}
	.studio-layout {
		gap: 15px;
		padding: 20px 2%;
	}
}
@media (max-width: 992px) {
	.studio-layout {
		flex-direction: column;
		padding: 15px 10px;
		gap: 15px;
		flex-grow: 0; /* Revert for mobile flow */
		min-height: auto;
	}
	.control-panel {
		width: 100%;
		position: relative;
		top: auto;
		height: auto;
		z-index: auto;
		box-shadow: var(--shadow-lg);
		border-radius: var(--border-radius);
		margin-bottom: 0;
		max-height: none;
	}
	.control-panel .panel-tab-content {
		max-height: none;
		padding-bottom: var(--panel-padding);
		overflow-y: auto;
		flex-grow: 1;
	}
	.main-content {
		height: auto;
		max-height: none;
		order: 2;
	}
	#chart-preview-section {
		margin-bottom: 15px;
	}
}
@media (max-width: 768px) {
	:root {
		--navbar-height: 60px;
		--border-radius: 6px;
		--panel-padding: 15px;
	}
	.studio-layout {
		padding: 10px 5px;
		gap: 10px;
	}

	/* [NEW] Mobile Navbar Adjustments for a cleaner look */
	.navbar .logo img {
		width: 150px; /* Reduce logo size on mobile */
	}

	.navbar-actions {
		gap: 5px; /* Reduce space between buttons */
	}

	.nav-notification-btn {
		font-size: 1.1rem; /* Slightly smaller icons */
		padding: 6px;
	}

	.navbar .hamburger {
		font-size: 1.6em; /* Adjust hamburger icon size */
	}

	.panel-tab-content {
		padding: var(--panel-padding);
	}
	#chart-preview-section {
		padding: 10px;
	}
	#chartContainer {
		min-height: 200px;
	}
	.export-group {
		gap: 8px;
		margin: 10px 0;
	}
	.export-group .btn {
		font-size: 0.8em;
		padding: 6px 12px;
	}
	.compact-label-modal .modal-content {
		max-width: calc(100% - 20px);
		padding: 15px;
	}
	.modal-control-row {
		flex-wrap: wrap;
	}
	.modal-label-compact {
		width: 100%;
		margin-bottom: 3px;
	}

    /* Layer Header Mobile Fixes */
    .layer-header {
        flex-wrap: wrap !important;
        height: auto !important;
        padding: 6px !important;
        gap: 4px !important;
        justify-content: flex-start !important;
    }
    .layer-title {
        width: 100% !important;
        order: -1 !important; /* Title on its own row at top */
        margin-bottom: 6px !important;
        white-space: normal !important;
        font-size: 0.85em !important;
        background-color: rgba(0,0,0,0.03) !important;
        padding: 6px 10px !important;
        flex-grow: 1 !important;
        border-radius: 4px !important;
    }
    .layer-quick-toggles {
        display: flex !important;
        flex-basis: auto !important;
        margin-right: 2px !important;
        justify-content: flex-start !important;
        gap: 2px !important;
    }
    .layer-quick-actions {
        margin-left: 0 !important;
        display: flex !important;
        gap: 2px !important;
    }
    .quick-action-btn {
        width: 26px !important;
        height: 26px !important;
        padding: 4px !important;
        font-size: 0.85em !important;
    }
    .layer-toggle-btn, .remove-layer {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.9em !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .remove-layer {
        margin-left: auto !important; /* Keep delete button at the far right */
    }
    .tag-input {
        min-width: 120px !important;
    }
    .quick-presets {
        justify-content: center;
    }
}

/* =========================
    Review Modal (UPDATED)
    ========================= */
.star-rating-container {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 20px;
}
.star-rating-container label {
	margin-bottom: 0; /* Override default label margin */
}
.star-widget {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
}
.star-widget input {
	display: none;
}
.star-widget label {
	font-size: 2em;
	color: #ddd;
	padding: 5px;
	transition: color 0.2s ease;
	cursor: pointer;
}
.star-widget input:checked ~ label,
.star-widget:not(:checked) > label:hover,
.star-widget:not(:checked) > label:hover ~ label {
	color: var(--highlight-color);
}
.star-widget input:checked + label:hover,
.star-widget input:checked ~ label:hover,
.star-widget label:hover ~ input:checked ~ label,
.star-widget input:checked ~ label:hover ~ label {
	color: var(--highlight-dark);
}
#reviewForm textarea {
	resize: vertical;
}

/* --- Enhanced Review Modal Styles --- */
.close-modal-x {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2em;
    line-height: 1;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
    z-index: 10;
}
.close-modal-x:hover {
    color: var(--primary-dark);
}

.centered-large-rating {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 25px;
}
.centered-large-rating .star-widget label {
    font-size: 2.8em; /* Larger stars */
    padding: 0 5px;
}

/* --- Donation Section in Thank You --- */
#reviewThankYou .donate-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}
#reviewThankYou .donate-section p {
    font-size: 0.95em;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* =========================
    Responsive Modals
   ========================= */

@media (max-width: 768px) {
	.modal-content {
		width: 90%;
		max-height: 85vh;
		padding: 20px;
	}
	.compact-label-modal .modal-content {
		max-width: 95%;
	}
	.modal-columns-container {
		flex-direction: column;
		gap: 15px;
		padding-top: 10px;
		border-top: none;
	}
	.modal-column:first-child {
		margin-bottom: 0;
	}
	.modal-column .modal-section-title {
		margin-top: 10px;
	}
}
@media (max-width: 480px) {
	.modal-content {
		width: 95%;
		padding: 15px;
		max-height: 90vh;
	}
	.modal-buttons {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 10px;
	}
	.modal-buttons-compact {
		flex-direction: column;
		align-items: stretch;
		gap: 15px;
	}
	.modal-buttons-compact .modal-buttons-right {
		display: flex;
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 10px;
		width: 100%;
	}
	.modal-control-group {
		margin-bottom: 15px;
	}
	.modal-control-row {
		gap: 8px;
		margin-bottom: 15px;
	}
	.modal-label-compact {
		width: 100%;
		margin-bottom: 3px;
		flex-basis: auto;
	}
	.modal-slider-compact {
		flex-grow: 1;
	}
	.modal-icon-btn {
		margin-left: auto;
	}
	.modal-icon-btn[title="Reset size to global default"],
	.modal-icon-btn[title="Revert to this label's original color"] {
		margin-left: auto;
	}
}
@media (max-width: 768px) {
	#presetModal .modal-content {
		max-width: 95vw;
	}

	#presetModal .preset-list {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}

	#presetModal .modal-content {
		display: flex;
		flex-direction: column;
		max-height: 85vh;
	}

	#presetModal .preset-list-container {
		flex-grow: 1;
		overflow-y: auto;
		min-height: 200px;
	}
}

@media (max-width: 480px) {
	#presetModal .preset-list {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	}

	.preset-item {
		padding: 10px;
		font-size: 0.9em;
	}
	.preset-pagination {
		flex-direction: row;
		gap: 10px;
		justify-content: space-between;
	}

	.preset-pagination #pageInfo {
		order: 0;
		font-size: 0.8em;
	}
}

.modal-columns-container {
	display: flex;
	gap: 20px;
	margin-top: 15px;
	border-top: 1px solid var(--border-light);
	padding-top: 15px;
}

.modal-column {
	flex: 1;
	min-width: 0;
}

.modal-column .modal-section-title {
	margin-bottom: 5px;
	padding-bottom: 5px;
	border-bottom: 1px solid var(--border-light);
}

.modal-column .modal-control-row {
	margin-bottom: 18px;
}

@media (max-width: 520px) {
	.modal-columns-container {
		flex-direction: column;
		gap: 0;
		padding-top: 10px;
		border-top: none;
	}
	.modal-column:first-child {
		margin-bottom: 0;
	}
	.modal-column .modal-section-title {
		margin-top: 10px;
	}
}
@media (max-width: 1440px) {
	:root {
		--control-panel-width: 35%;
		--panel-padding: 10px;
		--control-gap: 10px;
	}
	body {
		padding-left: 0;
		padding-right: 0;
	}
	.studio-layout {
		gap: 15px;
		padding: 20px 2%;
	}
	.panel-tab-btn {
		padding: 12px 8px;
		font-size: 0.85em;
	}
	.input-group label,
	.slider-group label,
	.toggle-group label:first-of-type {
		font-size: 0.9em;
	}
	.panel-tab-content summary {
		font-size: 0.95em;
	}
	.navbar {
		padding: 10px 2%;
	}
}

/* =======================================
   HOMEPAGE (index.html) STYLES
   ======================================= */

.hero-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: calc(95vh - var(--navbar-height));
	padding: 40px 20px;
	color: var(--secondary-color);
	position: relative;
}

.hero-content h1 {
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 700;
	color: var(--secondary-color);
	text-shadow: 2px 3px 8px rgba(0, 0, 0, 0.4);
	margin-bottom: 20px;
	line-height: 1.2;
}

.hero-content p.subtitle {
	font-size: clamp(1.1rem, 2.5vw, 1.4rem);
	color: rgba(255, 255, 255, 0.95);
	max-width: 800px;
	margin: 0 auto 35px auto;
	text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
	line-height: 1.6;
}

.hero-cta {
	padding: 16px 40px;
	font-size: 1.1em;
	font-weight: 600;
	background: linear-gradient(
		135deg,
		var(--highlight-color),
		var(--highlight-light)
	);
	color: var(--text-on-highlight);
	border-radius: 50px;
	text-decoration: none;
	box-shadow: 0 6px 20px -5px rgba(var(--highlight-dark-rgb), 0.5);
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.hero-cta:hover {
	transform: translateY(-4px) scale(1.03);
	box-shadow: 0 8px 25px -5px rgba(var(--highlight-dark-rgb), 0.6);
	color: var(--text-on-highlight);
	text-decoration: none;
}

.trust-signals {
	margin-top: 20px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9em;
}

.trust-signals span {
	margin: 0 10px;
}

.trust-signals i {
	color: var(--highlight-light);
	margin-right: 5px;
}

.page-wrapper {
	background-color: var(--background-main);
	border-radius: var(--border-radius) var(--border-radius) 0 0;
	padding-top: 1px;
}

.content-section {
	background: var(--secondary-color);
	max-width: 1200px;
	margin: 80px auto;
	padding: 60px;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
}

.section-header {
	text-align: center;
	margin-bottom: 50px;
}

.section-header h2 {
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	color: var(--primary-dark);
	margin-bottom: 15px;
	position: relative;
	display: inline-block;
	padding-bottom: 10px;
}

.section-header h2::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 80px;
	height: 4px;
	background: var(--primary-color);
	border-radius: 2px;
}

.section-header p {
	font-size: 1.1em;
	color: var(--text-light);
	max-width: 800px;
	margin: 0 auto;
	line-height: 1.7;
}

.rich-content p {
	color: var(--text-light);
	line-height: 1.8;
	margin-bottom: 1.5em;
	font-size: 1.05em;
}

.rich-content h3 {
	font-size: 1.6em;
	color: var(--text-color);
	margin-top: 2em;
	margin-bottom: 1em;
	font-weight: 600;
	padding-bottom: 0.5em;
	border-bottom: 1px solid var(--border-light);
}

.rich-content h3:first-of-type {
	margin-top: 0;
}

.rich-content ul,
.rich-content ol {
	list-style: none;
	padding-left: 0;
	margin-bottom: 1.5em;
}

.rich-content li {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 20px;
	color: var(--text-light);
	font-size: 1.05em;
	line-height: 1.7;
}

.rich-content .feature-list li i {
	color: var(--primary-color);
	font-size: 1.2em;
	margin-top: 5px;
	width: 1.5em;
	text-align: center;
}

.rich-content ol {
	counter-reset: custom-counter;
}

.rich-content ol li::before {
	counter-increment: custom-counter;
	content: counter(custom-counter);
	background-color: var(--primary-color);
	color: white;
	font-weight: bold;
	width: 28px;
	height: 28px;
	min-width: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85em;
	margin-top: 5px;
	box-shadow: var(--shadow-sm);
}

.section-image {
	display: block;
	max-width: 90%;
	margin: 40px auto 50px auto;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
	border: 6px solid white;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
}

.gallery-card {
	border-radius: var(--border-radius);
	overflow: hidden;
	box-shadow: var(--shadow-md);
	transition: all var(--transition);
	background: #fff;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border-light);
}

.gallery-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-lg);
	border-color: var(--primary-light);
}

.gallery-card img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	border-bottom: 1px solid var(--border-light);
}

.gallery-card-content {
	padding: 25px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	text-align: center;
}

.gallery-card-content h3 {
	font-size: 1.2em;
	color: var(--primary-dark);
	margin-bottom: 10px;
}

.gallery-card-content p {
	font-size: 0.9em;
	color: var(--text-light);
	flex-grow: 1;
	margin-bottom: 20px;
}

.gallery-card .btn {
	margin-top: auto;
}

.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
}
.testimonial-card {
	background: var(--background-main);
	padding: 30px;
	border-radius: var(--border-radius);
	border-left: 5px solid var(--primary-color);
}

.testimonial-card p.quote {
	font-style: italic;
	color: var(--text-light);
	margin-bottom: 20px;
	position: relative;
	padding-left: 35px;
}

.testimonial-card p.quote::before {
	content: "\f10d";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	position: absolute;
	left: 0;
	top: -5px;
	font-size: 1.5em;
	color: var(--primary-light);
	opacity: 0.8;
}

.testimonial-card .author {
	font-weight: 600;
	color: var(--text-color);
}

.faq-container {
	max-width: 900px;
	margin: 20px auto 0 auto;
}
details.faq-item {
	background: #fff;
	border: 1px solid var(--border-light);
	border-radius: var(--border-radius);
	margin-bottom: 12px;
	box-shadow: var(--shadow-sm);
	transition: all var(--transition);
	overflow: hidden;
}
summary.faq-question {
	padding: 18px 25px;
	font-weight: 600;
	color: var(--primary-dark);
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 1.1em;
}
summary.faq-question::-webkit-details-marker {
	display: none;
}
summary.faq-question::after {
	content: "\f078";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 0.9em;
	transition: transform 0.25s ease-out;
	color: var(--primary-color);
}
details[open] > summary.faq-question::after {
	transform: rotate(180deg);
}
.faq-answer {
	padding: 5px 25px 25px 25px;
	color: var(--text-light);
	font-size: 0.95em;
	line-height: 1.7;
	border-top: 1px solid var(--border-light);
}

.final-cta-section {
	background: linear-gradient(
		135deg,
		var(--primary-dark),
		var(--primary-color)
	);
	color: white;
	padding: 60px 30px;
	text-align: center;
	margin: 80px auto;
	max-width: 1200px;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
}
.final-cta-section h2 {
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	color: white;
	margin-bottom: 15px;
}
.final-cta-section p {
	max-width: 600px;
	margin: 0 auto 30px auto;
	color: rgba(255, 255, 255, 0.9);
	font-size: 1.1em;
}

.info-columns-wrapper {
	background: transparent;
	box-shadow: none;
}
.info-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
}
.info-card {
	background: #fff;
	padding: 30px;
	border: 1px solid var(--border-light);
	border-radius: var(--border-radius);
}
.info-card h3 {
	font-size: 1.3em;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 15px;
	color: var(--primary-dark);
}
.info-card p,
.info-card li {
	color: var(--text-light);
	font-size: 0.95em;
	line-height: 1.7;
}
.info-card ul {
	list-style: none;
	padding-left: 0;
}
.info-card .contact-list li {
	margin-bottom: 10px;
}

@media (max-width: 768px) {
	.content-section {
		padding: 40px 20px;
		margin: 60px 15px;
	}
	.hero-section {
		min-height: 80vh;
	}
	.trust-signals {
		display: flex;
		flex-direction: column;
		gap: 8px;
	}
	.info-columns {
		grid-template-columns: 1fr;
	}
}
/* NEW: Meet the Creator Section */
.creator-profile {
	display: flex;
	align-items: center;
	gap: 40px;
	margin-top: 30px;
}

.creator-photo {
	width: 180px;
	height: 180px;
	border-radius: 50%;
	object-fit: cover;
	border: 5px solid var(--secondary-color);
	box-shadow: var(--shadow-lg);
	flex-shrink: 0;
}

.creator-bio h3 {
	font-size: 1.8em;
	color: var(--text-color);
	margin-top: 0;
	margin-bottom: 5px;
}

.creator-bio .creator-subtitle {
	font-weight: 500;
	color: var(--primary-color);
	font-size: 1em;
	margin-bottom: 20px;
}

.creator-bio p {
	font-size: 1em;
	line-height: 1.8;
	margin-bottom: 1em;
}

@media (max-width: 768px) {
	.creator-profile {
		flex-direction: column;
		text-align: center;
		gap: 25px;
	}

	.creator-photo {
		width: 150px;
		height: 150px;
	}

	        .creator-bio h3 {
	                font-size: 1.6em;
	        }
	}
	
	/* WHAT'S NEW MODAL & NOTIFICATION */
	.nav-notification-btn {
	    background: none;
	    border: none;
	    color: var(--text-color);
	    font-size: 1.2rem;
	    cursor: pointer;
	    position: relative;
	    padding: 8px;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    transition: color 0.3s ease;
	}
	
	.nav-notification-btn:hover {
	    color: var(--primary-color);
	}
	
	.notification-badge {
	    position: absolute;
	    top: 5px;
	    right: 5px;
	    width: 10px;
	    height: 10px;
	    background-color: #ff4757;
	    border-radius: 50%;
	    border: 2px solid #fff;
	    display: none;
	}
	
	.notification-badge.active {
	    display: block;
	    animation: pulse-red 2s infinite;
	}
	
	@keyframes pulse-red {
	    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
	    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
	    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
	}
	
	.whats-new-modal {
	}
	
	.whats-new-content {
	    margin: 0;
        padding: 10px 0;
	    text-align: left;
	}
	
	.new-feature-item {
	    margin-bottom: 12px;
	    padding-bottom: 10px;
	    border-bottom: 1px solid var(--border-color);
	}
	
	.new-feature-item:last-child {
	    border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
	}
	
	.new-feature-item h3 {
	    font-size: 1.1rem;
	    margin: 2px 0;
	    color: var(--primary-color);
	}
	
	.new-feature-item p {
	    font-size: 0.9rem;
	    color: var(--text-light);
	    line-height: 1.3;
        margin-bottom: 4px;
	}
	
	.feature-tag {
	    font-size: 0.7rem;
	    font-weight: 700;
	    text-transform: uppercase;
	    padding: 2px 8px;
	    border-radius: 4px;
	    color: #fff;
	    margin-bottom: 5px;
	    display: inline-block;
	}
	
	.tag-ui { background-color: #3b82f6; }
	.tag-control { background-color: #10b981; }
	.tag-logic { background-color: #f59e0b; }
	.tag-system { background-color: #8b5cf6; }

    /* Redesigned What's New Cards */
    .wn-feature-card {
        position: relative;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 12px;
        padding: 24px 14px 12px 14px;
        margin-bottom: 0;
        background: linear-gradient(90deg, #f9fafb 0%, #ffffff 100%);
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        transition: all 0.2s ease;
        height: 100%;
        align-content: center;
    }

    .wn-feature-card:hover {
        transform: translateY(-2px);
        border-color: var(--primary-color);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .wn-card-icon {
        font-size: 1.8rem;
        width: 40px;
        text-align: center;
    }

    .wn-card-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .wn-card-title {
        font-size: 0.85rem;
        font-weight: 700;
        color: #1f2937;
        font-family: 'Quicksand', sans-serif;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .wn-card-desc {
        font-size: 0.85rem;
        color: #4b5563;
        line-height: 1.4;
    }

    .wn-card-badge {
        position: absolute;
        top: 0;
        left: 0;
        font-size: 0.65rem;
        font-weight: 800;
        padding: 3px 10px;
        border-radius: 12px 0 12px 0;
        text-transform: uppercase;
        letter-spacing: 1px;
        z-index: 2;
    }

    /* 9th Card: Request Feature */
    .wn-card-request {
        background: #ecfdf5;
        border-color: #6ee7b7;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 12px;
        grid-template-columns: 1fr;
    }
    .wn-card-request:hover {
        border-color: #10b981;
        background: #d1fae5;
        transform: translateY(-2px);
    }

    .badge-new { background: #dcfce7; color: #15803d; }
    .badge-pro { background: #e0e7ff; color: #4338ca; }
    .badge-ui { background: #fef3c7; color: #92400e; }
    .badge-adv { background: #f3e8ff; color: #6b21a8; }
	
	@media (max-width: 768px) {
		.whats-new-modal {
			padding: 15px !important;
			max-height: 85vh;
			display: flex;
			flex-direction: column;
		}
		.whats-new-content {
			margin: 10px 0;
			overflow-y: auto;
			padding-right: 5px;
		}
		.new-feature-item {
			margin-bottom: 8px;
			padding-bottom: 8px;
		}
		.new-feature-item h3 {
			font-size: 1rem;
			margin: 2px 0;
		}
		.new-feature-item p {
			font-size: 0.85rem;
            line-height: 1.3;
		}
		.feature-tag {
			font-size: 0.65rem;
			padding: 1px 6px;
			margin-bottom: 2px;
		}

        .wn-feature-card {
            grid-template-columns: 1fr;
            gap: 8px;
            padding: 24px 15px 15px 15px;
            text-align: center;
            justify-items: center;
        }

        .wn-card-badge {
            display: block;
        }

        .wn-card-title {
            font-size: 0.85rem;
        }

        .wn-card-desc {
            font-size: 0.8rem;
        }
	}
/* --- Scroll Top Button --- */
.scroll-top-btn {
    position: fixed !important;
    bottom: 120px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    background-color: var(--primary-color, #d9621f) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease-in-out !important;
    z-index: 9999 !important;
}

@media (max-width: 768px) {
    .scroll-top-btn {
        bottom: 110px !important; /* Move up on mobile to avoid overlap with Quick Preset button */
        right: 20px !important;
        width: 44px !important;
        height: 44px !important;
    }
    
    #presetBtn {
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
    }
}

.scroll-top-btn.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.scroll-top-btn:hover {
    background-color: var(--highlight-color, #ffa654) !important;
    transform: translateY(-5px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.scroll-top-btn i {
    font-size: 20px !important;
    pointer-events: none !important;
}




/* =========================
   Announcement Banner & Animations
   ========================= */

 @keyframes intelligencePulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--highlight-dark-rgb), 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(var(--highlight-dark-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--highlight-dark-rgb), 0); }
}

 @keyframes bgBreathing {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.announcement-banner {
    /* Default to Coral/Highlight theme */
    background: linear-gradient(
        270deg, 
        var(--highlight-color), 
        var(--highlight-dark), 
        var(--highlight-color)
    );
    background-size: 200% 200%;
    color: white;
    padding: 10px 20px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 600;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 1001;
    position: relative;
    flex-wrap: nowrap; /* Prevent button wrapping */
}

/* Ensure text truncates/wraps nicely without breaking layout */
.announcement-banner > span {
    white-space: normal; /* Allow text to wrap lines if needed */
    flex-shrink: 1;
    min-width: 0;
}

/* Theme Modifiers */
.announcement-banner.banner-theme-coral {
    background: linear-gradient(270deg, #E88D78, #C06C5A, #E88D78);
    background-size: 200% 200%;
}
.announcement-banner.banner-theme-sage {
    background: linear-gradient(270deg, #97B881, #7A9665, #97B881);
    background-size: 200% 200%;
}
.announcement-banner.banner-theme-red {
    background: linear-gradient(270deg, #ef5350, #c62828, #ef5350);
    background-size: 200% 200%;
}
.announcement-banner.banner-theme-gray {
    background: linear-gradient(270deg, #9ca3af, #4b5563, #9ca3af);
    background-size: 200% 200%;
}
.announcement-banner.banner-theme-yellow {
    background: linear-gradient(270deg, #f1c40f, #f39c12, #f1c40f);
    background-size: 200% 200%;
}
.announcement-banner.banner-theme-purple {
    background: linear-gradient(270deg, #9b59b6, #8e44ad, #9b59b6);
    background-size: 200% 200%;
}
.announcement-banner.banner-theme-blue {
    background: linear-gradient(270deg, #3498db, #2980b9, #3498db);
    background-size: 200% 200%;
}

/* Pulse Mode Modifier */
.announcement-banner.banner-pulse {
    animation: 
        intelligencePulse 2s infinite cubic-bezier(0.66, 0, 0, 1),
        bgBreathing 6s ease infinite;
}

/* Close Button - Perfect Circle Fix */
.announcement-banner button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 26px; /* Fixed width */
    height: 26px; /* Fixed height */
    padding: 0; /* Important for roundness */
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Prevent squishing */
}

.announcement-banner button:hover {
    background: white;
    color: var(--highlight-dark);
    transform: scale(1.1);
}

/* Announcement CTA Link Styling */
.announcement-banner a {
    color: white !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    margin-left: 10px;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.announcement-banner a:hover {
    background: white !important;
    color: var(--highlight-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Maintain theme-specific hover colors for the link */
.announcement-banner.banner-theme-sage a:hover { color: #7A9665 !important; }
.announcement-banner.banner-theme-coral a:hover { color: #C06C5A !important; }
.announcement-banner.banner-theme-red a:hover { color: #c62828 !important; }
.announcement-banner.banner-theme-purple a:hover { color: #8e44ad !important; }
.announcement-banner.banner-theme-blue a:hover { color: #2980b9 !important; }
.announcement-banner.banner-theme-yellow a:hover { color: #f39c12 !important; }
.announcement-banner.banner-theme-gray a:hover { color: #4b5563 !important; }

/* Maintenance Overlay */
.maintenance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.98);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.maintenance-content {
    max-width: 500px;
    padding: 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}
.maintenance-content h2 {
    font-family: var(--heading-font);
    color: var(--primary-dark);
    margin: 20px 0 10px;
    font-size: 2em;
}
.maintenance-content p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* =========================
   Toast Notifications
   ========================= */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toast-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
               toast-out 0.3s ease 2.7s forwards;
    min-width: 200px;
    justify-content: center;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

/* =========================
   Shortcuts Grid (Inspired by MysticChart)
   ========================= */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.shortcut-item {
    background: var(--background-main);
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease;
}

.shortcut-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.shortcut-keys {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.key-badge {
    background-color: #F8F9FA;
    border: 1px solid #DEE2E6;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-color);
    box-shadow: 0 2px 0 #CED4DA;
    font-family: var(--font-mono, 'Fira Code', 'Consolas', monospace);
}

.shortcut-description {
    font-size: 0.85em;
    color: var(--text-light);
    font-weight: 500;
}

/* Red Button for Confirm Modals */
.btn-danger-bg {
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
    border-color: #ff4757 !important;
}
.btn-danger-bg:hover {
    background: linear-gradient(135deg, #e84118, #ff4757) !important;
}

/* KBD Styling for modals */
kbd {
    background-color: #eee;
    border-radius: 3px;
    border: 1px solid #b4b4b4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset;
    color: #333;
    display: inline-block;
    font-size: .85em;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    white-space: nowrap;
}

/* =========================
    Bulk Chart Engine (Premium)
   ========================= */
.bulk-modal-content {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    padding: 0 !important;
    overflow: hidden;
    border: none;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    background: var(--background-main) !important;
}

.bulk-header {
    background: var(--primary-dark);
    padding: 15px 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    flex-shrink: 0;
    z-index: 10;
}

.bulk-header h2 {
    margin: 0;
    font-size: 1.3em;
    font-family: 'Poppins', sans-serif;
    color: white;
    border: none;
    padding: 0;
}

.smart-tag {
    background: var(--primary-color);
    color: white;
    font-size: 0.7em;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bulk-main-container {
    display: flex;
    flex-direction: row;
    background: white;
    flex: 1;
    overflow: hidden;
}

.bulk-config-column {
    width: 42%;
    min-width: 440px;
    max-width: 520px;
    padding: 28px 32px;
    border-right: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    overflow-y: auto;
    height: 100%;
    flex-shrink: 0;
}

/* Scrollbar styling for config column */
.bulk-config-column::-webkit-scrollbar {
    width: 8px;
}

.bulk-config-column::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.bulk-config-column::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.bulk-config-column::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.bulk-export-options {
    margin-right: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bulk-export-options select {
    border: 1.5px solid #dce0e5;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.bulk-export-options select:hover {
    border-color: var(--primary-color);
    background: #fff;
}

.bulk-export-options select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(151, 184, 129, 0.1);
}

.bulk-preview-column {
    flex: 1;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

#bulkPreviewArea {
    display: none; /* Controlled by JS */
    flex: 1;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.bulk-preview-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    border: none;
    height: 100%;
    min-height: 0;
}

@media (max-width: 1200px) {
    .bulk-config-column {
        width: 320px;
        min-width: 320px;
        padding: 20px;
    }
}

.bulk-section {
    margin-bottom: 15px;
    background: #ffffff;
    border-radius: 16px;
    padding: 0; /* Padding handled by content wrapper */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.bulk-section:last-child { margin-bottom: 0; }

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    margin-bottom: 0;
    border-bottom: none;
}

.section-title:hover {
    background: #f8fafc;
}

.bulk-section.is-collapsed .section-content {
    display: none;
}

.section-content {
    padding: 0 20px 20px 20px;
    border-top: 1px solid #f5f5f5;
    margin-top: 0;
}

.toggle-icon {
    margin-left: auto;
    transition: transform 0.3s;
    color: #94a3b8;
}

.bulk-section.is-collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.section-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    box-shadow: 0 2px 4px rgba(151, 184, 129, 0.3);
    flex-shrink: 0;
}

.logo-config-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap; /* Prevent overlap on very small screens */
}

.logo-config-left {
    flex: 0 0 132px; /* Matches grid width exactly */
    flex-shrink: 0;
}

.logo-config-right {
    flex: 1;
    min-width: 180px; /* Ensure sliders have enough space */
}

@media (max-width: 1300px) {
    .logo-config-row {
        flex-direction: column;
        gap: 15px;
    }
    .logo-config-left, .logo-config-right {
        width: 100%;
        flex: 1;
    }
}

/* Positioning Grid (3x3) */
.logo-position-grid {
    display: grid;
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 40px);
    gap: 6px;
    width: 132px; /* (40*3) + (6*2) */
    margin: 10px 0;
}

.pos-btn {
    aspect-ratio: 1;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-btn:hover {
    background: #e2e8f0;
}

.pos-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 2px rgba(151, 184, 129, 0.2);
}

/* Premium Sliders for Bulk Engine */
.bulk-slider-group {
    margin-top: 15px;
}

.bulk-slider-item {
    margin-bottom: 12px;
}

.bulk-slider-item label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 600;
}

.bulk-slider-item .slider-val {
    color: var(--primary-dark);
}

.bulk-premium-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

.bulk-premium-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.bulk-premium-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.logo-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.logo-preview-small {
    width: 100%;
    height: 60px;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8fafc;
}

.logo-preview-small img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.btn-remove-logo {
    background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%);
    color: #ef4444;
    border: 1.5px solid #fecaca !important;
    padding: 0 15px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    height: 44px; /* Matches standard btn height */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.btn-remove-logo:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary-color) !important;
    color: var(--primary-dark);
    height: 44px;
    padding: 0 20px;
}

.btn-outline:hover {
    background: rgba(151, 184, 129, 0.1);
    border-color: var(--primary-dark) !important;
}

/* Settings Grid */
.bulk-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bulk-setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bulk-setting-item label {
    font-size: 0.75em;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bulk-setting-item input[type="text"],
.bulk-setting-item select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 0.9em;
    background: white;
    transition: all 0.2s ease;
    color: #334155;
}

.bulk-setting-item input[type="text"]:focus,
.bulk-setting-item select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(151, 184, 129, 0.15);
    outline: none;
}

.bulk-setting-item input[type="text"]::placeholder {
    color: #94a3b8;
    font-size: 0.9em;
}

.checkbox-item-full {
    grid-column: span 2;
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    flex-wrap: wrap;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
}

.checkbox-item-full > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item-full span {
    font-size: 0.8em;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

/* ========================================
   ENHANCED BATCH CONFIGURATION
   ======================================== */
.bulk-config-section .section-header {
    margin-bottom: 20px;
}

.bulk-config-section .section-title {
    margin-bottom: 6px;
}

.section-desc {
    font-size: 0.85em;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.config-group {
    margin-bottom: 8px;
}

.config-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.config-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.config-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 20px 0;
}

.bulk-setting-item label i {
    margin-right: 6px;
    color: var(--primary-color);
    font-size: 0.85em;
    width: 16px;
    text-align: center;
}

.bulk-setting-item select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.bulk-setting-item select optgroup {
    font-weight: 600;
    color: var(--primary-dark);
    background: #f8fafc;
}

.bulk-setting-item select option {
    padding: 8px;
}

/* Toggle Options */
.toggle-options {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    font-weight: 600;
    color: #64748b;
}

.toggle-label i {
    color: var(--primary-color);
    font-size: 0.9em;
}

/* ========================================
   ENHANCED NAVIGATION
   ======================================== */
.chart-navigator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 4px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chart-navigator .nav-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    border: none;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chart-navigator .nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.chart-navigator .nav-btn:active {
    transform: scale(0.95);
}

.chart-navigator .nav-btn i {
    font-size: 0.8em;
}

.chart-navigator .nav.Pills {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    min-width: 70px;
    justify-content: center;
}

.nav-label {
    font-size: 0.7em;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-current {
    font-size: 1.1em;
    font-weight: 800;
    color: var(--primary-dark);
    min-width: 20px;
    text-align: right;
}

.nav-divider {
    font-size: 0.9em;
    color: #cbd5e1;
    font-weight: 500;
}

.nav-total {
    font-size: 0.9em;
    color: #94a3b8;
    font-weight: 600;
}

/* Toolbar button */
.toolbar-right .btn-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-right .btn-toolbar:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
    color: #1e40af;
}

.toolbar-right .btn-toolbar i {
    font-size: 0.95em;
}

/* ========================================
   Dowsing Mode (Fullscreen Viewer)
   ======================================== */

#dowsingModeOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1a1a1a; /* Darker professional backdrop */
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), visibility 0s 0.4s;
    cursor: grab;
    overflow: hidden;
}

#dowsingModeOverlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

#dowsingModeOverlay.is-grabbing {
    cursor: grabbing;
}

#dowsingModeCanvas {
    display: block;
    cursor: grab;
}

/* Full Screen Viewer Close Button */
#dowsingModeCloseBtn {
    position: absolute;
    top: 25px;
    right: 35px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#dowsingModeCloseBtn:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1) rotate(90deg);
}

#dowsingModeControls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    padding: 10px;
    display: flex;
    gap: 8px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

#dowsingModeControls button {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

#dowsingModeControls button:hover {
    background: rgba(var(--primary-color-rgb), 0.15);
    color: var(--primary-dark);
}

#dowsingModeControls button:active {
    transform: scale(0.9);
}

#dowsingModeControls button#dowsingExitBtn {
    background-color: var(--highlight-color);
    color: white;
}

#dowsingModeControls button#dowsingExitBtn:hover {
    background-color: var(--highlight-dark);
}

/* Dowsing Mode Navigation Buttons (Bulk) */
.dowsing-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white; /* Ensure visible on dark/light backgrounds */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex; /* Flex is set in inline styles in HTML, but good to reinforce */
    align-items: center;
    justify-content: center;
    z-index: 20002; /* Above canvas */
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.dowsing-nav-btn:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.dowsing-nav-btn.prev {
    left: 30px;
}

.dowsing-nav-btn.next {
    right: 30px;
}

/* Ensure icons are centered */
.dowsing-nav-btn i {
    pointer-events: none; /* Let click pass through to button */
}

/* Input Area */
.bulk-input-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}

.bulk-instruction { font-size: 0.8em; color: #666; font-style: italic; }

.btn-link {
    background: none; border: none; color: var(--primary-color);
    font-size: 0.85em; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; gap: 5px;
}

#bulkCsvInput {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    padding: 16px;
    font-family: 'Consolas', 'Monaco', 'SF Mono', monospace;
    font-size: 0.85em;
    resize: none;
    background: #fafbfc;
    margin-bottom: 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
    line-height: 1.5;
    color: #334155;
}

#bulkCsvInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(151, 184, 129, 0.12), inset 0 2px 4px rgba(0,0,0,0.02);
    background: #ffffff;
    outline: none;
}

#bulkCsvInput::placeholder {
    color: #94a3b8;
    white-space: pre-wrap;
}

.btn-block { width: 100%; padding: 12px !important; font-size: 0.95em !important; font-weight: 700 !important; }

/* Table Search Container */
#bulkTableSearchContainer {
    margin-top: 12px;
    margin-bottom: 8px;
}

#bulkTableSearchContainer .fa-search {
    color: #94a3b8;
    font-size: 0.9em;
}

#bulkTableSearch {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 0.9em;
    background: #ffffff;
    transition: all 0.2s ease;
    color: #334155;
}

#bulkTableSearch:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(151, 184, 129, 0.15);
    outline: none;
}

#bulkTableSearch::placeholder {
    color: #94a3b8;
}

/* Preview Card & Toolbar - Full Screen Overhaul */
.bulk-preview-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    border: none;
}

.bulk-preview-toolbar {
    padding: 30px 25px 10px 25px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    flex-shrink: 0;
}

.bulk-batch-info { font-size: 0.8em; font-weight: 700; color: #64748b; }

.bulk-preview-nav { display: flex; align-items: center; gap: 12px; }

.bulk-modal-content .close-modal-x {
    position: absolute;
    top: 25px;
    right: 35px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 2em;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
    cursor: pointer;
}

.bulk-modal-content .close-modal-x:hover {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    transform: rotate(90deg);
    border-color: rgba(255, 255, 255, 0.5);
}

.bulk-nav-ctrl {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #475569;
    padding: 0;
    line-height: 1;
}

.bulk-nav-ctrl i {
    font-size: 0.9em;
}

.bulk-nav-ctrl:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(232, 141, 120, 0.25);
    transform: translateY(-1px);
}

/* AI Helper Sparkle Btn */
.ai-sparkle-btn {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    font-size: 0.85em;
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.ai-sparkle-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
}


#bulkIndexInfo { font-size: 0.85em; font-weight: 700; color: #64748b; min-width: 65px; text-align: center; }

.bulk-canvas-wrapper {
    position: relative;
    background: #cbd5e1;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    overflow: hidden;
    background-image: radial-gradient(circle at 2px 2px, rgba(0,0,0,0.05) 1px, transparent 0);
    background-size: 32px 32px;
    min-height: 0;
}

#bulkPreviewCanvas {
    max-width: 100%;
    max-height: 100%;
    background: white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input Actions Section */
.bulk-input-actions {
    margin-bottom: 16px;
}

.bulk-button-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.bulk-button-row .btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1.5px solid;
    cursor: pointer;
}

.bulk-button-row .btn i {
    font-size: 1.3em;
    margin-bottom: 2px;
}

.bulk-button-row .btn span {
    font-size: 0.9em;
}

.bulk-button-row .btn .file-types {
    font-size: 0.7em;
    font-weight: 500;
    opacity: 0.7;
}

/* Upload Button */
.btn-upload {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac !important;
    color: #166534 !important;
}

.btn-upload i {
    color: #22c55e;
}

.btn-upload:hover {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #22c55e !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

/* Template Button */
.btn-template {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd !important;
    color: #1e40af !important;
}

.btn-template i {
    color: #3b82f6;
}

.btn-template:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Instruction Box */
.bulk-instruction-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border-radius: 10px;
    border: 1px solid #fde047;
    margin-bottom: 16px;
}

.bulk-instruction-box .instruction-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #facc15;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bulk-instruction-box .instruction-icon i {
    color: #854d0e;
    font-size: 0.85em;
}

.bulk-instruction-box .instruction-content {
    font-size: 0.85em;
    color: #713f12;
    line-height: 1.5;
}

.bulk-instruction-box .instruction-content strong {
    color: #854d0e;
}

/* Data Input Wrapper */
.bulk-data-input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

/* Search Container */
.bulk-search-container {
    margin-bottom: 16px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9em;
}

.search-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 0.9em;
    background: #ffffff;
    transition: all 0.2s ease;
    color: #334155;
}

.search-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(151, 184, 129, 0.15);
    outline: none;
}

.search-wrapper input::placeholder {
    color: #94a3b8;
}

/* ========================================
   BULK ENGINE - RIGHT PANEL (Preview & Actions)
   ======================================== */

/* Preview Column Container */
.bulk-preview-column {
    flex: 1;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

/* Preview Area Container */
.bulk-preview-area {
    display: none;
    flex: 1;
    flex-direction: column;
    height: 100%;
}

.bulk-preview-area.active {
    display: flex;
}

/* ========================================
   DROP ZONE (Empty State)
   ======================================== */
.bulk-drop-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 40px;
    padding: 40px;
    border: 3px dashed #cbd5e1;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(241, 245, 249, 0.8) 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: center;
}

.bulk-drop-zone:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 253, 244, 0.9) 100%);
    border-color: var(--primary-color);
    transform: scale(1.01);
    box-shadow: 0 8px 30px rgba(151, 184, 129, 0.15);
}

.bulk-drop-zone.drag-over {
    background: linear-gradient(135deg, rgba(151, 184, 129, 0.1) 0%, rgba(151, 184, 129, 0.05) 100%);
    border-color: var(--primary-color);
    border-style: solid;
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(151, 184, 129, 0.25);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-zone-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(151, 184, 129, 0.3);
    margin-bottom: 8px;
}

.drop-zone-icon i {
    font-size: 2.5em;
    color: white;
}

.bulk-drop-zone h4 {
    margin: 0;
    font-size: 1.6em;
    font-family: 'Quicksand', sans-serif;
    color: var(--primary-dark);
    font-weight: 700;
}

.drop-zone-subtitle {
    margin: 0;
    font-size: 1em;
    color: #64748b;
    font-weight: 500;
}

.drop-zone-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
}

.drop-zone-divider::before,
.drop-zone-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.drop-zone-divider span {
    font-size: 0.75em;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.drop-zone-hint {
    margin: 0;
    font-size: 0.9em;
    color: #94a3b8;
    font-style: italic;
}

/* ========================================
   PREVIEW CARD & TOOLBAR
   ======================================== */
.bulk-preview-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

/* Toolbar */
.bulk-preview-toolbar {
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.toolbar-left {
    display: flex;
    align-items: center;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Batch Badge */
.bulk-batch-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #86efac;
    border-radius: 50px;
    color: #166534;
}

.bulk-batch-badge i {
    font-size: 0.9em;
    color: #22c55e;
}

.badge-count {
    font-size: 1.1em;
    font-weight: 800;
    color: #166534;
}

.badge-label {
    font-size: 0.8em;
    font-weight: 600;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Live Preview Badge in Toolbar */
.live-preview-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1.5px solid #93c5fd;
    border-radius: 50px;
    font-size: 0.75em;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 12px;
}

.live-preview-badge i {
    font-size: 0.9em;
    color: #3b82f6;
}

/* Toolbar Buttons */
.btn-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toolbar:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.btn-toolbar i {
    font-size: 0.95em;
}

/* Navigation Controls - Old (deprecated) */
.bulk-preview-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 4px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
}

.nav-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    border: none;
    background: white;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #475569;
    padding: 0;
    line-height: 1;
}

.nav-btn i {
    font-size: 0.9em;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(232, 141, 120, 0.25);
    transform: translateY(-1px);
}

/* ========================================
   CANVAS WRAPPER
   ======================================== */
.bulk-canvas-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: 
        linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(0,0,0,0.03) 1px, transparent 0);
    background-size: 24px 24px;
    overflow: auto;
    min-height: 0;
}

.canvas-container {
    position: relative;
    display: inline-block;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#bulkPreviewCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    background: white;
    border-radius: 8px;
}

.render-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    font-size: 0.7em;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
}

.render-badge i {
    font-size: 0.9em;
    color: var(--primary-color);
}

/* ========================================
   FINAL ACTIONS BAR
   ======================================== */
.bulk-final-actions {
    padding: 16px 24px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
}

.actions-left {
    display: flex;
    align-items: center;
}

.actions-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

/* Export Format in Left Panel - Inline */
.bulk-export-setting {
    grid-column: span 2;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.export-format-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.export-format-inline select {
    padding: 10px 36px 10px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.export-format-inline select:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.export-format-inline select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(151, 184, 129, 0.15);
    outline: none;
}

.format-hint {
    font-size: 0.75em;
    color: #94a3b8;
    font-style: italic;
}

/* Action Buttons */
.btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-action i {
    font-size: 1em;
}

.btn-edit {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
}

.btn-edit:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-1px);
}

.btn-export {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(151, 184, 129, 0.3);
    padding: 12px 24px;
}

.btn-export:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(151, 184, 129, 0.4);
}

.export-hint {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65em;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn-glow { 
    box-shadow: 0 4px 12px rgba(217, 98, 31, 0.3); 
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(217, 98, 31, 0.4);
}

/* Smooth transitions for preview area */
.bulk-preview-area {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.bulk-preview-area.active {
    opacity: 1;
    transform: translateY(0);
}

.bulk-primary-action {
    display: flex;
    gap: 12px;
}

.bulk-primary-action .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.bulk-primary-action .btn i {
    font-size: 1em;
}

/* Clear/Reset Button */
.btn-clear {
    flex: 0 0 auto;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    border: 1.5px solid #cbd5e1 !important;
    min-width: 100px;
}

.btn-clear:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    transform: translateY(-1px);
}

/* Process Button */
.btn-process {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(151, 184, 129, 0.3);
}

.btn-process:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(151, 184, 129, 0.4);
}

/* ========================================
   BULK CHART ENGINE - ENHANCEMENTS
   ======================================== */

/* Loading Overlay */
.bulk-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
}

.loading-spinner i {
    font-size: 2.5em;
}

.loading-spinner span {
    font-size: 0.9em;
    font-weight: 600;
    color: #64748b;
}

/* Chart Info Panel - Collapsible */
.bulk-chart-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    z-index: 5;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.4s ease forwards;
    transition: all 0.3s ease;
}

.bulk-chart-info.collapsed {
    min-width: auto;
    padding: 8px 12px;
}

.bulk-chart-info.collapsed .info-content {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85em;
    color: var(--primary-dark);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.info-header:hover {
    color: var(--primary-color);
}

.info-header i:first-child {
    color: var(--primary-color);
}

.toggle-icon {
    margin-left: auto;
    font-size: 0.75em;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.bulk-chart-info.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    opacity: 1;
    transition: all 0.3s ease;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
}

.info-label {
    color: #94a3b8;
    font-weight: 500;
}

.info-value {
    color: #334155;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

/* Export Progress Modal */
.bulk-progress-modal {
    max-width: 400px;
    text-align: center;
    padding: 30px;
}

.bulk-progress-modal h2 {
    justify-content: center;
    gap: 12px;
    font-size: 1.3em;
    margin-bottom: 24px;
    border: none;
}

.bulk-progress-modal h2 i {
    color: var(--primary-color);
}

.progress-container {
    margin-bottom: 24px;
}

.progress-stats {
    font-size: 1.1em;
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
}

.progress-bar-container {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-chart-name {
    font-size: 0.85em;
    color: #64748b;
    font-style: italic;
}

.progress-details {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: #64748b;
}

.detail-item i {
    color: var(--primary-color);
}

/* Validation Panel */
.bulk-validation-panel {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
}

.validation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.85em;
    color: #475569;
}

.validation-header i {
    color: var(--primary-color);
}

.validation-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.validation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8em;
    color: #64748b;
}

.validation-item i {
    font-size: 1em;
}

.validation-item i.fa-check-circle {
    color: #22c55e;
}

.validation-item i.fa-info-circle {
    color: #3b82f6;
}

.validation-item i.fa-exclamation-circle {
    color: #ef4444;
}

/* Empty State */
.bulk-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #99a;
    text-align: center;
    padding: 40px;
}

.bulk-empty-state i {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Small toggle switch */
.toggle-container-sm { position: relative; display: inline-block; width: 34px; height: 18px; }
.toggle-container-sm input { opacity: 0; width: 0; height: 0; }
.slider-sm { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 18px; }
.slider-sm:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider-sm { background-color: var(--primary-color); }
input:checked + .slider-sm:before { transform: translateX(16px); }

/* Layering fixes for overlapping modals */
#confirmModal, #bulkAiModal, #resumeModal {
    z-index: 20000 !important;
}

/* Bulk Engine Mobile Optimizations */
@media (max-width: 950px) {
    .bulk-modal-content {
        height: 100vh !important;
        max-height: 100vh !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    .bulk-main-container {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto;
    }

    .bulk-config-column {
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0;
        padding: 20px !important;
        height: auto !important;
        flex-shrink: 0;
    }

    .bulk-preview-column {
        padding: 0 !important;
        min-height: 450px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* Enhanced Config - Mobile */
    .config-row {
        grid-template-columns: 1fr !important;
    }
    
    .config-row-3 {
        grid-template-columns: 1fr !important;
    }
    
    .toggle-options {
        flex-direction: column;
        gap: 12px !important;
    }
    
    .toggle-option {
        justify-content: space-between;
        width: 100%;
    }
    
    .section-desc {
        font-size: 0.8em !important;
    }

    .bulk-settings-grid {
        grid-template-columns: 1fr !important;
    }
    
    .checkbox-item-full {
        grid-column: span 1 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .bulk-button-row {
        flex-direction: column !important;
    }
    
    .bulk-button-row .btn {
        flex-direction: row !important;
        justify-content: flex-start !important;
        padding: 12px 16px !important;
    }
    
    .bulk-button-row .btn i {
        font-size: 1.1em !important;
        margin-bottom: 0 !important;
        margin-right: 8px !important;
    }
    
    .bulk-button-row .btn .file-types {
        margin-left: auto !important;
        font-size: 0.65em !important;
    }
    
    .bulk-primary-action {
        flex-direction: column !important;
    }
    
    .bulk-primary-action .btn-clear {
        width: 100% !important;
    }
    
    .bulk-header {
        padding: 12px 20px !important;
    }
    
    .bulk-header h2 {
        font-size: 1.1em !important;
    }
    
    .smart-status {
        margin-right: 40px !important;
    }

    .bulk-canvas-wrapper {
        padding: 15px !important;
        flex: 1;
        min-height: 300px;
    }

    .bulk-final-actions {
        padding: 15px 20px !important;
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 20;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .actions-center {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .btn-action {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .export-hint {
        display: none !important;
    }
    
    /* Mobile Drop Zone */
    .bulk-drop-zone {
        margin: 20px !important;
        padding: 30px 20px !important;
    }
    
    .drop-zone-icon {
        width: 60px !important;
        height: 60px !important;
    }
    
    .drop-zone-icon i {
        font-size: 1.8em !important;
    }
    
    .bulk-drop-zone h4 {
        font-size: 1.2em !important;
    }
    
    .drop-zone-subtitle {
        font-size: 0.85em !important;
    }
    
    /* Mobile Toolbar */
    .bulk-preview-toolbar {
        padding: 12px 16px !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .toolbar-right {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }
    
    .toolbar-right .btn-toolbar {
        padding: 8px 12px !important;
    }
    
    .toolbar-right .btn-toolbar span {
        display: none !important;
    }
    
    .chart-navigator {
        order: -1;
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile Canvas */
    .canvas-container {
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Mobile Chart Info Panel */
    .bulk-chart-info {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        margin-bottom: 12px !important;
    }
    
    .info-content {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    
    /* Mobile Export Progress */
    .bulk-progress-modal {
        max-width: 90% !important;
        padding: 20px !important;
    }
    
    .progress-details {
        flex-direction: column !important;
        gap: 8px !important;
    }
}


/* =========================
    Visual Selectors (Cards & Capsules)
   ========================= */

/* Generic Card Grid (Used for Chart Type, Orientation, Position) */
.visual-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.visual-card {
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-light);
}

.visual-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    color: var(--primary-color);
}

.visual-card.active {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.05);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.visual-card i {
    font-size: 1.5em;
    margin-bottom: 2px;
}

.visual-card span {
    font-size: 0.8em;
    line-height: 1.2;
}

/* Font Capsules */
.font-family-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.font-capsule {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
}

.font-capsule:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}

.font-capsule.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}


/* ==========================================
   Review Modal Animations (V1.5.1)
   ========================================== */
.review-details-hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: max-height 0.5s ease-out, opacity 0.4s ease-out, transform 0.4s ease-out, margin-top 0.4s ease;
}

.review-details-visible {
    max-height: 600px; /* Allow enough space for inputs */
    opacity: 1;
    transform: translateY(0);
    margin-top: 20px;
}

/* Ensure star widget is prominent */
.centered-large-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.centered-large-rating .star-widget label {
    font-size: 40px; /* Larger stars */
    padding: 0 5px;
}


/* ==========================================
   Review Enhancements (V1.5.3)
   ========================================== */
/* Pulse Badge for Help Sidebar */
.feedback-badge {
    position: relative;
    display: inline-block;
}

.feedback-badge::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--highlight-color);
    border-radius: 50%;
    border: 2px solid white;
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 141, 120, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(232, 141, 120, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 141, 120, 0); }
}

.fadeInSlideUp {
    animation: fadeInSlideUpAnim 0.4s ease forwards;
}

@keyframes fadeInSlideUpAnim {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Support & Donate Styles --- */
@media (max-width: 600px) {
    .desktop-only { display: none; }
}

/* Donate Option Box in Modal */
.donate-option-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    border-color: var(--sage) !important;
}

/* Success Checkmark Animation */
.success-checkmark-anim {
    width: 80px;
    height: 115px;
    margin: 0 auto;
}
.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #4CAF50;
}
.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}
.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}
.check-icon::before, .check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: #FFFFFF;
    transform: rotate(-45deg);
}
.icon-line {
    height: 5px;
    background-color: #4CAF50;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}
.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}
.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}
.icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(76, 175, 80, .5);
}
.icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: #FFFFFF;
}
@keyframes rotate-circle {
    0% { transform: rotate(-45deg); }
    5% { transform: rotate(-45deg); }
    12% { transform: rotate(-405deg); }
    100% { transform: rotate(-405deg); }
}
@keyframes icon-line-tip {
    0% { width: 0; left: 1px; top: 19px; }
    54% { width: 0; left: 1px; top: 19px; }
    70% { width: 50px; left: -8px; top: 37px; }
    84% { width: 17px; left: 21px; top: 48px; }
    100% { width: 25px; left: 14px; top: 46px; }
}
@keyframes icon-line-long {
    0% { width: 0; right: 46px; top: 54px; }
    65% { width: 0; right: 46px; top: 54px; }
    84% { width: 55px; right: 0px; top: 35px; }
    100% { width: 47px; right: 8px; top: 38px; }
}

/* Review Modal Rating Group Fix */
.rating-group {
    display: flex;
    justify-content: center;
    flex-direction: row-reverse;
    gap: 10px;
    margin-bottom: 20px;
}
.rating-group input { display: none; }
.rating-group label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}
.rating-group label:hover,
.rating-group label:hover ~ label,
.rating-group input:checked ~ label {
    color: #ffd700;
}
.rating-group:hover label { color: #ddd; }
.rating-group label:hover,
.rating-group label:hover ~ label { color: #ffd700; }


/* --- Review Modal 2-Column Layout --- */
.btn-donate-pulse {
    animation: pulse-gold 2s infinite;
}
.btn-create-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(151, 184, 129, 0.45);
}
.btn-create-new:active {
    transform: translateY(0);
}
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(255, 209, 64, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 209, 64, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 209, 64, 0); }
}

@media (max-width: 768px) {
    .review-grid-container {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto;
    }
    .review-col-left {
        order: 2;
        border-right: none !important;
        border-top: 1px solid #d4e5c9;
        padding: 30px 20px !important;
    }
    .review-col-right {
        padding: 30px 20px !important;
    }
    .modal-content {
        width: 95% !important;
        margin: 5% auto !important;
    }
}


/* Fix Review Modal Scrolling on Mobile */
#reviewModal .modal-content {
    overflow: hidden; /* Ensure container clips */
    display: flex;
    flex-direction: column;
}

.review-grid-container {
    flex: 1;
    overflow-y: auto; /* Enable internal scrolling */
    min-height: 0; /* Required for flex child scrolling */
}

@media (max-width: 768px) {
    .review-grid-container {
        display: block !important; /* Stack cleanly */
    }
    .review-col-left {
        min-height: auto; /* Allow shrinking */
    }
    /* Ensure modal content fits on screen */
    #reviewModal .modal-content {
        max-height: 90vh; 
    }
}


/* SUPER ROBUST MOBILE SCROLL FIX */
@media (max-width: 768px) {
    #reviewModal .modal-content {
        display: block !important; /* Remove flex constraints */
        overflow-y: auto !important; /* Scroll the whole modal body */
        max-height: 85vh !important;
    }
    .review-grid-container {
        display: block !important;
        height: auto !important;
        overflow: visible !important; /* Let parent scroll */
    }
}


/* --- Quick Vibe Tags (Review Modal) --- */
.vibe-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}
.vibe-tag {
    font-size: 0.75em;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-light);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px; /* Slight spacing for wrapped items */
}
.vibe-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-dark);
    transform: translateY(-1px);
}
.vibe-tag.active {
    background: var(--primary-color); /* Sage */
    border-color: var(--primary-dark);
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.vibe-tag.active:hover {
    background: var(--primary-dark);
}
/* Adjust rating group margin to fit tags */
#reviewForm .rating-group {
    margin-bottom: 15px !important;
}


/* =========================
    Bulk Excel Table Styling
   ========================= */

.bulk-excel-table-container {
    width: 100%;
    height: 400px; /* Increased default height */
    overflow: auto;
    border: 1px solid #dce0e5;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fff;
    resize: vertical; /* Allow vertical resizing */
    min-height: 200px;
    max-height: 80vh;
}

.bulk-excel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    min-width: 800px; /* Ensure horizontal scroll on small screens */
}

.bulk-excel-table th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.bulk-excel-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    transition: background 0.1s;
}

.bulk-excel-table tr:hover td {
    background: #f8fafc;
}

.bulk-excel-table tr.active-row td {
    background: rgba(151, 184, 129, 0.15) !important; /* Sage tint */
    border-bottom-color: var(--primary-color);
}

.bulk-excel-table td[contenteditable="true"]:focus {
    background: #fff;
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}
