/* PANDEMONIUM REPORT - THEME SYSTEM */
/* Cyberprep/Tron Legacy themes with light/dark variants */

/* ==========================================================================
   DARK THEME (DEFAULT)
   ========================================================================== */

:root {
	/* Dark Theme Colors */
	--primary-bg: #0a0a0f;
	--secondary-bg: #0f0f1a;
	--surface-bg: #141428;
	--card-bg: #1a1a2e;
	--text-primary: #e6f3ff;
	--text-secondary: #9bb3d1;
	--text-muted: #6b7d99;

	/* Accent colors remain consistent across themes */
	--accent-cyan: #00d4ff;
	--accent-orange: #ff6b35;
	--accent-blue: #0f4c75;
	--accent-purple: #7c3aed;

	/* Dynamic theme colors */
	--border-color: rgba(0, 212, 255, 0.3);
	--border-active: rgba(0, 212, 255, 0.8);
	--glow-cyan: rgba(0, 212, 255, 0.4);
	--glow-orange: rgba(255, 107, 53, 0.4);

	/* Grid and scanning effects */
	--grid-opacity: 0.03;
	--scan-opacity: 0.03;

	/* Shadow and overlay effects */
	--shadow-base: rgba(0, 0, 0, 0.8);
	--overlay-bg: rgba(0, 0, 0, 0.9);
	--backdrop-blur: rgba(10, 10, 15, 0.9);
}

/* ==========================================================================
     LIGHT THEME
     ========================================================================== */

[data-theme="light"] {
	/* Light Theme Base Colors - maintaining cyberprep aesthetic */
	--primary-bg: #f0f4ff;
	--secondary-bg: #e6f0ff;
	--surface-bg: #dce8ff;
	--card-bg: #ffffff;
	--text-primary: #1a1a2e;
	--text-secondary: #2d4059;
	--text-muted: #5a6c8a;

	/* Accent colors stay vibrant for cyberprep feel */
	--accent-cyan: #0099cc;
	--accent-orange: #ff5722;
	--accent-blue: #1976d2;
	--accent-purple: #6a1b9a;

	/* Adjusted for light theme */
	--border-color: rgba(0, 153, 204, 0.4);
	--border-active: rgba(0, 153, 204, 0.8);
	--glow-cyan: rgba(0, 153, 204, 0.3);
	--glow-orange: rgba(255, 87, 34, 0.3);

	/* Inverted grid and effects for light theme */
	--grid-opacity: 0.08;
	--scan-opacity: 0.05;

	/* Light theme shadows */
	--shadow-base: rgba(0, 0, 0, 0.1);
	--overlay-bg: rgba(255, 255, 255, 0.01);
	--backdrop-blur: rgba(240, 244, 255, 0.95);
}

/* ==========================================================================
     THEME-SPECIFIC ADJUSTMENTS
     ========================================================================== */

/* Light theme specific overrides */
[data-theme="light"] .grid-background {
	background-image:
		linear-gradient(rgba(0, 153, 204, var(--grid-opacity)) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 153, 204, var(--grid-opacity)) 1px, transparent 1px);
}

[data-theme="light"] .scanning-lines {
	background: linear-gradient(0deg,
			transparent 98%,
			rgba(0, 153, 204, var(--scan-opacity)) 99%,
			transparent 100%);
}

/* Light theme header adjustments */
[data-theme="light"] .main-header,
[data-theme="light"] .admin-header,
[data-theme="light"] .immersive-nav {
	background: var(--backdrop-blur);
	border-bottom: 1px solid var(--border-color);
	box-shadow: 0 2px 20px rgba(0, 153, 204, 0.1);
}

/* Light theme sci-fi frames */
[data-theme="light"] .sci-fi-frame:hover {
	border-color: var(--border-active);
	box-shadow:
		0 0 20px var(--glow-cyan),
		inset 0 0 20px rgba(0, 153, 204, 0.05);
}

/* Light theme buttons */
[data-theme="light"] .sci-fi-button:hover {
	border-color: var(--accent-cyan);
	color: var(--accent-cyan);
	text-shadow: 0 0 10px var(--accent-cyan);
	box-shadow: 0 0 20px var(--glow-cyan);
}

/* Light theme terminal/console elements */
[data-theme="light"] .hero-terminal,
[data-theme="light"] .terminal-header {
	background: var(--card-bg);
	border-color: var(--border-color);
	box-shadow: 0 4px 20px rgba(0, 153, 204, 0.1);
}

/* Light theme modals and overlays */
[data-theme="light"] .modal-backdrop {
	background: rgba(240, 244, 255, 0.8);
	backdrop-filter: blur(10px);
}

