/* Reset and Base Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --bg-color: #f9fafb;
    --container-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow-color: rgba(37, 99, 235, 0.1);
    --success-color: #059669;
    --error-color: #dc2626;
    --font-main: 'Inter', 'Segoe UI', sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.2s ease-in-out;
    --gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #047857 100%);
    --gradient-dark: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, .btn {
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: white;
    border: none;
    transition: var(--transition);
    display: inline-block;
}

button:hover, .btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

button:focus, .btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    width: 100%;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.error {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.success {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Header Styles */
header {
    background: var(--container-bg);
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    font-size: 1.75rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo h1::after {
    display: none;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

nav ul li a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.theme-toggle {
    display: flex;
    align-items: center;
}

#theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: none;
}

.fa-moon {
    display: block;
}

.fa-sun {
    display: none;
}

/* Main Content Styles */
main {
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background: var(--container-bg);
    color: var(--text-color);
    padding: 4rem 1rem;
    margin: 0 0 2rem;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border-color);
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 1.5rem;
}

.hero p {
    color: #4b5563;
    font-size: 1.125rem;
    max-width: 600px;
}

.url-form {
    background: var(--container-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
}

.url-form input {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.url-form button {
    background: var(--primary-color);
    border: none;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.url-form button:hover {
    background: var(--secondary-color);
    transform: none;
}

#error-message {
    color: var(--error-color);
    margin-top: 0.5rem;
    min-height: 24px;
}

.url-examples {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
}

.url-examples ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.url-examples li {
    background-color: rgba(52, 152, 219, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius);
    font-family: monospace;
}

/* Loader */
.loader {
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(52, 152, 219, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results Section */
.results {
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.thumbnail-card {
    background: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.thumbnail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.thumbnail-card:hover::before {
    opacity: 0.05;
}

.thumbnail-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.thumbnail-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.thumbnail-card:hover .thumbnail-img {
    transform: scale(1.05);
}

.thumbnail-info {
    padding: 1.5rem;
    background: var(--container-bg);
    position: relative;
    z-index: 2;
}

.thumbnail-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.thumbnail-info h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.thumbnail-card:hover .thumbnail-info h3::after {
    transform: scaleX(1);
    transform-origin: left;
}

.thumbnail-info p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.thumbnail-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.download-btn, .copy-btn {
    flex: 1;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.download-btn {
    background: var(--primary-color);
}

.download-btn:hover {
    background: var(--secondary-color);
    transform: none;
}

.copy-btn {
    background: var(--text-color);
}

.copy-btn:hover {
    background: #374151;
    transform: none;
}

/* How To Use Section */
.how-to-use {
    background: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 3rem;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.how-to-use h2 {
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 2rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step:hover::before {
    opacity: 1;
}

.step:hover {
    transform: translateX(10px);
    box-shadow: var(--box-shadow);
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq {
    background: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 3rem;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.faq h2 {
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 2rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0;
    font-weight: 600;
}

.toggle-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* Ad Container Styles */
.ad-container {
    margin: 2rem 0;
    background-color: #f1f1f1;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.ad-placeholder {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ccc;
    background-color: rgba(0, 0, 0, 0.02);
}

.ad-placeholder p {
    color: #aaa;
    font-style: italic;
}

.ad-header {
    margin-top: 0;
}

.ad-content {
    margin: 3rem 0;
}

.ad-sidebar {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 160px;
    height: 600px;
    display: none;
}

.ad-sidebar .ad-placeholder {
    height: 100%;
}

@media (min-width: 1400px) {
    .ad-sidebar {
        display: block;
    }
}

/* Footer Styles */
footer {
    background: var(--text-color);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
}

.footer-section ul li a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: none;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #777;
}

/* Cookie Consent */
.cookie-consent {
    background: var(--container-bg);
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-buttons button {
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

#cookie-accept {
    background: var(--primary-color);
    color: white;
}

#cookie-accept:hover {
    background: var(--secondary-color);
    transform: none;
}

#cookie-decline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

#cookie-decline:hover {
    background: var(--bg-color);
    transform: none;
}

/* Adblock Message */
#adblock-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.adblock-content {
    background-color: var(--container-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.adblock-content h2 {
    color: var(--error-color);
    margin-bottom: 1rem;
}

.adblock-content p {
    margin-bottom: 1rem;
}

#adblock-close {
    margin-top: 1rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .url-form {
        flex-direction: column;
    }
    
    .url-form input {
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
    }
    
    .url-form button {
        border-radius: var(--border-radius);
        width: 100%;
    }
    
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 1rem;
        justify-content: center;
    }
    
    nav ul li:first-child {
        margin-left: 0;
    }
    
    .theme-toggle {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        display: flex;
        gap: 1rem;
    }
    
    .cookie-buttons button {
        flex: 1;
    }
}

@media (max-width: 500px) {
    html {
        font-size: 14px;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero, .thumbnail-card, .step, .faq-item {
    animation: fadeIn 0.6s ease-out forwards;
}

.thumbnail-card:nth-child(2) { animation-delay: 0.2s; }
.thumbnail-card:nth-child(3) { animation-delay: 0.4s; }
.thumbnail-card:nth-child(4) { animation-delay: 0.6s; }

/* About Page Styles */
.about-hero {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.about-hero h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.about-hero p {
    font-size: 1.2rem;
    color: #4b5563;
    max-width: 600px;
    margin: 0 auto;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 4rem;
}

.about-section h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.about-section p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.features-list li:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.features-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.benefit-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.benefit-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}

.benefit-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.benefit-item h4 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.benefit-item p {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Dark mode specific styles for About page */
body.dark-mode .about-hero {
    border-bottom-color: var(--border-color);
}

body.dark-mode .about-hero p,
body.dark-mode .about-section p,
body.dark-mode .benefit-item p {
    color: #9ca3af;
}

body.dark-mode .features-list li,
body.dark-mode .benefit-item {
    background: var(--container-bg);
    border-color: var(--border-color);
}

body.dark-mode .features-list li:hover,
body.dark-mode .benefit-item:hover {
    border-color: var(--primary-color);
}

/* Responsive styles for About page */
@media (max-width: 768px) {
    .about-hero {
        padding: 3rem 0;
    }

    .about-hero h2 {
        font-size: 2rem;
    }

    .about-section h3 {
        font-size: 1.5rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
} 