@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f13;
    --bg-card: #1a1a2e;
    --bg-input: #16162a;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #2a2a4a;
    --gradient-1: #000000;
    --gradient-2: #1da1f2;
    --gradient-3: #0d8ecf;
    --accent: #1da1f2;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(12px);
    z-index: 100;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-primary);
    opacity: 1;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

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

.hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Ad Slots */
.ad-slot {
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 24px auto;
    max-width: 728px;
    overflow: hidden;
}

/* Tool Card */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.input-group input {
    flex: 1;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}

.input-group input:focus {
    border-color: var(--accent);
}

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

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-2), var(--gradient-3));
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent);
}

.btn-paste {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 14px 16px;
}

.btn-paste:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* Options */
.options-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.option-btn {
    padding: 10px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.option-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.option-btn.active {
    background: linear-gradient(135deg, var(--gradient-2), var(--gradient-3));
    border-color: transparent;
    color: #fff;
}

/* Preview Card */
.preview-card {
    display: none;
    align-items: center;
    gap: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 16px;
}

.preview-card.show {
    display: flex;
}

.preview-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.preview-info {
    flex: 1;
    min-width: 0;
}

.preview-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.preview-url {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.preview-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
}

/* Status / Result */
.status {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    display: none;
    align-items: center;
    gap: 10px;
}

.status.loading {
    display: flex;
    background: rgba(29, 161, 242, 0.1);
    border: 1px solid rgba(29, 161, 242, 0.2);
    color: var(--accent);
}

.status.error {
    display: flex;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.status.success {
    display: flex;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Result */
.result-area {
    margin-top: 20px;
    display: none;
}

.result-area.show {
    display: block;
}

.result-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.result-card .media-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.btn-download {
    background: linear-gradient(135deg, var(--gradient-2), var(--gradient-3));
    color: #fff;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    min-height: 44px;
}

.btn-download:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Supported Platforms */
.platforms {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
    flex-wrap: wrap;
}

.platform-badge {
    padding: 6px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Features / How-to Section */
.section {
    padding: 40px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
}

.section-title .gradient-text {
    background: linear-gradient(135deg, var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* How to Use */
.steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
}

.step-number {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, var(--gradient-2), var(--gradient-3));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}

.step h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.step p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* FAQ */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
}

.faq-question::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
    content: '-';
}

.faq-answer {
    display: none;
    padding: 0 20px 18px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item.open .faq-answer {
    display: block;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 40px;
}

footer .container {
    max-width: 1100px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

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

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .tool-card {
        padding: 20px;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group input {
        width: 100%;
    }

    .btn-paste {
        align-self: stretch;
    }

    .options-row {
        justify-content: center;
    }

    .preview-card {
        gap: 12px;
        padding: 14px 16px;
    }

    .preview-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }

    nav.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .step {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 32px 0 20px;
    }

    .hero h1 {
        font-size: 1.35rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }

    .tool-card {
        padding: 16px;
        border-radius: 12px;
    }

    .option-btn {
        flex: 1;
        text-align: center;
        min-width: calc(33% - 6px);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 24px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}
