/* TikTok Downloader Styles */
body {
    
    background: linear-gradient(89.86deg, #5940f1 8.6%, #ce00ff 99.86%);
}
.container {
    max-width: 1080px;
    margin: 0 auto;
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 20px;
    background: white;
    padding: 10px;
}

/* Header */
.header-content {
    width: auto;
    margin: 0 auto;
}

.header-tiktok {
    text-align: center;
}

.title-header {
    font-size: 3rem;
    font-weight: bold;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #000000;
	font-size: 22px;
}

/* Search Card */
.search-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    margin-bottom: 18px;
}

.search-card.hidden {
    display: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 18px;
    transition: all 0.3s ease;
    outline: none;
    background: #fafafa;
}

.form-group input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

/* Loading Container */
.loading-container {
    display: none;
    background: white;
    border-radius: 14px;
    padding: 30px 20px;
    margin-bottom: 18px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    text-align: center;
}

.loading-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.loading-spinner {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #667eea;
}

.spinner-ring:nth-child(2) {
    border-right-color: #764ba2;
    animation-delay: 0.1s;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #667eea;
    animation-delay: 0.2s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Result Card */
.result-card {
    background: linear-gradient(1deg, #c704fe, transparent);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    animation: slideUp 0.6s ease;
    padding: 10px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Thumbnail */
.thumbnail-container {
    padding: 20px 20px 0 20px;
    display: flex;
    justify-content: center;
}

.video-thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-thumbnail.placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

/* Video Info */
.video-info {
    padding: 18px;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.3;
}

/* Creator Info */
.creator-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
}

.creator-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.creator-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.stat-icon {
    font-size: 14px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 9px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

/* Download Buttons */
.download-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-download.mp4 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.btn-download.mp3 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-download.downloading {
    opacity: 0.7;
    cursor: wait;
}

.btn-download.downloaded {
    background: #10b981 !important;
}

.btn-secondary {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

/* Error Message */
.error-message {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
	.header-content {
    width: auto;
    margin: 0 auto;
    }
}

/* Responsive */
@media (max-width: 480px) {
	.container {
        margin: 10px !important;
    }
    .header h1 { font-size: 1.4rem; }
    .video-thumbnail { width: 80px; height: 80px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
	.title-header {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 18px;
    }
	.header-content {
    width: auto;
    margin: 0 auto;
    }
  
  	h1 {
    font-weight: 700;
    font-size: 22px;
}
}

/* Table of Contents */
.toc {
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	border: 2px solid #e2e8f0;
	border-radius: 25px;
	padding: 35px;
	margin: 40px 0;
	box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.toc h3 {
	color: #1e40af;
	font-size: 1.8rem;
	margin-bottom: 20px;
	font-weight: 700;
	text-align: center;
}

.toc ul {
	list-style: none;
	padding: 0;
}

.toc li {
	padding: 12px 0;
	border-bottom: 1px solid rgba(226, 232, 240, 0.6);
	transition: all 0.3s ease;
}

.toc li:hover {
	transform: translateX(10px);
	background: rgba(124, 58, 237, 0.05);
	padding-left: 15px;
	border-radius: 8px;
}

.toc a {
	color: #4338ca;
	text-decoration: none;
	font-weight: 600;
	font-size: 1.1rem;
	transition: color 0.3s ease;
}

.toc a:hover {
	color: #7c3aed;
	text-decoration: underline;
}

/* Section Headers */
.section-header {
	color: #1e40af;
	font-size: 2.5rem;
	margin: 60px 0 30px 0;
	font-weight: 800;
	position: relative;
	padding: 25px 30px;
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	border-radius: 20px;
	box-shadow: 0 8px 25px rgba(30, 64, 175, 0.1);
	border-left: 8px solid #7c3aed;
}

.section-header::after {
	content: '';
	position: absolute;
	bottom: 10px;
	left: 30px;
	width: 80px;
	height: 4px;
	background: linear-gradient(90deg, #7c3aed, #1e40af);
	border-radius: 2px;
}

h3 {
	color: #1e40af;
	font-size: 1.8rem;
	margin: 40px 0 20px 0;
	font-weight: 700;
	position: relative;
	padding-left: 20px;
}

h3::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 6px;
	height: 30px;
	background: linear-gradient(135deg, #7c3aed, #1e40af);
	border-radius: 3px;
}

/* Content Text */
.content-text {
	font-size: 1.2rem;
	line-height: 1.8;
	color: #374151;
	margin: 25px 0;
}

.intro-text {
	font-size: 1.3rem;
	color: #4b5563;
	line-height: 1.9;
	margin: 30px 0;
	font-weight: 400;
	background: rgba(124, 58, 237, 0.02);
	padding: 25px;
	border-radius: 15px;
	border-left: 5px solid #7c3aed;
}

/* Keyword Highlights */
.keyword-highlight {
    font-weight: 700;
    color: #92400e;
    display: inline;
}

/* Feature Cards Grid */
.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 25px;
	margin: 40px 0;
}

.feature-card {
	background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
	padding: 30px;
	border-radius: 20px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.08);
	border: 2px solid #e2e8f0;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
}

.feature-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: linear-gradient(90deg, #7c3aed, #1e40af, #059669);
	transform: translateX(-100%);
	transition: transform 0.6s ease;
}

.feature-card:hover {
	transform: translateY(-10px) scale(1.02);
	box-shadow: 0 20px 40px rgba(0,0,0,0.15);
	border-color: #7c3aed;
}

.feature-card:hover::before {
	transform: translateX(0);
}

.feature-title {
	font-size: 1.4rem;
	font-weight: 700;
	margin-bottom: 15px;
	background: linear-gradient(135deg, #7c3aed, #1e40af);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Step Guide Cards */
.step-card {
	background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
	border: 3px solid #e2e8f0;
	border-radius: 25px;
	padding: 35px;
	margin: 30px 0;
	box-shadow: 0 12px 35px rgba(0,0,0,0.08);
	transition: all 0.4s ease;
	position: relative;
}

.step-card::before {
	content: '';
	position: absolute;
	top: -3px;
	left: -3px;
	right: -3px;
	bottom: -3px;
	background: linear-gradient(135deg, #7c3aed, #1e40af);
	border-radius: 28px;
	z-index: -1;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.step-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 20px 45px rgba(0,0,0,0.15);
}

.step-card:hover::before {
	opacity: 1;
}

.step-number {
	background: linear-gradient(135deg, #7c3aed, #1e40af);
	color: white;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: 1.3rem;
	margin-bottom: 20px;
	box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* Lists */
ul, ol {
	margin: 20px 0;
	padding-left: 30px;
}

li {
	margin-bottom: 12px;
	font-size: 1.1rem;
	line-height: 1.7;
	color: #4b5563;
}

/* Info Boxes */
.info-box {
	background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
	border-left: 6px solid #f59e0b;
	padding: 25px;
	margin: 30px 0;
	border-radius: 15px;
	box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.warning-box {
	background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
	border-left: 6px solid #ef4444;
	padding: 25px;
	margin: 30px 0;
	border-radius: 15px;
	box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.success-box {
	background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
	border-left: 6px solid #22c55e;
	padding: 25px;
	margin: 30px 0;
	border-radius: 15px;
	box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

/* FAQ Section */
.faq-container {
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	border-radius: 30px;
	padding: 20px;
	margin: 60px 0;
	position: relative;
	overflow: hidden;
	border: 2px solid #e2e8f0;
}

.faq-container::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -30%;
	width: 80%;
	height: 80%;
	background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
}

.faq-item {
	background: white;
	padding: 30px;
	margin-bottom: 25px;
	border-radius: 20px;
	box-shadow: 0 8px 25px rgba(0,0,0,0.06);
	border-left: 6px solid #7c3aed;
	transition: all 0.3s ease;
	position: relative;
	z-index: 1;
}


.faq-item:last-child {
	margin-bottom: 0;
}

.faq-question {
	font-size: 1.4rem;
	font-weight: 700;
	color: #1f2937;
	margin-bottom: 15px;
	background: linear-gradient(135deg, #7c3aed, #1e40af);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.faq-answer {
	color: #4b5563;
	font-size: 1.1rem;
	line-height: 1.8;
}

/* Image Placeholders */
.image-placeholder {
	background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
	border: 3px dashed #0284c7;
	border-radius: 20px;
	padding: 40px 20px;
	text-align: center;
	margin: 30px 0;
	color: #0369a1;
	font-weight: 600;
	font-size: 1.1rem;
	transition: all 0.3s ease;
}

.image-placeholder:hover {
	background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
	border-color: #7c3aed;
	color: #6b21a8;
}

/* Call to Action */
.cta-section {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 60px 40px;
	text-align: center;
	border-radius: 30px;
	margin: 60px 0;
	box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
	position: relative;
	overflow: hidden;
}

.cta-section::before {
	content: '';
	position: absolute;
	top: -100%;
	left: -100%;
	width: 300%;
	height: 300%;
	background: linear-gradient(135deg, #667eea 0%, #b975ff 100%);
	animation: rotate 8s linear infinite;
}

@keyframes rotate {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.cta-title {
	font-size: 2.2rem;
	font-weight: 800;
	margin-bottom: 20px;
	position: relative;
	z-index: 2;
}

.cta-button {
	display: inline-block;
	background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
	color: #1f2937;
	padding: 20px 45px;
	text-decoration: none;
	border-radius: 60px;
	font-weight: 800;
	font-size: 1.3rem;
	margin-top: 25px;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 12px 35px rgba(0,0,0,0.2);
	position: relative;
	z-index: 2;
	border: 3px solid transparent;
}

.cta-button:hover {
	transform: translateY(-5px) scale(1.05);
	box-shadow: 0 20px 50px rgba(0,0,0,0.3);
	background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
	color: white;
	border-color: #f59e0b;
}

/* Footer */
.footer {
	margin-top: 80px;
	padding: 40px 0;
	text-align: center;
	color: #6b7280;
	font-size: 0.95rem;
	border-top: 2px solid #e5e7eb;
	background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
	border-radius: 20px 20px 0 0;
}

/* Responsive Design */
@media (max-width: 768px) {
	.container {
		margin: 10px;
	}
	.hero-title {
		font-size: 2.5rem;
	}
	.hero-header {
		padding: 40px 20px;
		margin: -15px -15px 40px -15px;
	}
	.features-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.section-header {
		font-size: 2rem;
		padding: 20px 25px;
	}
	.faq-container {
		padding: 30px 25px;
	}
}

/* Schema markup helpers */
.breadcrumb {
	margin-bottom: 20px;
	color: #6b7280;
	font-size: 0.9rem;
}

.article-meta {
	color: #6b7280;
	font-size: 0.9rem;
	margin: 10px 0;
}

/* New Custom Design Layout */
.video-info-flex { display: flex; gap: 30px; align-items: flex-start; margin-top: 20px; }
.video-preview { flex: 0 0 300px; } /* Fixed width on desktop */
.video-preview img {width: 100%;border-radius: 15px;box-shadow: 0 4px 15px rgba(0,0,0,0.1);}
.video-details { flex: 1; text-align: left; }
.download-section { display: flex; flex-direction: column; gap: 10px; }

/* Mobile Responsive */
@media (max-width: 768px) {
  .video-info-flex { flex-direction: column; align-items: center; text-align: center; }
  .video-preview {flex: 0 0 auto;width: 100%;max-width: 350px;}
  .video-details { width: 100%; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}