[data-theme="light"] .photo-overlay, [data-theme="light"] .modal-overlay {
	background: var(--overlay-bg) !important;
}

/* Light theme form elements */
[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
	border-color: var(--accent-cyan);
	box-shadow: 0 0 15px var(--glow-cyan);
}

/* Light theme stats and metrics */
[data-theme="light"] .stat-value,
[data-theme="light"] .metric-value {
	color: var(--accent-cyan);
	text-shadow: 0 0 15px var(--glow-cyan);
}

/* Light theme progress bars */
[data-theme="light"] .bar-fill,
[data-theme="light"] .progress-fill {
	background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
	box-shadow: 0 0 10px var(--glow-cyan);
}

/* Light theme images and media */
[data-theme="light"] .story-media img,
[data-theme="light"] .photo-thumb img {
	filter: brightness(0.95) contrast(1.05);
}

[data-theme="light"] .story-card:hover .story-media img,
[data-theme="light"] .photo-item:hover .photo-thumb img {
	filter: brightness(1.0) contrast(1.1);
}

/* Light theme nav active states */
[data-theme="light"] .nav-item:hover,
[data-theme="light"] .nav-item.active {
	color: var(--accent-cyan);
	background: rgba(0, 153, 204, 0.1);
	border-left-color: var(--accent-cyan);
	text-shadow: 0 0 10px var(--accent-cyan);
}

/* Light theme filter tabs */
[data-theme="light"] .filter-btn.active,
[data-theme="light"] .filter-tab.active {
	background: var(--accent-cyan);
	color: white;
	border-color: var(--accent-cyan);
}

/* Light theme toggle switches */
[data-theme="light"] .toggle-switch input:checked+.switch {
	background: var(--accent-cyan);
	border-color: var(--accent-cyan);
}

/* Light theme status indicators */
[data-theme="light"] .status-dot.active {
	background: #00e676;
	box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

/* Light theme action buttons */
[data-theme="light"] .edit-btn:hover {
	border-color: var(--accent-cyan);
	color: var(--accent-cyan);
	box-shadow: 0 0 10px var(--glow-cyan);
}

[data-theme="light"] .delete-btn:hover {
	border-color: var(--accent-orange);
	color: var(--accent-orange);
	box-shadow: 0 0 10px var(--glow-orange);
}

/* Light theme thumbnails */
[data-theme="light"] .thumbnail.selected,
[data-theme="light"] .thumbnail.multi.selected {
	border-color: var(--accent-cyan);
	box-shadow:
		0 0 0 2px var(--accent-cyan),
		0 0 12px 2px var(--glow-cyan),
		0 0 40px 8px rgba(0, 153, 204, 0.12);
}

[data-theme="light"] .thumbnail:hover,
[data-theme="light"] .thumbnail:focus-visible {
	border-color: var(--accent-cyan);
	box-shadow:
		0 0 0 3px var(--accent-cyan),
		0 0 24px 0 var(--glow-cyan),
		0 0 60px 12px rgba(106, 27, 154, 0.08);
}

/* PHOTO MODAL */
[data-theme="light"] .photo-modal {
	background: var(--primary-bg);
}

/* actions and nav btns */
[data-theme="light"] .photo-nav,
[data-theme="light"] .photo-modal-info-toggle,
[data-theme="light"] .photo-modal-close {
	background: var(--secondary-bg);
	color: var(--text-muted);
}
[data-theme="light"] .photo-nav:hover,
[data-theme="light"] .photo-modal-info-toggle:hover,
[data-theme="light"] .photo-modal-close:hover {
	background: var(--primary-bg);
	color: var(--text-secondary);
}

[data-theme="light"] .photo-modal-info {
	background: linear-gradient(to top,
	rgba(240, 244, 255, 0.95) 0%,
	rgba(240, 244, 255, 0.9) 70%,
	transparent 100%);
	color: var(--text-muted)
}

[data-theme="light"] .photo-info-header h4,
[data-theme="light"] .photo-counter {
	color: var(--accent-cyan);
}

[data-theme="light"] .photo-counter {
	background: rgb(230, 240, 255);
}

[data-theme="light"] .metadata-value,
[data-theme="light"] .metadata-label {
	color: var(--text-secondary);
}

/* ==========================================================================
     THEME TRANSITION ANIMATIONS
     ========================================================================== */

* {
	transition:
		background-color 0.3s ease,
		border-color 0.3s ease,
		color 0.3s ease,
		box-shadow 0.3s ease;
}

/* Preserve existing animations */
.typing-text,
.bar-fill,
.progress-fill,
.sci-fi-button::before {
	transition: none;
}

/* Theme switch specific animation */
.theme-transitioning {
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}