/* ============================================
   TikTok Boost v2 - Main Stylesheet
   ============================================ */

:root {
    --primary: #E91E63;
    --primary-dark: #C2185B;
    --primary-light: #FCE4EC;
    --secondary: #25F4EE;
    --accent: #FE2C55;
    --dark: #161823;
    --gray-900: #1A1A1A;
    --gray-700: #4A4A4A;
    --gray-500: #8A8A8A;
    --gray-300: #D4D4D4;
    --gray-100: #F5F5F5;
    --white: #FFFFFF;
    --success: #22C55E;
    --whatsapp: #25D366;
    --facebook: #1877F2;
    --twitter: #000000;
    --telegram: #0088CC;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(233,30,99,0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #fff5f8 0%, #ffffff 50%, #f0fdff 100%);
    color: var(--gray-900);
    line-height: 1.7;
    min-height: 100vh;
}

body[data-lang="en"], body[data-lang="fr"] {
    font-family: 'Inter', 'Cairo', -apple-system, sans-serif;
}

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

/* ===== Header ===== */
.site-header {
    background: rgba(255,255,255,0.9);
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 16px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 20px;
    color: var(--gray-900);
    text-decoration: none;
    flex-shrink: 0;
}
.logo-icon { font-size: 28px; }
.nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.nav > a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}
.nav > a:hover { color: var(--primary); }

/* Language Switcher */
.lang-switcher {
    position: relative;
}
.lang-btn {
    background: var(--gray-100);
    border: none;
    padding: 8px 14px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    color: var(--gray-900);
    transition: background 0.2s;
}
.lang-btn:hover { background: var(--gray-300); }

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    min-width: 160px;
    display: none;
    z-index: 150;
}
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-menu.show { display: block; animation: fadeIn 0.15s ease-out; }
.lang-menu a {
    display: block;
    padding: 12px 18px;
    color: var(--gray-900);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s;
}
.lang-menu a:hover { background: var(--primary-light); color: var(--primary-dark); }
.lang-menu a.active { background: var(--primary-light); color: var(--primary-dark); }

@media (max-width: 700px) {
    .nav > a { display: none; }
    .nav { gap: 8px; }
}

/* ===== Hero ===== */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.gradient-text {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--gray-700);
    margin-bottom: 40px;
    max-width: 600px;
    margin-inline: auto;
}

/* ===== Main Form ===== */
.main-form {
    max-width: 700px;
    margin: 0 auto 24px;
}
.input-wrap {
    display: flex;
    gap: 8px;
    background: var(--white);
    padding: 8px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.input-wrap:focus-within { border-color: var(--primary); }

#tiktok-url {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 18px;
    font-size: 16px;
    font-family: inherit;
    background: transparent;
    min-width: 0;
    direction: ltr;
    text-align: left;
}
#analyze-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
#analyze-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(233,30,99,0.4);
}
#analyze-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.form-hint {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 14px;
}
.features-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}
.feature-item {
    background: var(--white);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 600px) {
    .hero { padding: 40px 0 30px; }
    .input-wrap { flex-direction: column; padding: 6px; }
    #analyze-btn { width: 100%; }
    .features-row { gap: 6px; }
    .feature-item { font-size: 13px; padding: 6px 12px; }
}

