:root {
	/* Typography */
	--font-body:
		'Open Sans', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
		'Open Sans', 'Helvetica Neue', sans-serif;
	
	/* Primary Color System */
	--color-primary: #7956EE;
	--color-primary-hover: #8361f1;
	--color-primary-light: #7956EE20;
	--color-secondary: #5333A0;
	
	/* Accent Color System */
	--color-accent: #7956EE;
	--color-accent-hover: #8361f1;
	--color-accent-dark: #5333A0;
	--color-accent-light: #7956EE40;
	--color-accent-light-10: #7956EE10;
	--color-accent-light-20: #7956EE20;
	--color-accent-light-30: #7956EE30;
	--color-accent-light-50: #7956EE50;
	
	/* Background Colors */
	--color-background: #ffffff;
	--color-surface: #f8fafc;
	--color-surface-hover: #f1f5f9;
	--color-bg-0: #f1f5f9;
	--color-bg-1: #e2e8f0;
	--color-bg-2: #cbd5e1;
	
	/* Text Colors */
	--color-text: #1f2937;
	--color-text-muted: #6b7280;
	--color-text-light: #9ca3af;
	
	/* Border Colors */
	--color-border: #e9e9e9;
	--color-border-2: #d1d5db;
	--color-border-light: #e5e7eb;
	
	/* Status Colors */
	--color-success: #10b981;
	--color-success-light: #d1fae5;
	--color-success-dark: #047857;
	--color-warning: #f59e0b;
	--color-warning-light: #fef3c7;
	--color-warning-dark: #d97706;
	--color-error: #ef4444;
	--color-error-light: #fee2e2;
	--color-error-dark: #dc2626;
	
	/* Shadows */
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
	
	/* Border Radius */
	--radius-sm: 0.375rem;
	--radius-md: 0.5rem;
	--radius-lg: 0.75rem;
	--radius-xl: 1rem;
	--radius-full: 9999px;
	
	/* Spacing */
	--spacing-xs: 0.5rem;
	--spacing-sm: 0.75rem;
	--spacing-md: 1rem;
	--spacing-lg: 1.5rem;
	--spacing-xl: 2rem;
	--spacing-2xl: 3rem;
	--spacing-3xl: 4rem;
	
	/* Font Sizes */
	--font-size-xs: 0.75rem;
	--font-size-sm: 0.875rem;
	--font-size-base: 1rem;
	--font-size-lg: 1.125rem;
	--font-size-xl: 1.25rem;
	--font-size-2xl: 1.5rem;
	--font-size-3xl: 1.875rem;
	--font-size-4xl: 2.25rem;
	
	/* Onboarding Colors */
	--onboarding-overlay: rgba(0, 0, 0, 0.5);
	--onboarding-spotlight-border: rgba(255, 255, 255, 0.8);
	--onboarding-spotlight-glow: var(--color-accent);
	--onboarding-tooltip-bg: #ffffff;
	--onboarding-tooltip-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	--onboarding-modal-bg: #ffffff;
	--onboarding-modal-overlay: rgba(0, 0, 0, 0.6);
	--onboarding-progress-bg: #e5e7eb;
	--onboarding-progress-fill: var(--color-accent);
	--onboarding-button-primary: var(--color-accent);
	--onboarding-button-primary-hover: var(--color-accent-hover);
	--onboarding-button-secondary: #f8f9fa;
	--onboarding-button-secondary-hover: #e9ecef;
	--onboarding-text-primary: #2c3e50;
	--onboarding-text-secondary: #6c757d;
	--onboarding-border: #e9ecef;
	
	/* Legacy Support */
	--color-theme-1: var(--color-primary);
	--color-theme-2: var(--color-secondary);
	--column-width: 42rem;
	--column-margin-top: 4rem;
	
	font-family: var(--font-body);
	color: var(--color-text);
}

body {
	height: 100vh;
	margin: 0;
	overflow: hidden;
	overflow-y: auto;
	background-attachment: fixed;
	background-color: var(--color-bg-1);
	background-size: 100vw 100vh;
	background-image:
		radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 100%),
		linear-gradient(180deg, var(--color-bg-0) 0%, var(--color-bg-1) 15%, var(--color-bg-2) 50%);
	user-select: none !important;
}

img{
	-webkit-user-drag: none !important;
}

h1,
h2,
p {
	font-weight: 400;
}

p {
	line-height: 1.5;
}

