:root {
    /* Light Mode (Default) */
    --primary: #E60023; /* Pinterest Red */
    --primary-hover: #ad081b;
    --bg-main: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    --bg-section: #fff;
    --text-main: #111111;
    --text-muted: #666666;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0,0,0,0.05);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --nav-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-main: linear-gradient(135deg, #121212 0%, #1a1a1a 100%);
    --bg-section: #1e1e1e;
    --text-main: #f5f5f5;
    --text-muted: #aaaaaa;
    --card-bg: rgba(30, 30, 30, 0.85);
    --border-color: rgba(255,255,255,0.05);
    --nav-bg: rgba(20, 20, 20, 0.9);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-main);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-main);
    background: rgba(0,0,0,0.05);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255,255,255,0.1);
}

.theme-toggle:hover {
    background: rgba(0,0,0,0.1);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: inline; }

[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: var(--text-main); /* Fallback */
    background: linear-gradient(90deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Search Box */
.search-box {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: rgba(230, 0, 35, 0.3);
    box-shadow: 0 15px 40px rgba(230, 0, 35, 0.15);
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px 25px;
    font-size: 1.1rem;
    outline: none;
    border-radius: 50px;
    color: var(--text-main);
}

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

.search-box button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 0, 35, 0.3);
}

.error-msg {
    color: var(--primary);
    margin-top: 15px;
    font-weight: 600;
    height: 24px;
}

/* Result Section */
.result-section {
    padding: 40px 0;
    text-align: center;
}

.hidden {
    display: none !important;
}

.glassmorphism {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border-radius: var(--border-radius);
    padding: 40px;
}

.result-card h2 {
    margin-bottom: 25px;
    font-weight: 800;
}

.media-preview {
    margin: 0 auto 30px;
    max-width: 600px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.media-preview video, .media-preview img {
    width: 100%;
    display: block;
    max-height: 500px;
    object-fit: contain;
}

/* ArtPlayer overrides */
#artplayer-container {
    border-radius: 12px;
    overflow: hidden;
}

.art-video-player {
    border-radius: 12px;
}

.download-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.dl-btn {
    background: #111;
    color: #fff;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dl-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 0, 35, 0.3);
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(230, 0, 35, 0.1);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

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

/* Info Sections */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 40px;
}

.how-to-section, .features-section, .faq-section {
    padding: 60px 0;
}

/* Steps Grid */
.steps-grid, .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.step-card, .feature-card {
    background: var(--bg-section);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.step-card:hover, .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.step-number {
    width: 50px;
    height: 50px;
    background: rgba(230, 0, 35, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 20px;
}

.step-card h3, .feature-card h3 {
    margin-bottom: 15px;
    font-weight: 700;
}

.step-card p, .feature-card p {
    color: var(--text-muted);
}

.feature-card h3 {
    font-size: 1.5rem;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-section);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
}

.faq-item h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.faq-item p {
    color: var(--text-muted);
}

/* Footer */
footer {
    background: #111;
    color: #fff;
    text-align: center;
    padding: 40px 0;
    margin-top: auto;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.disclaimer {
    color: #888;
    font-size: 0.85rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* About SEO Section */
.about-section {
    padding: 60px 0;
    background: var(--bg-section);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-muted);
}

.about-content p {
    margin-bottom: 20px;
}

.about-content h3 {
    color: var(--text-main);
    margin: 30px 0 15px;
    font-weight: 700;
}

.about-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.about-content li {
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .section-title { font-size: 1.8rem; }
    .search-box { flex-direction: column; border-radius: 16px; padding: 15px; background: transparent; box-shadow: none; border: none; }
    .search-box input { background: var(--card-bg); margin-bottom: 10px; border-radius: 12px; padding: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
    .search-box button { border-radius: 12px; justify-content: center; }
    .nav-links { display: none; }
    .footer-links { flex-wrap: wrap; gap: 15px; }
    
    .theme-toggle {
        margin-left: auto; /* Push it to the right when nav links are hidden */
    }
}