/* ===== Results ===== */
.results-section {
    padding: 40px 0;
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.btn-regen {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-regen:hover { background: #fbcfdb; }

/* ===== Video Card ===== */
.video-card { padding-bottom: 20px; }
.video-preview {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}
.video-preview img {
    width: 140px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}
.video-meta { flex: 1; }
.video-meta h3 {
    font-size: 17px;
    margin-bottom: 12px;
    color: var(--gray-900);
}
.video-stats {
    display: flex;
    gap: 18px;
    color: var(--gray-700);
    font-size: 14px;
    flex-wrap: wrap;
}
.download-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    min-width: 150px;
    display: inline-block;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(233,30,99,0.4);
}
.btn-secondary {
    background: var(--dark);
    color: white;
}
.btn-secondary:hover { background: #000; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-dark);
    margin-top: 14px;
}
.btn-outline:hover { background: var(--primary-light); }

@media (max-width: 500px) {
    .video-preview { flex-direction: column; text-align: center; }
    .video-stats { justify-content: center; }
    .video-preview img { width: 120px; height: 160px; }
}

/* ===== Share Card (NEW) ===== */
.share-card {
    text-align: center;
    background: linear-gradient(135deg, #fff5f8 0%, #ffffff 100%);
    border: 2px solid var(--primary-light);
}
.share-sub {
    color: var(--gray-700);
    font-size: 14px;
    margin-bottom: 18px;
    margin-top: 4px;
}
.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.share-btn {
    background: var(--white);
    border: 2px solid var(--gray-100);
    padding: 14px 10px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    color: var(--gray-900);
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.share-icon {
    font-size: 24px;
    line-height: 1;
}
.share-wa:hover { border-color: var(--whatsapp); color: var(--whatsapp); }
.share-fb:hover { border-color: var(--facebook); color: var(--facebook); }
.share-tw:hover { border-color: var(--twitter); color: var(--twitter); }
.share-tg:hover { border-color: var(--telegram); color: var(--telegram); }
.share-cp:hover, .share-qr:hover { border-color: var(--primary); color: var(--primary-dark); }

#qr-container {
    margin-top: 20px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    display: inline-block;
}
#qr-img {
    width: 200px;
    height: 200px;
}

/* ===== Info Block ===== */
.info-block label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-500);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.info-block p {
    color: var(--gray-900);
    line-height: 1.8;
    word-wrap: break-word;
}

/* ===== AI Items ===== */
.ai-items { display: flex; flex-direction: column; gap: 10px; }
.ai-item {
    background: var(--gray-100);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}
.ai-item:hover { background: #ededed; }
.ai-item span { flex: 1; font-weight: 500; }
.copy-small {
    background: var(--white);
    border: 1px solid var(--gray-300);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
    flex-shrink: 0;
}
.copy-small:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== Hashtags ===== */
.hashtags-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    min-height: 50px;
}
.hashtag-pill {
    background: var(--white);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 14px;
    color: var(--primary-dark);
    font-weight: 600;
    border: 1px solid var(--primary-light);
    cursor: pointer;
    transition: all 0.15s;
}
.hashtag-pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== Caption ===== */
.caption-box {
    background: var(--gray-100);
    padding: 18px;
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
    line-height: 1.9;
    font-size: 15px;
    min-height: 80px;
}

/* ===== How it works ===== */
.how-section { padding: 80px 0; }
.section-title {
    text-align: center;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 50px;
    letter-spacing: -0.02em;
}
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.step {
    background: var(--white);
    padding: 32px 24px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { color: var(--gray-700); font-size: 15px; }

/* ===== FAQ ===== */
.faq-section {
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    padding: 18px 22px;
    box-shadow: var(--shadow-sm);
}
.faq-item summary {
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-inline-start: 34px;
    font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: '+';
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
.faq-item[open] summary::before { content: '−'; }
.faq-item p {
    margin-top: 14px;
    color: var(--gray-700);
    line-height: 1.8;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--dark);
    color: var(--gray-500);
    padding: 32px 0;
    text-align: center;
    margin-top: 60px;
}
.site-footer p { font-size: 14px; margin-bottom: 8px; }
.disclaimer { font-size: 12px; opacity: 0.7; }
.footer-langs {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-langs a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.footer-langs a:hover { color: var(--white); }

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-900);
    color: white;
    padding: 14px 26px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0;
    transition: all 0.3s;
    z-index: 200;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.error { background: #DC2626; }
.toast.success { background: var(--success); }

/* ===== Loader ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 8px;
    min-height: 18px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Ads Container ===== */
.ttk-ad-container {
    margin: 20px 0;
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-align: center;
}
.ttk-ad-container ins.adsbygoogle {
    width: 100%;
}

/* ===== Footer Legal Links ===== */
.footer-legal {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 14px;
}
.footer-legal a {
    color: rgba(255,255,255,0.7);
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-legal a:hover { color: white; }
