/* ======================
   RESET & BASE STYLES
   ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
      Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    min-height: 100vh;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
.tool-page {
	padding: 2rem 1rem;
	max-width: 1400px;
	margin: 0 auto;
	min-height: calc(100vh - 200px);
}

.tool-container {
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
	padding: 2.5rem;
	position: relative;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Header Styles */
.tool-header {
	margin-bottom: 3rem;
	text-align: center;
}

.header-title-section {
	margin-bottom: 2rem;
}

.tool-container h1 {
	font-size: 3rem;
	color: #1a202c;
	margin-bottom: 1.5rem;
	font-weight: 800;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	text-align: center;
	line-height: 1.2;
}

.tool-container h1 i {
	margin-right: 0.5rem;
	color: #667eea;
}

.header-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 1rem;
	margin: 2rem 0;
}

.stat-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1rem;
	background: rgba(102, 126, 234, 0.05);
	border-radius: 12px;
	border: 1px solid rgba(102, 126, 234, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.stat-number {
	font-size: 1.8rem;
	font-weight: 700;
	color: #667eea;
	line-height: 1;
}

.stat-label {
	font-size: 0.85rem;
	color: #718096;
	margin-top: 0.25rem;
	font-weight: 500;
	text-align: center;
}

.tool-description {
	margin: 2rem 0;
	color: #4a5568;
	font-size: 1.2rem;
	line-height: 1.6;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

/* Feature Badges */
.feature-badges {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 2rem;
}

.badge {
	padding: 0.75rem 1.5rem;
	border-radius: 25px;
	font-size: 0.9rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
	cursor: default;
}

.badge::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
	transition: left 0.6s;
}

.badge:hover::before {
	left: 100%;
}

.badge:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.ai-badge {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.batch-badge {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: white;
	box-shadow: 0 8px 25px rgba(240, 147, 251, 0.3);
}

.format-badge {
	background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
	color: white;
	box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.quality-badge {
	background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
	color: white;
	box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
}

.speed-badge {
	background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
	color: white;
	box-shadow: 0 8px 25px rgba(250, 112, 154, 0.3);
}

.security-badge {
	background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
	color: #2d3748;
	box-shadow: 0 8px 25px rgba(168, 237, 234, 0.3);
}

/* ======================
   RELATED TOOLS SECTION
   ====================== */

.related-tools {
	margin: 2rem 0;
	padding: 1.5rem;
	background: #f8f9fa;
	border-radius: 8px;
	border-left: 4px solid #28a745;
}

.related-tools h3 {
	font-size: 1.4rem;
	margin-bottom: 1rem;
	color: #2c3e50;
}

.related-tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 1rem;
}

.related-tool-card {
	display: flex;
	flex-direction: column;
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	transition: transform 0.3s, box-shadow 0.3s;
}

.related-tool-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.related-tool-icon {
	height: 120px;
	background: #e9f7fe;
	display: flex;
	align-items: center;
	justify-content: center;
}

.related-tool-icon i {
	font-size: 3rem;
	color: #007bff;
}

.related-tool-content {
	padding: 1rem;
}

.related-tool-content h4 {
	margin-bottom: 0.5rem;
	color: #2c3e50;
}

.related-tool-content p {
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 1rem;
}

.related-tool-link {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: #007bff;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.9rem;
	transition: background 0.3s;
}

.related-tool-link:hover {
	background: #0056b3;
}

/* ======================
   INSTRUCTIONS SECTION
   ====================== */

.tool-instructions {
	margin: 2rem 0;
	padding: 1.5rem;
	background: #f8f9fa;
	border-radius: 8px;
	border-left: 4px solid #007bff;
}

.tool-instructions h2 {
	font-size: 1.6rem;
	margin-bottom: 1rem;
	color: #2c3e50;
}

.instructions-container {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.instruction-step {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	flex: 1 1 250px;
}

.step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	min-height: 30px;
	width: 30px;
	height: 30px;
	background: #007bff;
	color: white;
	border-radius: 50%;
	font-weight: bold;
	flex-shrink: 0;
}

/* ======================
   UPLOAD SECTION
   ====================== */

.upload-section {
	position: relative;
	padding: 4rem 2rem;
	border: 3px dashed rgba(102, 126, 234, 0.3);
	border-radius: 20px;
	background: rgba(247, 250, 252, 0.8);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	margin: 3rem 0;
	overflow: hidden;
}

.upload-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.upload-section:hover::before {
	opacity: 1;
}

.upload-section.dragover {
	background: rgba(102, 126, 234, 0.05);
	border-color: #667eea;
	transform: scale(1.02);
	box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.upload-zone-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	position: relative;
	z-index: 2;
}

.upload-animation {
	position: relative;
	margin-bottom: 2rem;
	display: flex;
	justify-content: center;
	align-items: center;
}

.upload-icon {
	font-size: 4rem;
	color: #667eea;
	z-index: 3;
	position: relative;
	transition: all 0.3s ease;
	animation: float 3s ease-in-out infinite;
}

@keyframes float {
	0%, 100% { transform: translateY(0px); }
	50% { transform: translateY(-10px); }
}

.upload-waves {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.wave {
	position: absolute;
	border: 2px solid rgba(102, 126, 234, 0.3);
	border-radius: 50%;
	animation: wave 2s linear infinite;
}

.wave-1 {
	width: 80px;
	height: 80px;
	margin-left: -40px;
	margin-top: -40px;
	animation-delay: 0s;
}

.wave-2 {
	width: 120px;
	height: 120px;
	margin-left: -60px;
	margin-top: -60px;
	animation-delay: 0.5s;
}

.wave-3 {
	width: 160px;
	height: 160px;
	margin-left: -80px;
	margin-top: -80px;
	animation-delay: 1s;
}

@keyframes wave {
	0% {
		transform: scale(0.8);
		opacity: 1;
	}
	100% {
		transform: scale(1.5);
		opacity: 0;
	}
}

.upload-content h3 {
	font-size: 1.8rem;
	color: #1a202c;
	margin-bottom: 1rem;
	font-weight: 700;
}

.upload-text {
	font-size: 1.1rem;
	color: #718096;
	margin-bottom: 2rem;
	max-width: 500px;
	line-height: 1.5;
}

.format-support {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
	margin: 1.5rem 0;
}

.format-item {
	padding: 0.5rem 1rem;
	background: rgba(102, 126, 234, 0.1);
	border-radius: 20px;
	font-size: 0.85rem;
	color: #667eea;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	transition: all 0.3s ease;
}

.format-item:hover {
	background: rgba(102, 126, 234, 0.2);
	transform: translateY(-2px);
}

.upload-info {
	font-size: 0.9rem;
	color: #a0aec0;
	margin-top: 1rem;
	max-width: 600px;
	line-height: 1.4;
}

.upload-actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 2rem;
}

.upload-btn {
	padding: 1rem 2rem;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 140px;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.upload-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
	transition: left 0.5s;
}

.upload-btn:hover::before {
	left: 100%;
}

.upload-btn.primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.upload-btn.primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.upload-btn.secondary {
	background: rgba(102, 126, 234, 0.1);
	color: #667eea;
	border: 2px solid rgba(102, 126, 234, 0.2);
}

.upload-btn.secondary:hover {
	background: rgba(102, 126, 234, 0.2);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.upload-btn.tertiary {
	background: rgba(45, 55, 72, 0.05);
	color: #2d3748;
	border: 2px solid rgba(45, 55, 72, 0.1);
}

.upload-btn.tertiary:hover {
	background: rgba(45, 55, 72, 0.1);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(45, 55, 72, 0.1);
}

.upload-progress {
	margin-top: 2rem;
	padding: 1.5rem;
	background: rgba(102, 126, 234, 0.05);
	border-radius: 12px;
	border: 1px solid rgba(102, 126, 234, 0.1);
}

.progress-bar {
	height: 8px;
	background: rgba(102, 126, 234, 0.1);
	border-radius: 4px;
	overflow: hidden;
	position: relative;
	margin-bottom: 1rem;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #667eea, #764ba2);
	border-radius: 4px;
	transition: width 0.3s ease;
	position: relative;
}

.progress-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}

.progress-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.9rem;
}

.progress-text {
	color: #4a5568;
	font-weight: 500;
}

.progress-percentage {
	color: #667eea;
	font-weight: 700;
}

/* ======================
   COMPRESSOR CONTAINER
   ====================== */

.compressor-container {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

/* ======================
   IMAGE INFO PANEL
   ====================== */

.image-info-panel {
	background: #f8f9fa;
	padding: 1.5rem;
	border-radius: 8px;
	margin-bottom: 1rem;
}

.image-info-panel h3 {
	margin-bottom: 1rem;
	color: #2c3e50;
	font-size: 1.3rem;
}

.image-metadata {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.image-metadata p {
	margin: 0;
	font-size: 0.95rem;
}

/* ======================
   PREVIEW CONTAINER
   ====================== */

.preview-container {
	background: #f8f9fa;
	border-radius: 8px;
	padding: 1.5rem;
	overflow: hidden;
}

.preview-comparison {
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 1rem;
	position: relative;
}

.original-preview, 
.compressed-preview {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	background: white;
	padding: 1rem;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.original-preview h3, 
.compressed-preview h3 {
	margin-bottom: 0.8rem;
	color: #2c3e50;
	font-size: 1.1rem;
	text-align: center;
}

.original-preview img, 
.compressed-preview img {
	max-width: 100%;
	height: auto;
	object-fit: contain;
	border: 1px solid #eee;
}

.comparison-divider {
	width: 1px;
	background: #ddd;
	margin: 0 5px;
}

.size-info {
	margin-top: 0.8rem;
	font-size: 0.9rem;
	color: #666;
	text-align: center;
}

.savings-info {
	margin-top: 0.4rem;
	font-size: 0.85rem;
	color: #28a745;
	font-weight: bold;
	text-align: center;
}

.preview-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1rem;
}

.toggle-btn {
	padding: 0.5rem 1rem;
	background: #f1f1f1;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: all 0.2s;
}

.toggle-btn:hover {
	background: #e9ecef;
}

.zoom-controls {
	display: flex;
	gap: 0.5rem;
}

.zoom-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f1f1f1;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
}

.zoom-btn:hover {
	background: #e9ecef;
}

/* ======================
   COMPRESSION OPTIONS
   ====================== */

.compression-options {
	background: #f8f9fa;
	padding: 1.5rem;
	border-radius: 8px;
}

.compression-options h3 {
	margin-bottom: 1.5rem;
	color: #2c3e50;
	font-size: 1.3rem;
}

.compression-options h4 {
	margin: 1rem 0;
	color: #444;
	font-size: 1.1rem;
}

/* Batch Queue Styles */
.batch-queue {
	background: #f8f9fa;
	border-radius: 12px;
	padding: 1.5rem;
	margin: 2rem 0;
	border: 1px solid #e9ecef;
}

.queue-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.queue-header h3 {
	color: #2c3e50;
	font-size: 1.3rem;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.queue-actions {
	display: flex;
	gap: 0.5rem;
}

.btn-queue {
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 6px;
	font-size: 0.9rem;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.btn-queue.select-all {
	background: #28a745;
	color: white;
}

.btn-queue.clear-queue {
	background: #dc3545;
	color: white;
}

.btn-queue:hover {
	transform: translateY(-1px);
	opacity: 0.9;
}

.queue-list {
	max-height: 300px;
	overflow-y: auto;
	margin-bottom: 1rem;
}

.queue-summary {
	padding-top: 1rem;
	border-top: 1px solid #e9ecef;
}

.summary-stats {
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
}

.summary-stats .stat {
	font-size: 0.9rem;
	color: #6c757d;
}

.summary-stats .estimated-savings {
	color: #28a745;
	font-weight: 600;
}

/* AI Optimization Panel */
.ai-optimization-panel {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 12px;
	padding: 2rem;
	color: white;
	margin-bottom: 2rem;
	position: relative;
	overflow: hidden;
}

.ai-optimization-panel::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 100px;
	height: 100px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
}

.ai-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.ai-header h3 {
	color: white;
	margin: 0;
	font-size: 1.4rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.ai-toggle-container {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.toggle-label {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.9);
}

.ai-description {
	font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.5;
	margin: 0;
}

.ai-mode-option h4 {
	color: white;
	margin-bottom: 1rem;
	font-size: 1.2rem;
}

.toggle-switch-container {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

/* Toggle Switch Styles */
.toggle-switch {
	position: relative;
	display: inline-block;
	width: 60px;
	height: 32px;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.3);
	transition: 0.3s;
	border-radius: 32px;
}

.toggle-slider:before {
	position: absolute;
	content: "";
	height: 24px;
	width: 24px;
	left: 4px;
	bottom: 4px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
	background-color: rgba(255, 255, 255, 0.8);
}

input:focus + .toggle-slider {
	box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

input:checked + .toggle-slider:before {
	transform: translateX(28px);
}

.toggle-description {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.4;
}

.ai-badge {
	position: absolute;
	top: -8px;
	right: -8px;
	background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
	color: white;
	font-size: 0.75rem;
	font-weight: bold;
	padding: 4px 8px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	display: flex;
	align-items: center;
	gap: 2px;
}

.ai-badge span {
	font-size: 0.7rem;
	background: rgba(255, 255, 255, 0.2);
	padding: 2px 4px;
	border-radius: 4px;
	margin-right: 2px;
}

/* Quality Control */
.quality-control {
	margin-bottom: 1.5rem;
}

.quality-slider-container {
	margin: 1rem 0;
}

.quality-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5rem;
	font-size: 0.85rem;
	color: #666;
}

.quality-labels span:nth-child(2) {
	font-weight: bold;
	color: #007bff;
}

.slider {
	-webkit-appearance: none;
	width: 100%;
	height: 8px;
	border-radius: 5px;
	background: #d3d3d3;
	outline: none;
}

.slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #007bff;
	cursor: pointer;
}

.slider::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #007bff;
	cursor: pointer;
}

/* Output Format */
.output-options {
	margin-bottom: 1.5rem;
}

.format-options {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	margin-top: 0.5rem;
}

.format-option {
	margin-bottom: 0.5rem;
}

.format-option label {
	display: flex;
	align-items: center;
	cursor: pointer;
}

.format-option input[type="radio"] {
	margin-right: 8px;
}

/* Resize Option */
.resize-option {
	margin-bottom: 1.5rem;
}

.resize-controls {
	margin-top: 0.5rem;
}

.resize-dimensions {
	margin-top: 1rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1rem;
	padding: 1rem;
	background: #f1f1f1;
	border-radius: 4px;
}

.input-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.input-group label {
	font-size: 0.9rem;
	color: #666;
}

.input-group input {
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	width: 100%;
}

.checkbox-group {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	user-select: none;
}

/* ======================
   ACTION BUTTONS
   ====================== */

.action-buttons {
	display: flex;
	gap: 1rem;
	margin-top: 1rem;
}

.reset-btn {
	padding: 0.7rem 1.5rem;
	background: #6c757d;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
	font-size: 1rem;
}

.reset-btn:hover {
	background: #5a6268;
}

.compress-btn {
	padding: 0.7rem 1.5rem;
	background: #28a745;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
	font-size: 1rem;
	margin-left: auto;
}

.compress-btn:hover {
	background: #218838;
}

.compress-btn i, .reset-btn i {
	margin-right: 0.5rem;
}

/* ======================
   BLOG SECTION
   ====================== */

.blog-section {
	margin-top: 3rem;
	border-top: 1px solid #e9ecef;
	padding-top: 2rem;
}

.blog-section h2 {
	font-size: 1.8rem;
	color: #2c3e50;
	margin-bottom: 1.5rem;
}

.blog-content {
	font-size: 1rem;
	line-height: 1.7;
	color: #4a4a4a;
}

.blog-content h3 {
	margin: 1.8rem 0 0.8rem;
	color: #2c3e50;
	font-size: 1.4rem;
}

.blog-content p {
	margin-bottom: 1rem;
}

.blog-content ul, .blog-content ol {
	margin: 1rem 0;
	padding-left: 2rem;
}

.blog-content li {
	margin-bottom: 0.5rem;
}

.blog-content strong {
	color: #2c3e50;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
	.tool-page {
		padding: 2rem 1rem;
	}
	
	.tool-container {
		padding: 2rem;
	}
	
	.header-stats {
		grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	}
	
	.feature-badges {
		gap: 0.75rem;
	}
	
	.badge {
		padding: 0.6rem 1.2rem;
		font-size: 0.85rem;
	}
}

@media (max-width: 992px) {
	.upload-section {
		padding: 3rem 1.5rem;
	}
	
	.upload-actions {
		flex-direction: column;
		align-items: center;
	}
	
	.upload-btn {
		min-width: 200px;
	}
	
	.format-options {
		grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	}
	
	.ai-header {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}
	
	.preview-controls {
		flex-direction: column;
		gap: 1rem;
		align-items: center;
	}
}

@media (max-width: 768px) {
	.tool-page {
		padding: 1rem;
	}
	
	.tool-container {
		padding: 1.5rem;
		border-radius: 15px;
	}
	
	.tool-container h1 {
		font-size: 2.2rem;
		line-height: 1.3;
	}
	
	.tool-description {
		font-size: 1.1rem;
	}
	
	.header-stats {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
	
	.stat-item {
		padding: 0.75rem;
	}
	
	.stat-number {
		font-size: 1.5rem;
	}
	
	.feature-badges {
		gap: 0.5rem;
	}
	
	.badge {
		padding: 0.5rem 1rem;
		font-size: 0.8rem;
		gap: 0.25rem;
	}
	
	.instruction-step {
		flex: 1 1 100%;
	}
	
	.upload-section {
		padding: 2rem 1rem;
		margin: 2rem 0;
	}
	
	.upload-content h3 {
		font-size: 1.5rem;
	}
	
	.upload-text {
		font-size: 1rem;
	}
	
	.format-support {
		gap: 0.25rem;
	}
	
	.format-item {
		padding: 0.4rem 0.8rem;
		font-size: 0.8rem;
	}
	
	.upload-actions {
		flex-direction: column;
		gap: 0.75rem;
		align-items: center;
	}
	
	.upload-btn {
		width: 100%;
		max-width: 280px;
		padding: 0.875rem 1.5rem;
	}
	
	.preview-comparison {
		flex-direction: column;
		gap: 1.5rem;
	}
	
	.comparison-divider {
		display: none;
	}
	
	.format-options {
		grid-template-columns: 1fr;
	}
	
	.format-option label {
		padding: 0.875rem;
		gap: 0.6rem;
	}
	
	.format-option label i {
		font-size: 1.25rem;
	}
	
	.related-tools-grid {
		grid-template-columns: 1fr;
	}
	
	.action-buttons {
		flex-direction: column;
		gap: 0.75rem;
	}
	
	.action-buttons button {
		width: 100%;
		min-width: auto;
	}
	
	.compress-btn {
		margin-left: 0;
		order: 1;
	}
	
	.preview-btn {
		order: 2;
	}
	
	.reset-btn {
		order: 3;
	}
	
	.queue-actions {
		flex-direction: column;
		gap: 0.5rem;
	}
	
	.btn-queue {
		width: 100%;
		justify-content: center;
	}
	
	.summary-stats {
		flex-direction: column;
		gap: 0.5rem;
	}
	
	.download-actions {
		flex-direction: column;
		gap: 0.75rem;
		align-items: center;
	}
	
	.download-btn {
		width: 100%;
		max-width: 280px;
		min-width: auto;
	}
	
	.ai-optimization-panel {
		padding: 1.5rem;
	}
	
	.ai-header {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}
	
	.ai-toggle-container {
		justify-content: center;
	}
	
	.compression-options {
		padding: 1.25rem;
	}
	
	.resize-dimensions {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 576px) {
	.tool-page {
		padding: 0.75rem;
	}
	
	.tool-container {
		padding: 1.25rem;
	}
	
	.tool-container h1 {
		font-size: 1.8rem;
	}
	
	.header-stats {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}
	
	.stat-item {
		padding: 1rem;
		flex-direction: row;
		justify-content: space-between;
		text-align: left;
	}
	
	.stat-number {
		font-size: 1.4rem;
	}
	
	.feature-badges {
		gap: 0.4rem;
	}
	
	.badge {
		padding: 0.4rem 0.8rem;
		font-size: 0.75rem;
	}
	
	.upload-section {
		padding: 1.5rem 0.75rem;
	}
	
	.upload-icon {
		font-size: 3rem;
	}
	
	.wave-1, .wave-2, .wave-3 {
		display: none;
	}
	
	.upload-content h3 {
		font-size: 1.3rem;
	}
	
	.format-support {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.25rem;
		display: grid;
	}
	
	.format-item {
		padding: 0.35rem 0.6rem;
		font-size: 0.75rem;
		justify-content: center;
	}
	
	.upload-btn {
		padding: 0.75rem 1.25rem;
		font-size: 0.9rem;
	}
	
	.notification {
		min-width: 280px;
		max-width: calc(100vw - 40px);
		margin: 0 20px;
	}
	
	.progress-info {
		flex-direction: column;
		gap: 0.25rem;
		align-items: flex-start;
	}
	
	.zoom-controls {
		flex-wrap: wrap;
		justify-content: center;
	}
	
	.advanced-header {
		flex-direction: column;
		gap: 0.75rem;
		align-items: flex-start;
	}
	
	.toggle-advanced {
		align-self: center;
	}
	
	.processing-panel,
	.results-section {
		padding: 1.25rem;
	}
	
	.results-header {
		flex-direction: column;
		gap: 1rem;
		align-items: flex-start;
	}
	
	.overall-savings {
		align-self: center;
	}
}

@media (max-width: 400px) {
	.tool-container h1 {
		font-size: 1.6rem;
	}
	
	.upload-content h3 {
		font-size: 1.2rem;
	}
	
	.format-support {
		grid-template-columns: 1fr;
	}
	
	.badge {
		padding: 0.35rem 0.7rem;
		font-size: 0.7rem;
	}
	
	.upload-btn {
		padding: 0.625rem 1rem;
		font-size: 0.85rem;
	}
	
	.action-buttons button {
		padding: 0.75rem 1.5rem;
		font-size: 0.9rem;
	}
}

/* Tablet landscape orientation */
@media (max-width: 1024px) and (orientation: landscape) {
	.upload-section {
		padding: 2.5rem 2rem;
	}
	
	.preview-comparison {
		gap: 0.75rem;
	}
	
	.original-preview,
	.compressed-preview {
		padding: 0.75rem;
	}
}

/* ======================
   NOTIFICATION SYSTEM
   ====================== */

.notification-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
	pointer-events: none;
}

.notification {
	min-width: 300px;
	max-width: 400px;
	margin-bottom: 10px;
	padding: 16px 20px;
	background: white;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-left: 4px solid #007bff;
	transform: translateX(450px);
	opacity: 0;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.320, 1.275);
	pointer-events: auto;
	position: relative;
	overflow: hidden;
}

.notification.show {
	transform: translateX(0);
	opacity: 1;
}

.notification.success {
	border-left-color: #28a745;
}

.notification.error {
	border-left-color: #dc3545;
}

.notification.warning {
	border-left-color: #ffc107;
}

.notification.info {
	border-left-color: #17a2b8;
}

.notification-content {
	display: flex;
	align-items: center;
	gap: 10px;
}

.notification-content i {
	font-size: 1.1rem;
	flex-shrink: 0;
}

.notification.success .notification-content i {
	color: #28a745;
}

.notification.error .notification-content i {
	color: #dc3545;
}

.notification.warning .notification-content i {
	color: #ffc107;
}

.notification.info .notification-content i {
	color: #17a2b8;
}

.notification-content span {
	font-size: 0.9rem;
	color: #333;
	line-height: 1.4;
}

/* ======================
   ENHANCED FORMAT OPTIONS
   ====================== */

.format-option {
	margin-bottom: 0.8rem;
}

.format-option label {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding: 1rem;
	border: 2px solid #e9ecef;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s;
	background: white;
}

.format-option label:hover {
	border-color: #007bff;
	background: #f8f9ff;
}

.format-option input[type="radio"]:checked + label,
.format-option input[type="radio"]:checked ~ label {
	border-color: #007bff;
	background: #e3f2fd;
}

.format-option input[type="radio"] {
	display: none;
}

.format-option label i {
	font-size: 1.5rem;
	color: #007bff;
	flex-shrink: 0;
}

.format-info {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.format-name {
	font-weight: 600;
	color: #2c3e50;
	font-size: 0.95rem;
}

.format-desc {
	font-size: 0.8rem;
	color: #6c757d;
}

/* ======================
   ADVANCED OPTIONS
   ====================== */

.advanced-options {
	margin-top: 1.5rem;
	border-top: 1px solid #e9ecef;
	padding-top: 1.5rem;
}

.advanced-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.advanced-header h4 {
	margin: 0;
	color: #2c3e50;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.toggle-advanced {
	padding: 0.5rem 1rem;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.toggle-advanced:hover {
	background: #e9ecef;
}

.advanced-content {
	padding-top: 1rem;
}

.option-group {
	margin-bottom: 1rem;
}

.option-group .checkbox-group {
	padding: 0.8rem;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	background: white;
	transition: all 0.2s;
}

.option-group .checkbox-group:hover {
	background: #f8f9fa;
	border-color: #dee2e6;
}

.option-group .checkbox-group i {
	margin-right: 0.5rem;
	color: #007bff;
}

/* ======================
   PROCESSING PANEL
   ====================== */

.processing-panel {
	background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
	border-radius: 12px;
	padding: 2rem;
	margin: 2rem 0;
	border: 1px solid #e1bee7;
}

.processing-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.processing-header h4 {
	margin: 0;
	color: #2c3e50;
	font-size: 1.3rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.cancel-processing {
	padding: 0.5rem 1rem;
	background: #dc3545;
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.cancel-processing:hover {
	background: #c82333;
}

.overall-progress {
	margin-bottom: 1.5rem;
}

.progress-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
}

.current-file {
	font-size: 0.95rem;
	color: #2c3e50;
	font-weight: 500;
}

.progress-percentage {
	font-size: 1rem;
	color: #007bff;
	font-weight: 600;
}

.progress-bar {
	height: 12px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 6px;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #007bff, #0056b3);
	transition: width 0.5s ease;
	border-radius: 6px;
	position: relative;
}

.progress-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}

.ai-processing-status {
	padding: 1rem;
	background: rgba(255, 255, 255, 0.4);
	border-radius: 8px;
	font-size: 0.95rem;
	color: #2c3e50;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.ai-processing-status i {
	color: #667eea;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

/* ======================
   RESULTS SECTION
   ====================== */

.results-section {
	background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
	border-radius: 12px;
	padding: 2rem;
	margin: 2rem 0;
	border: 1px solid #c3e6cb;
}

.results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.results-header h4 {
	margin: 0;
	color: #2c3e50;
	font-size: 1.4rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.overall-savings {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.savings-label {
	font-size: 0.95rem;
	color: #6c757d;
}

.savings-amount {
	font-size: 1.5rem;
	font-weight: 700;
	color: #28a745;
}

.results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.download-actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
}

.download-btn {
	padding: 1rem 2rem;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 500;
	transition: all 0.3s;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 180px;
	justify-content: center;
}

.download-btn.individual {
	background: #007bff;
	color: white;
	box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.download-btn.individual:hover {
	background: #0056b3;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.download-btn.batch {
	background: #28a745;
	color: white;
	box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.download-btn.batch:hover {
	background: #218838;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* ======================
   ENHANCED ACTION BUTTONS
   ====================== */

.action-buttons {
	display: flex;
	gap: 1rem;
	margin-top: 2rem;
	justify-content: flex-end;
	align-items: center;
}

.action-buttons button {
	padding: 1rem 2rem;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 500;
	transition: all 0.3s;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 150px;
	justify-content: center;
}

.reset-btn {
	background: #6c757d;
	color: white;
	order: 1;
}

.reset-btn:hover {
	background: #5a6268;
	transform: translateY(-2px);
}

.preview-btn {
	background: #17a2b8;
	color: white;
	order: 2;
}

.preview-btn:hover {
	background: #138496;
	transform: translateY(-2px);
}

.compress-btn {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	order: 3;
	margin-left: auto;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.compress-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
