/* Global CSS with theme variables */

/* Light theme (default) */
:root {
	--bg-primary: #ffffff;
	--bg-secondary: #f8f9fa;
	--bg-tertiary: #e9ecef;
	--text-primary: #212529;
	--text-secondary: #6c757d;
	--text-muted: #868e96;
	--border-color: #dee2e6;
	--border-light: #e9ecef;
	--shadow: rgba(0, 0, 0, 0.1);
	--shadow-hover: rgba(0, 0, 0, 0.15);
	--accent: #007bff;
	--accent-hover: #0056b3;
	--success: #28a745;
	--danger: #dc3545;
	--danger-hover: #c82333;
	--warning: #ffc107;
	--gradient: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
}

/* Dark theme */
[data-theme='dark'] {
	--bg-primary: #1a1a1a;
	--bg-secondary: #2d3748;
	--bg-tertiary: #4a5568;
	--text-primary: #f7fafc;
	--text-secondary: #e2e8f0;
	--text-muted: #a0aec0;
	--border-color: #4a5568;
	--border-light: #2d3748;
	--shadow: rgba(0, 0, 0, 0.3);
	--shadow-hover: rgba(0, 0, 0, 0.4);
	--accent: #3182ce;
	--accent-hover: #2c5aa0;
	--success: #38a169;
	--danger: #e53e3e;
	--danger-hover: #c53030;
	--warning: #d69e2e;
	--gradient: linear-gradient(135deg, #3182ce 0%, #805ad5 100%);
}

/* Reset and base styles */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	line-height: 1.6;
	color: var(--text-primary);
}

body {
	background: var(--bg-primary);
	color: var(--text-primary);
	transition: background-color 0.3s ease, color 0.3s ease;
	min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
	color: var(--text-primary);
	margin-bottom: 1rem;
	font-weight: 600;
}

h1 {
	font-size: 2.5rem;
	font-weight: 700;
}

h2 {
	font-size: 2rem;
}

h3 {
	font-size: 1.5rem;
}

p {
	color: var(--text-secondary);
	margin-bottom: 1rem;
}

/* Form elements */
input, button, select, textarea {
	font-family: inherit;
	font-size: 1rem;
}

input {
	background: var(--bg-primary);
	border: 2px solid var(--border-color);
	color: var(--text-primary);
	padding: 0.75rem 1rem;
	border-radius: 8px;
	transition: all 0.2s ease;
	width: 100%;
}

input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

input::placeholder {
	color: var(--text-muted);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 8px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 1rem;
	gap: 0.5rem;
}

.btn-primary {
	background: var(--accent);
	color: white;
}

.btn-primary:hover:not(:disabled) {
	background: var(--accent-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px var(--shadow-hover);
}

.btn-danger {
	background: var(--danger);
	color: white;
}

.btn-danger:hover:not(:disabled) {
	background: var(--danger-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px var(--shadow-hover);
}

.btn-ghost {
	background: transparent;
	color: var(--text-primary);
	border: 2px solid var(--border-color);
}

.btn-ghost:hover {
	background: var(--bg-secondary);
	border-color: var(--accent);
}

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Cards */
.card {
	background: var(--bg-primary);
	border: 1px solid var(--border-light);
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 4px 6px var(--shadow);
	transition: all 0.3s ease;
}

.card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px var(--shadow-hover);
}

/* Alerts */
.alert {
	padding: 1rem 1.25rem;
	border-radius: 8px;
	margin-bottom: 1rem;
	border-left: 4px solid;
}

.alert-error {
	background: rgba(220, 53, 69, 0.1);
	color: var(--danger);
	border-color: var(--danger);
}

.alert-success {
	background: rgba(40, 167, 69, 0.1);
	color: var(--success);
	border-color: var(--success);
}

/* Theme toggle button styles */
.theme-toggle {
	position: relative;
	background: var(--bg-secondary);
	border: 2px solid var(--border-color);
	border-radius: 50px;
	padding: 0.5rem;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 60px;
	height: 32px;
	display: flex;
	align-items: center;
}

.theme-toggle:hover {
	border-color: var(--accent);
}

.theme-toggle-slider {
	position: absolute;
	width: 20px;
	height: 20px;
	background: var(--accent);
	border-radius: 50%;
	transition: transform 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
}

[data-theme='dark'] .theme-toggle-slider {
	transform: translateX(28px);
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-in {
	animation: fadeIn 0.4s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
	h1 {
		font-size: 2rem;
	}

	.card {
		padding: 1.5rem;
	}
}

/* Scrollbar styling */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
	background: var(--border-color);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--text-muted);
}