:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #06b6d4;
    --accent: #f43f5e;
    --dark: #0f172a;
    --dark-card: #1e293b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(79,70,229,0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ==================== NAVBAR ==================== */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
}

.brand-logo-img {
    border-radius: 8px;
    display: block;
}

.brand-icon {
    font-size: 26px;
}

.brand-name {
    color: var(--primary);
}

.brand-tld {
    color: var(--secondary);
    font-size: 18px;
}

.nav-services {
    display: flex;
    gap: 10px;
}

.nav-service-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-service-link:hover,
.nav-service-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Language Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dd-button {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    background: #ffffff;
    user-select: none;
}

.dd-button::after {
    content: " ▾";
    font-size: 11px;
}

.dd-input {
    display: none;
}

.dd-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    width: 240px;
    z-index: 1001;
    max-height: 300px;
    overflow-y: auto;
}

.dd-input:checked + .dd-menu {
    display: block;
}

.link-container {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.link-container a {
    text-decoration: none;
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.15s ease;
}

.link-container a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    padding: 60px 0 30px;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
    text-align: center;
}

.hero-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 30px;
}

.search-wrapper {
    max-width: 720px;
    margin: 0 auto 10px;
}

.search-form {
    display: flex;
    gap: 10px;
    background: #ffffff;
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.input-container {
    display: flex;
    flex: 1;
    position: relative;
    align-items: center;
}

.form-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 12px 14px;
    background: transparent;
    color: var(--text-main);
}

.btn-paste {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-paste:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79,70,229,0.35);
}

.hero-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ==================== ADSENSE SLOTS ==================== */
.ad-slot {
    margin: 24px auto;
    text-align: center;
    max-width: 728px;
}

.ad-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.ad-placeholder {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 15px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-dummy {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

/* ==================== RESULT CARD ==================== */
.ch_result {
    margin: 25px auto;
    max-width: 720px;
}

.result-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 24px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.media-card .result-body {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.media-preview-box {
    position: relative;
    width: 220px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
}

.media-poster {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.badge-platform {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
}

.badge-tiktok { background: #000000; }
.badge-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.badge-youtube { background: #ff0000; }

.media-details {
    flex: 1;
}

.media-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.media-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-hd {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.btn-hd:hover {
    box-shadow: 0 6px 18px rgba(16,185,129,0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-audio {
    background: linear-gradient(135deg, var(--secondary) 0%, #0891b2 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(6,182,212,0.3);
}

.btn-audio:hover {
    box-shadow: 0 6px 18px rgba(6,182,212,0.45);
    transform: translateY(-1px);
}

/* Photo Gallery Carousel */
.photos-gallery {
    margin-top: 15px;
}

.photos-count {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.photo-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
    text-align: center;
}

.photo-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.btn-photo-download {
    display: block;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 4px;
}

/* Error Card */
.error-card {
    border-left: 5px solid var(--accent);
    text-align: left;
}

.error-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.error-card h3 {
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 6px;
}

.error-tips {
    margin-top: 15px;
    padding: 12px;
    background: #fff1f2;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.error-tips ul {
    margin-left: 20px;
    margin-top: 6px;
}

/* ==================== CONTENT SECTIONS ==================== */
.features-section,
.howto-section,
.faq-section {
    padding: 40px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.feature-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
}

/* How to grid */
.howto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.howto-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
}

.platform-heading {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
}

.steps-list {
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 15px;
}

/* Accordion */
.accordion .card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion .card-header button {
    width: 100%;
    padding: 16px 20px;
    text-align: left;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion .card-header button::after {
    content: "+";
    font-size: 22px;
    font-weight: 400;
    color: var(--primary);
}

.accordion .card-header.active button::after {
    content: "−";
}

.accordion .collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fafafa;
}

.accordion .card-body {
    padding: 16px 20px;
    font-size: 15px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ==================== FOOTER ==================== */
.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
    margin-top: auto;
    padding: 40px 0 20px;
}

.footer-disclaimer {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    list-style: none;
    margin-bottom: 20px;
}

.footer-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
}

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

.footer-bottom {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

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

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hero-title { font-size: 28px; }
    .hero-subtitle { font-size: 15px; }
    .search-form { flex-direction: column; padding: 10px; }
    .btn-submit { height: 48px; justify-content: center; }
    .media-card .result-body { flex-direction: column; }
    .media-preview-box { width: 100%; max-height: 250px; }
    .nav-services { display: none; }
}
