/* Modern Book Catalog Website Styles */

:root {
	--primary-color: #2c3e50;
	--secondary-color: #34495e;
	--accent-color: #3498db;
	--success-color: #27ae60;
	--warning-color: #f39c12;
	--danger-color: #e74c3c;
	--light-bg: #f8f9fa;
	--dark-bg: #2c3e50;
	--text-primary: #2c3e50;
	--text-secondary: #7f8c8d;
	--border-color: #ecf0f1;
	--shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
	--shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
	--shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
	--gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	--gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	--gradient-dark: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

* {
	box-sizing: border-box;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	line-height: 1.6;
	color: var(--text-primary);
	background-color: #ffffff;
	margin: 0;
	padding: 0;
	min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 1rem;
}

.display-4 {
	font-weight: 700;
	letter-spacing: -0.02em;
}

.lead {
	font-size: 1.25rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.9);
}

/* Navigation */
.navbar {
	background: var(--gradient-dark) !important;
	box-shadow: var(--shadow-medium);
	padding: 1rem 0;
}

.navbar-brand {
	font-weight: 700;
	font-size: 1.5rem;
	color: white !important;
	text-decoration: none;
}

.navbar-nav .nav-link {
	color: rgba(255, 255, 255, 0.9) !important;
	font-weight: 500;
	padding: 0.5rem 1rem !important;
	transition: all 0.3s ease;
	border-radius: 6px;
	margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
	color: white !important;
	background-color: rgba(255, 255, 255, 0.1);
	transform: translateY(-1px);
}

.dropdown-menu {
	border: none;
	box-shadow: var(--shadow-medium);
	border-radius: 12px;
	padding: 0.5rem;
}

.dropdown-item {
	border-radius: 8px;
	padding: 0.75rem 1rem;
	transition: all 0.2s ease;
}

.dropdown-item:hover {
	background-color: var(--light-bg);
	transform: translateX(4px);
}

/* Hero Section */
.hero-section {
	background: var(--gradient-primary);
	padding: 4rem 0;
	position: relative;
	overflow: hidden;
}

.hero-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
	opacity: 0.3;
}

.hero-section .container {
	position: relative;
	z-index: 2;
}

/* Cards */
.card {
	border: none;
	border-radius: 16px;
	box-shadow: var(--shadow-light);
	transition: all 0.3s ease;
	overflow: hidden;
	background: white;
}

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

.card-img-top {
	border-radius: 16px 16px 0 0;
	transition: all 0.3s ease;
}

.card-image-container {
	position: relative;
	overflow: hidden;
	height: 500px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.card:hover .card-img-top {
	transform: scale(1.05);
}

.card-body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex;
}

.card-title {
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 0.5rem;
	font-size: 1.1rem;
}

.card-text {
	color: var(--text-secondary);
	line-height: 1.6;
	flex: 1;
	max-height: 200px;
	overflow: hidden;

	-webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
	mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
	height: 150px;
	width: 300px;
	margin-bottom: auto;
}

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

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

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-medium);
	color: white;
}

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

.btn-outline-primary:hover {
	background: var(--accent-color);
	color: white;
	transform: translateY(-2px);
	box-shadow: var(--shadow-medium);
}

.btn-success {
	background: var(--gradient-secondary);
	color: white;
}

.btn-success:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-medium);
	color: white;
}

.btn-outline-success {
	border: 2px solid var(--success-color);
	color: var(--success-color);
	background: transparent;
}

.btn-outline-success:hover {
	background: var(--success-color);
	color: white;
	transform: translateY(-2px);
	box-shadow: var(--shadow-medium);
}

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

.btn-outline-secondary:hover {
	background: var(--text-secondary);
	color: white;
	transform: translateY(-2px);
	box-shadow: var(--shadow-medium);
}

/* Badges */
.badge {
	font-weight: 500;
	padding: 0.5rem 1rem;
	border-radius: 20px;
	font-size: 0.8rem;
}

.bg-primary {
	background: var(--gradient-primary) !important;
}

/* Sections */
section {
	padding: 3rem 0;
}

.container {
	max-width: 1200px;
}

