:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-color: #e2e8f0;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --error-color: #ef4444;
    --success-color: #22c55e;
    --section-bg: rgba(15, 23, 42, 0.5);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --header-height: 70px;
    --footer-height: 60px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header Styles */
header {
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    width: 100%;
}

.container {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 700px;
    text-align: center;
    border: var(--glass-border);
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

h1 {
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.025em;
}

.subtitle {
    color: #94a3b8;
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Input Area */
.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-direction: column;
    position: relative;
}

@media (min-width: 640px) {
    .input-group {
        flex-direction: row;
    }
}

input {
    flex: 1;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #475569;
    background-color: rgba(15, 23, 42, 0.6);
    color: #fff;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
}

input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
}

button {
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

button:disabled {
    background: #475569;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Area */
#resultArea {
    margin-top: 30px;
    display: none;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-section {
    background: var(--section-bg);
    border-radius: 16px;
    padding: 20px;
    border: var(--glass-border);
    margin-bottom: 20px;
    text-align: left;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

video,
img,
audio {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

video {
    max-height: 500px;
    background: #000;
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px;
    background-color: var(--success-color);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    gap: 8px;
    font-size: 0.95rem;
    border: none;
    min-width: 140px;
}

.download-btn.sd-btn {
    background-color: #0ea5e9;
}

.download-btn.audio-btn {
    background-color: #f59e0b;
}

.download-btn:hover {
    filter: brightness(110%);
    transform: translateY(-2px);
}

/* Loader & Status */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
    display: none;
}

.error-msg {
    color: #fca5a5;
    margin-top: 15px;
    font-weight: 500;
    display: none;
    background: rgba(239, 68, 68, 0.2);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    text-align: left;
}

.badge {
    background-color: rgba(51, 65, 85, 0.8);
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Footer */
footer {
    height: var(--footer-height);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-top: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ad Container */
.ad-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    margin: 25px 0;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ad-container p {
    margin-bottom: 5px;
    opacity: 0.5;
}

/* Platform Icons */
.platform-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #cbd5e1;
    transition: transform 0.3s ease;
}

.platform-item:hover {
    transform: translateY(-5px);
    color: #fff;
}

.platform-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.platform-item:hover .platform-icon {
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.instagram-bg {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border: none;
}

.tiktok-bg {
    background: #000;
    border: 1px solid #333;
}

.facebook-bg {
    background: #1877f2;
    border: none;
}

.platform-icon svg {
    width: 30px;
    height: 30px;
    color: #fff;
}

/* FAQ Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 15px;
    padding: 20px;
    transition: background 0.3s;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question {
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.faq-answer {
    color: #cbd5e1;
    line-height: 1.6;
}

/* SEO Links */
.seo-link {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.seo-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}