/*
Theme Name: Social Media Downloader
Theme URI: https://example.com/social-downloader
Author: Antigravity
Author URI: https://example.com
Description: A lightweight, SE-optimized, and modern WordPress theme for video downloading tools.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: social-downloader
*/

:root {
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    /* Indigo 600 */
    --secondary-color: #ec4899;
    /* Pink 500 */
    --dark-bg: #0f172a;
    /* Slate 900 */
    --card-bg: #1e293b;
    /* Slate 800 */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container-width: 1200px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* =========================================
   Global/Shared Component Styles
   ========================================= */

/* Section Spacing */
section {
    padding: 2rem 0;
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.py-large {
    padding: 6rem 0;
}

/* Added utility */
.bg-darker {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Added utility */

/* Features Grid (Used on Homepage & Tool Pages) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* FAQ List (Used on Homepage & Tool Pages) */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.faq-item summary {
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    /* Hide default arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
}

.faq-item[open] summary::after {
    content: '-';
}

.faq-item p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0;
}

/* =========================================
   Homepage Specific Styles
   ========================================= */

/* Hero */
.hero-section {
    padding: 3rem 0 1rem;
    text-align: center;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.url-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px;
    font-size: 1rem;
    outline: none;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-8px);
    background: #233044;
    border-color: var(--primary-color);
}

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.tool-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.tool-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Homepage Steps */
.steps-grid {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.step-item {
    flex: 1;
    min-width: 250px;
    text-align: center;
    position: relative;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* =========================================
   Tool Page Specific Styles
   ========================================= */

.tool-hero {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.8) 0%, var(--dark-bg) 100%);
    padding: 6rem 0 4rem;
    text-align: center;
}

.tool-hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.tool-hero-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.downloader-box {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.input-group input {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 1rem;
}

.btn-download {
    padding: 0 2rem;
    background: var(--primary-color);
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
}

.supported-formats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.steps-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
    /* Safety for mobile */
}

.step-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    flex: 1;
    min-width: 250px;
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    /* Ensure centering */
}

.content-container h2 {
    color: white;
    margin-top: 2rem;
}

.content-container p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Mobile */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .steps-grid,
    .steps-row {
        flex-direction: column;
    }

    .input-group {
        flex-direction: column;
    }

    .btn-download {
        width: 100%;
        padding: 15px;
    }
}

/* Downloader Result Styles */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.download-link-item {
    transition: var(--transition);
}

.download-link-item:hover {
    background: rgba(30, 41, 59, 0.8) !important;
    /* Slightly lighter than card-bg */
    border-color: var(--primary-color) !important;
}

.download-btn-link:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-2px);
}