/* Book Grid */
.book-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 2rem;
	margin: 2rem 0;
}

/* Series Cards */
.series-card {
	background: white;
	border-radius: 16px;
	padding: 2rem;
	text-align: center;
	box-shadow: var(--shadow-light);
	transition: all 0.3s ease;
	border: 2px solid transparent;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.series-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-heavy);
	border-color: var(--accent-color);
}

.series-card h5 {
	color: var(--text-primary);
	margin-bottom: 1rem;
}

.series-card .series-stats {
	margin-top: auto;
}

.series-card .text-muted {
	color: var(--text-secondary) !important;
}

/* Book Details */
.book-details {
	background: white;
	border-radius: 20px;
	padding: 2rem;
	box-shadow: var(--shadow-medium);
}

.book-image {
	border-radius: 16px;
	box-shadow: var(--shadow-medium);
	transition: all 0.3s ease;
}

.book-image:hover {
	transform: scale(1.02);
}

/* Admin Panel */
.admin-card {
	background: white;
	border-radius: 16px;
	box-shadow: var(--shadow-medium);
	overflow: hidden;
}

.admin-header {
	background: var(--gradient-dark);
	color: white;
	padding: 1.5rem;
	text-align: center;
}

.admin-body {
	padding: 2rem;
}

/* Forms */
.form-control {
	border: 2px solid var(--border-color);
	border-radius: 8px;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	transition: all 0.3s ease;
}

.form-control:focus {
	border-color: var(--accent-color);
	box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
	font-weight: 500;
	color: var(--text-primary);
	margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
	border: none;
	border-radius: 12px;
	padding: 1rem 1.5rem;
	font-weight: 500;
}

.alert-danger {
	background: linear-gradient(135deg, #ff6b6b, #ee5a52);
	color: white;
}

.alert-success {
	background: linear-gradient(135deg, #51cf66, #40c057);
	color: white;
}

/* Footer */
.footer {
	background: var(--gradient-dark);
	color: rgba(255, 255, 255, 0.8);
	padding: 2rem 0;
	margin-top: 4rem;
}

.footer a {
	color: rgb(255, 255, 255);
	text-decoration: none;
	transition: color 0.3s ease;
}

.footer a:hover {
	color: white;
}

/* Responsive Design */
@media (max-width: 992px) {
	.container {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.book-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 768px) {
	.hero-section {
		padding: 2rem 0;
	}

	.display-4 {
		font-size: 2rem;
	}

	.lead {
		font-size: 1rem;
	}

	.card-body {
		padding: 1rem;
	}

	.btn {
		padding: 0.5rem 1rem;
		font-size: 1rem;
	}

	.book-grid {
		grid-template-columns: 1fr !important;
		gap: 1rem;
	}

	.series-card {
		padding: 1rem;
	}

	.admin-header,
	.admin-body {
		padding: 1rem;
	}

	.footer {
		font-size: 0.95rem;
		padding: 1rem 0;
	}

	table {
		font-size: 0.95rem;
		display: block;
		overflow-x: auto;
		width: 100%;
	}

	th,
	td {
		white-space: nowrap;
	}
}

@media (max-width: 576px) {
	.container {
		padding-left: 0.5rem;
		padding-right: 0.5rem;
	}

	.footer {
		font-size: 0.9rem;
		padding: 0.5rem 0;
	}

	.navbar-brand {
		font-size: 1.1rem;
	}

	.btn,
	.btn-primary,
	.btn-outline-primary,
	.btn-success,
	.btn-outline-success,
	.btn-outline-secondary {
		font-size: 0.95rem;
		padding: 0.5rem 0.75rem;
	}

	.form-control,
	.form-select {
		font-size: 1rem;
		padding: 0.5rem 0.75rem;
	}

	.series-card,
	.admin-card {
		padding: 0.5rem;
	}

	.book-grid {
		grid-template-columns: 1fr !important;
		gap: 0.5rem;
	}
}

/* Loading States */
.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Animations */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-in-up {
	animation: fadeInUp 0.6s ease-out;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
	background: var(--secondary-color);
}

.wrap {
	text-wrap: auto;
	word-break: break-all;
}

.white {
	color: white !important;
}