a {
	color: var(--color-accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

h1 {
	font-size: 2rem;
	text-align: center;
}

h2 {
	font-size: 1rem;
}

code {
	font-family: var(--font-mono);
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}

/* Week view styles */
.week-view {
	position: relative;
}

/* Half-hour divider lines */
.week-time-slot {
	position: relative;
}

.half-hour-divider {
	position: absolute;
	left: 0;
	right: 0;
	height: 1px;
	background-color: rgba(0, 0, 0, 0.1);
	top: 30px; /* Middle of the hour slot */
	pointer-events: none;
	z-index: 1;
}

/* Selection box for drag-to-create */
.selection-box {
	position: absolute;
	background-color: rgba(59, 130, 246, 0.2);
	border: 2px solid rgba(59, 130, 246, 0.8);
	border-radius: 4px;
	pointer-events: none;
	z-index: 1000;
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Enhanced week grid for better visual hierarchy */
.week-grid {
	position: relative;
	min-height: 1440px; /* 24 hours * 60px */
}

.week-time-row {
	position: relative;
	min-height: 60px;
}

.week-time-slot {
	border-right: 1px solid #e5e7eb;
	border-bottom: 1px solid #e5e7eb;
	min-height: 60px;
}

.week-time-slot:last-child {
	border-right: none;
}

.week-time-slot.current-hour {
	background-color: rgba(255, 247, 237, 0.5);
}

.week-time-slot.drag-over {
	background-color: rgba(59, 130, 246, 0.1);
	border: 2px dashed #3b82f6;
}

.week-time-slot.drag-column-highlight {
	background-color: rgba(59, 130, 246, 0.05);
}

::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 0px;
}

::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 0px;
	transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

::-webkit-scrollbar-corner {
	background: #f1f1f1;
}

pre {
	font-size: 16px;
	font-family: var(--font-mono);
	background-color: rgba(255, 255, 255, 0.45);
	border-radius: 3px;
	box-shadow: 2px 2px 6px rgb(255 255 255 / 25%);
	padding: 0.5em;
	overflow-x: auto;
	color: var(--color-text);
}

.text-column {
	display: flex;
	max-width: 48rem;
	flex: 0.6;
	flex-direction: column;
	justify-content: center;
	margin: 0 auto;
}

input,
button {
	font-size: inherit;
	font-family: inherit;
}

button:focus:not(:focus-visible) {
	outline: none;
}

@media (min-width: 720px) {
	h1 {
		font-size: 2.4rem;
	}
}

.visually-hidden {
	border: 0;
	clip: rect(0 0 0 0);
	height: auto;
	margin: 0;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

/* Enhanced Drag and Drop Styles */
.drag-preview {
	transition: none;
	user-select: none;
	border: 2px solid rgba(255, 255, 255, 0.3);
	font-weight: 500;
	letter-spacing: 0.025em;
}

.dragging-active .week-task:not(.dragging) {
	opacity: 0.6;
	transition: opacity 0.2s ease;
	pointer-events: none !important;
}

.week-time-slot.drag-over {
	background-color: var(--color-accent-light-30) !important;
	border: 2px dashed var(--color-accent);
	transition: all 0.15s ease;
	box-shadow: inset 0 0 0 1px var(--color-accent);
}

/* Grid snapping indicators */
.time-cell.show-grid::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: 
		linear-gradient(to bottom, transparent 14px, rgba(22, 196, 127, 0.2) 15px, transparent 16px),
		linear-gradient(to bottom, transparent 29px, rgba(22, 196, 127, 0.3) 30px, transparent 31px),
		linear-gradient(to bottom, transparent 44px, rgba(22, 196, 127, 0.2) 45px, transparent 46px);
	pointer-events: none;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.time-cell.show-grid:hover::before,
:global(body.moving-active) .time-cell::before {
	opacity: 1;
}

/* Invalid drop target styling */
.time-cell.invalid-drop {
	background-color: rgba(239, 68, 68, 0.1) !important;
	border: 2px dashed #ef4444 !important;
	cursor: not-allowed !important;
}

.time-cell.invalid-drop::after {
	content: '✕';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #ef4444;
	font-size: 18px;
	font-weight: bold;
	pointer-events: none;
	z-index: 10;
}

.week-time-slot.drag-over::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, var(--color-accent-light) 0%, transparent 50%);
	pointer-events: none;
	z-index: 1;
}

.week-task.dragging {
	opacity: 0.3;
	transform: scale(0.95);
	transition: all 0.2s ease;
	filter: blur(1px);
	z-index: 1000 !important;
}

/* Improved stacking for overlapping items */
.week-task-relative {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.week-task-relative:hover {
	transform: translateY(-1px) translateX(1px);
	box-shadow: 0 3px 8px rgba(0,0,0,0.3) !important;
	z-index: 50 !important;
}

/* Better visual separation for stacked items */
.week-task-relative[style*="left: 2.5%"] {
	border-left: 2px solid rgba(255,255,255,0.3);
}

.week-task-relative[style*="left: 5%"] {
	border-left: 2px solid rgba(255,255,255,0.4);
}

.week-task-relative[style*="left: 7.5%"] {
	border-left: 2px solid rgba(255,255,255,0.5);
}

/* Smooth drag column highlighting */
.week-time-slot.drag-column-highlight {
	background-color: var(--color-accent-light) !important;
	border-left: 3px solid var(--color-accent);
	border-right: 3px solid var(--color-accent);
	transition: all 0.1s ease;
}

/* Time indicator during drag */
.drag-time-indicator {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background-color: var(--color-accent);
	z-index: 1000;
	pointer-events: none;
	box-shadow: 0 0 4px rgba(22, 196, 127, 0.5);
}

.drag-time-indicator::before {
	content: '';
	position: absolute;
	left: -4px;
	top: -2px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--color-accent);
	box-shadow: 0 0 4px rgba(22, 196, 127, 0.5);
}

* :disabled{
	opacity: .7 !important;
	cursor: not-allowed !important;
}