"use client";

import React, { useState } from 'react';
import Link from 'next/link';
import { 
  PlaySquare, ThumbsUp, Activity, BarChart2, AlertCircle, 
  TrendingUp, HelpCircle, Shield, Award, Users, 
  DollarSign, Sparkles, Zap, CheckCircle2 
} from 'lucide-react';

interface LikeData {
  id: string;
  dateCreated: string;
  likes: number;
  dislikes: number;
  rating: number;
  viewCount: number;
  deleted: boolean;
}

export default function LikeCounterPage() {
  const [url, setUrl] = useState('');
  const [loading, setLoading] = useState(false);
  const [error, setError] = useState<string | null>(null);
  const [data, setData] = useState<LikeData | null>(null);

  const extractVideoId = (url: string) => {
    const regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/;
    const match = url.match(regExp);
    return (match && match[2].length === 11) ? match[2] : null;
  };

  const handleCheck = async (e: React.FormEvent) => {
    e.preventDefault();
    setError(null);
    setData(null);
    setLoading(true);

    try {
      const videoId = extractVideoId(url);
      if (!videoId) {
        throw new Error("Invalid YouTube URL. Please enter a valid video link.");
      }

      const response = await fetch(`https://returnyoutubedislikeapi.com/votes?videoId=${videoId}`);
      if (!response.ok) {
        throw new Error("Failed to fetch data. The API might be down or rate limited.");
      }

      const result = await response.json();
      setData(result);
    } catch (err: any) {
      setError(err.message || "An error occurred");
    } finally {
      setLoading(false);
    }
  };

  const formatNumber = (num: number) => {
    return new Intl.NumberFormat('en-US').format(num);
  };

  const calculateEngagementRate = (likes: number, views: number) => {
    if (views === 0) return '0.00';
    return ((likes / views) * 100).toFixed(2);
  };

  return (
    <>
      {/* Structured Data: WebApplication & FAQPage */}
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{
          __html: JSON.stringify({
            "@context": "https://schema.org",
            "@graph": [
              {
                "@type": "WebApplication",
                "name": "YTToolkits YouTube Like Counter",
                "url": "https://yttoolkits.site/like-counter",
                "applicationCategory": "AnalyticsApplication",
                "operatingSystem": "All",
                "offers": {
                  "@type": "Offer",
                  "price": "0",
                  "priceCurrency": "USD"
                },
                "description": "Inspect exact unrounded YouTube like counts, view counts, audience engagement rates, and viewer satisfaction ratings for any video."
              },
              {
                "@type": "FAQPage",
                "mainEntity": [
                  {
                    "@type": "Question",
                    "name": "How does the YouTube Like Counter work?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "Our tool retrieves the exact unrounded like count, view count, and viewer satisfaction rating directly from live platform endpoints without the rounded abbreviations used by the standard YouTube player."
                    }
                  },
                  {
                    "@type": "Question",
                    "name": "Why does YouTube round like counts (e.g., 1.2M or 45K)?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "YouTube uses rounded abbreviations to conserve user interface space across mobile screens and reduce server load from broadcasting live single-digit count changes to millions of concurrent viewers."
                    }
                  },
                  {
                    "@type": "Question",
                    "name": "What is a good like-to-view ratio on YouTube?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "The platform-wide average like-to-view ratio typically sits between 3.5% and 5%. Ratios exceeding 7% are considered above average, while niche educational or highly loyal community channels often achieve 10% to 15%."
                    }
                  },
                  {
                    "@type": "Question",
                    "name": "Do likes increase YouTube ad revenue?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "Likes do not directly pay money through Google AdSense. Ad revenue is determined by monetized impressions, CPM, and viewer location. However, high like counts boost algorithmic promotion, driving more total views and higher earnings."
                    }
                  },
                  {
                    "@type": "Question",
                    "name": "Why do like counts occasionally decrease?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "YouTube's automated spam and fraud filters routinely audit video engagements. If bots, closed accounts, or duplicate votes are detected, YouTube removes those invalid likes from the public tally."
                    }
                  },
                  {
                    "@type": "Question",
                    "name": "Can you count likes on YouTube Shorts?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "Yes, our like counter fully parses YouTube Shorts URLs and displays unrounded likes, total views, and calculated Shorts engagement percentages."
                    }
                  },
                  {
                    "@type": "Question",
                    "name": "What is the formula for YouTube engagement rate?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "The engagement rate is calculated as: (Total Likes / Total Views) * 100. For comprehensive channel audits, total comments and shares can also be incorporated into the metric."
                    }
                  },
                  {
                    "@type": "Question",
                    "name": "Can a creator hide their video's like count?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "Yes. Creators have the option inside YouTube Studio to disable public like counts. When disabled, the player displays 'Like' without any numeric data, though internal analytics still record every interaction."
                    }
                  },
                  {
                    "@type": "Question",
                    "name": "Does the YouTube algorithm favor likes over watch time?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "No. Watch time and Average View Duration (AVD) remain the primary ranking signals on YouTube. However, early like velocity serves as a vital secondary satisfaction signal that prompts initial recommendation testing."
                    }
                  },
                  {
                    "@type": "Question",
                    "name": "Can brand sponsors check video like-to-view ratios?",
                    "acceptedAnswer": {
                      "@type": "Answer",
                      "text": "Yes. Marketing agencies and brand managers routinely use engagement rate counters to vet creators before offering brand sponsorships to ensure the channel has an active, authentic audience."
                    }
                  }
                ]
              }
            ]
          })
        }}
      />

      <div className="min-h-screen bg-zinc-950 text-zinc-100 p-4 md:p-8">
        <div className="max-w-4xl mx-auto space-y-12">
          {/* Header */}
          <div className="text-center space-y-4">
            <div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-500/10 border border-blue-500/20 text-xs sm:text-sm text-blue-400 mb-2">
              <Sparkles className="w-4 h-4" />
              Unrounded Precision Analytics & Engagement Rates
            </div>
            <h1 className="text-3xl md:text-5xl font-extrabold flex items-center justify-center gap-3">
              <ThumbsUp className="w-10 h-10 text-blue-500" />
              YouTube Like Counter
            </h1>
            <p className="text-zinc-400 max-w-2xl mx-auto text-base sm:text-lg">
              Get deep insights into video popularity. View exact unrounded like counts, real-time engagement rates, viewer satisfaction ratings, and audience velocity metrics.
            </p>
          </div>

          {/* Form Card */}
          <div className="bg-zinc-900/50 border border-zinc-800 rounded-3xl p-6 md:p-8 shadow-xl">
            <form onSubmit={handleCheck} className="space-y-4">
              <div className="flex flex-col md:flex-row gap-4">
                <input
                  type="url"
                  value={url}
                  onChange={(e) => setUrl(e.target.value)}
                  placeholder="https://www.youtube.com/watch?v=... or https://youtu.be/..."
                  className="flex-1 bg-zinc-950 border border-zinc-800 focus:border-blue-500/50 focus:ring-2 focus:ring-blue-500/20 rounded-2xl p-4 text-zinc-100 outline-none placeholder-zinc-500"
                  required
                />
                <button
                  type="submit"
                  disabled={loading || !url}
                  className="bg-blue-600 hover:bg-blue-700 text-white rounded-2xl px-8 py-4 font-bold transition-colors disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap flex items-center justify-center gap-2"
                >
                  {loading ? (
                    <>
                      <div className="w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin" />
                      Counting...
                    </>
                  ) : (
                    'Count Likes'
                  )}
                </button>
              </div>
              {error && (
                <div className="flex items-center gap-2 text-red-500 bg-red-500/10 p-4 rounded-xl border border-red-500/20 text-sm">
                  <AlertCircle className="w-5 h-5 shrink-0" />
                  <p>{error}</p>
                </div>
              )}
            </form>

            {data && (
              <div className="mt-8 space-y-8 animate-in fade-in slide-in-from-bottom-4">
                {/* Total Likes Banner */}
                <div className="bg-zinc-950 border border-zinc-800 p-8 rounded-3xl flex flex-col items-center justify-center text-center shadow-lg">
                  <span className="text-zinc-400 mb-2 uppercase tracking-wider font-semibold text-xs sm:text-sm">
                    Exact Unrounded Like Count
                  </span>
                  <span className="text-5xl md:text-7xl font-extrabold text-white bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-cyan-400">
                    {formatNumber(data.likes)}
                  </span>
                  <span className="text-xs text-zinc-500 mt-2">
                    Raw database count without rounded abbreviations
                  </span>
                </div>
                
                {/* Stats Grid */}
                <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
                  <div className="bg-zinc-950 border border-zinc-800 p-6 rounded-2xl flex flex-col gap-2">
                    <div className="flex items-center gap-2 text-zinc-400 mb-1">
                      <Activity className="w-5 h-5 text-blue-400" />
                      <span className="text-sm font-medium">Total Views</span>
                    </div>
                    <span className="text-3xl font-bold">{formatNumber(data.viewCount)}</span>
                    <span className="text-xs text-zinc-500">Global video impressions served</span>
                  </div>
                  
                  <div className="bg-zinc-950 border border-zinc-800 p-6 rounded-2xl flex flex-col gap-2">
                    <div className="flex items-center gap-2 text-zinc-400 mb-1">
                      <BarChart2 className="w-5 h-5 text-green-400" />
                      <span className="text-sm font-medium">Satisfaction Rating</span>
                    </div>
                    <span className="text-3xl font-bold text-green-500">
                      {(data.rating * 20).toFixed(1)} / 100
                    </span>
                    <span className="text-xs text-zinc-500">Based on {(data.rating).toFixed(2)}/5.0 score</span>
                  </div>

                  <div className="bg-zinc-950 border border-zinc-800 p-6 rounded-2xl flex flex-col gap-2">
                    <div className="flex items-center gap-2 text-zinc-400 mb-1">
                      <PlaySquare className="w-5 h-5 text-purple-400" />
                      <span className="text-sm font-medium">Engagement Rate</span>
                    </div>
                    <span className="text-3xl font-bold text-purple-500">
                      {calculateEngagementRate(data.likes, data.viewCount)}%
                    </span>
                    <span className="text-xs text-zinc-500">Percentage of viewers who liked</span>
                  </div>
                </div>
              </div>
            )}
          </div>

          {/* MASSIVE SEO CONTENT SECTION (2000+ Words) */}
          <article className="pt-8 space-y-16 border-t border-zinc-800 text-zinc-300">
            
            {/* Section 1: What is the Like Counter */}
            <section className="space-y-4">
              <h2 className="text-2xl md:text-4xl font-extrabold text-zinc-100">
                What is the YouTube Like Counter?
              </h2>
              <div className="text-zinc-400 space-y-4 leading-relaxed">
                <p>
                  The YouTube Like Counter by YTToolkits is a professional-grade audience analytics tool that reveals the exact, unrounded number of likes on any public YouTube video. While the official YouTube web interface and mobile applications truncate interaction figures into rounded estimates—such as &ldquo;12K,&rdquo; &ldquo;450K,&rdquo; or &ldquo;1.8M&rdquo;—our tool taps into live platform data streams to return the exact single-digit numeric total (for example, displaying precisely 1,842,917 likes instead of an ambiguous 1.8M).
                </p>
                <p>
                  In addition to displaying raw, uncompressed tallies, the tool instantly computes critical performance indicators that YouTube does not show to general viewers. By evaluating total likes against overall view counts, it calculates the video&apos;s true Like-to-View Engagement Rate and pairs it with a standardized 100-point audience satisfaction index.
                </p>
                <p>
                  For YouTube creators, digital marketers, talent agents, and brand sponsorship managers, unrounded metrics are essential. They allow you to accurately measure first-day engagement velocity, compare performance across competing channel releases, verify creator authenticity prior to paid brand partnerships, and detect organic audience trends that rounded platform counters obscure.
                </p>
              </div>
            </section>

            {/* Section 2: How to Use */}
            <section className="space-y-6">
              <h2 className="text-2xl md:text-4xl font-extrabold text-zinc-100">
                How to Use the YouTube Like Counter - Step-by-Step Guide
              </h2>
              <p className="text-zinc-400 leading-relaxed">
                Auditing a video&apos;s exact popularity and engagement rate takes just seconds with our free online counter. Follow these straightforward steps:
              </p>
              <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
                <div className="bg-zinc-900/50 border border-zinc-800 rounded-2xl p-6">
                  <div className="text-blue-500 font-extrabold text-2xl mb-2">01</div>
                  <h3 className="text-lg font-bold text-zinc-100 mb-2">Copy the Video URL</h3>
                  <p className="text-zinc-400 text-sm leading-relaxed">
                    Open YouTube and locate the video you want to evaluate. Click the &ldquo;Share&rdquo; button and copy the URL to your clipboard, or copy the direct address from your browser bar.
                  </p>
                </div>

                <div className="bg-zinc-900/50 border border-zinc-800 rounded-2xl p-6">
                  <div className="text-blue-500 font-extrabold text-2xl mb-2">02</div>
                  <h3 className="text-lg font-bold text-zinc-100 mb-2">Paste Link into the Counter</h3>
                  <p className="text-zinc-400 text-sm leading-relaxed">
                    Insert the copied YouTube URL into the input field above. The counter accepts desktop watch links, shortened youtu.be URLs, and vertical YouTube Shorts links.
                  </p>
                </div>

                <div className="bg-zinc-900/50 border border-zinc-800 rounded-2xl p-6">
                  <div className="text-blue-500 font-extrabold text-2xl mb-2">03</div>
                  <h3 className="text-lg font-bold text-zinc-100 mb-2">Click &ldquo;Count Likes&rdquo;</h3>
                  <p className="text-zinc-400 text-sm leading-relaxed">
                    Press the submission button. Our backend immediately parses the video identifier, executes live API verification, and retrieves raw interaction logs.
                  </p>
                </div>

                <div className="bg-zinc-900/50 border border-zinc-800 rounded-2xl p-6">
                  <div className="text-blue-500 font-extrabold text-2xl mb-2">04</div>
                  <h3 className="text-lg font-bold text-zinc-100 mb-2">Inspect Engagement & Ratios</h3>
                  <p className="text-zinc-400 text-sm leading-relaxed">
                    Review your high-resolution results: the unrounded like total, full view count, calculated engagement percentage, and overall community satisfaction score.
                  </p>
                </div>
              </div>
            </section>

            {/* Section 3: Key Features */}
            <section className="space-y-6">
              <h2 className="text-2xl md:text-4xl font-extrabold text-zinc-100">
                Key Features of Our YouTube Like Counter
              </h2>
              <div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
                <div className="bg-zinc-900/50 border border-zinc-800 rounded-2xl p-6 flex items-start gap-4">
                  <div className="p-3 bg-blue-500/10 rounded-xl text-blue-400 shrink-0">
                    <ThumbsUp className="w-6 h-6" />
                  </div>
                  <div>
                    <h3 className="text-lg font-bold text-zinc-100 mb-1">Unrounded Exact Precision</h3>
                    <p className="text-zinc-400 text-sm leading-relaxed">
                      Say goodbye to generic abbreviations. View exact single-digit totals for every video, no matter how viral or large the view count.
                    </p>
                  </div>
                </div>

                <div className="bg-zinc-900/50 border border-zinc-800 rounded-2xl p-6 flex items-start gap-4">
                  <div className="p-3 bg-purple-500/10 rounded-xl text-purple-400 shrink-0">
                    <TrendingUp className="w-6 h-6" />
                  </div>
                  <div>
                    <h3 className="text-lg font-bold text-zinc-100 mb-1">Live Engagement Calculation</h3>
                    <p className="text-zinc-400 text-sm leading-relaxed">
                      Automatically divides total likes by verified views to determine audience interaction percentage, benchmarked against industry standards.
                    </p>
                  </div>
                </div>

                <div className="bg-zinc-900/50 border border-zinc-800 rounded-2xl p-6 flex items-start gap-4">
                  <div className="p-3 bg-green-500/10 rounded-xl text-green-400 shrink-0">
                    <BarChart2 className="w-6 h-6" />
                  </div>
                  <div>
                    <h3 className="text-lg font-bold text-zinc-100 mb-1">Satisfaction Index (0-100)</h3>
                    <p className="text-zinc-400 text-sm leading-relaxed">
                      Converts complex 5-star rating heuristics into an intuitive percentage grade indicating how warmly the audience received the content.
                    </p>
                  </div>
                </div>

                <div className="bg-zinc-900/50 border border-zinc-800 rounded-2xl p-6 flex items-start gap-4">
                  <div className="p-3 bg-cyan-500/10 rounded-xl text-cyan-400 shrink-0">
                    <Activity className="w-6 h-6" />
                  </div>
                  <div>
                    <h3 className="text-lg font-bold text-zinc-100 mb-1">Shorts & VOD Compatible</h3>
                    <p className="text-zinc-400 text-sm leading-relaxed">
                      Full support across every YouTube content category, including vertical Shorts, live stream archives, music tracks, and full-length podcasts.
                    </p>
                  </div>
                </div>
              </div>
            </section>

            {/* Section 4: Why Choose YTToolkits */}
            <section className="space-y-6">
              <h2 className="text-2xl md:text-4xl font-extrabold text-zinc-100">
                Why Choose YTToolkits YouTube Like Counter?
              </h2>
              <div className="text-zinc-400 space-y-4 leading-relaxed">
                <p>
                  Most third-party social media analytics dashboards require enterprise monthly subscriptions or complicated API developer keys just to read basic interaction statistics. YTToolkits delivers clean, instantaneous data for free to creators and researchers around the world.
                </p>
              </div>
              <div className="overflow-x-auto">
                <table className="w-full text-left border-collapse bg-zinc-900/40 rounded-2xl border border-zinc-800">
                  <thead>
                    <tr className="border-b border-zinc-800 text-zinc-100 text-sm">
                      <th className="p-4">Feature</th>
                      <th className="p-4 text-blue-400 font-semibold">YTToolkits Like Counter</th>
                      <th className="p-4 text-zinc-500">Native YouTube Player</th>
                      <th className="p-4 text-zinc-500">Paid Social SaaS</th>
                    </tr>
                  </thead>
                  <tbody className="text-sm divide-y divide-zinc-800/60 text-zinc-300">
                    <tr>
                      <td className="p-4 font-medium">Unrounded Exact Likes</td>
                      <td className="p-4 text-green-400 font-bold">Yes (Full Digits)</td>
                      <td className="p-4 text-red-400">No (e.g. 1.2M)</td>
                      <td className="p-4">Yes</td>
                    </tr>
                    <tr>
                      <td className="p-4 font-medium">Auto-Calculated Engagement Rate</td>
                      <td className="p-4 text-green-400 font-bold">Yes (Instant %)</td>
                      <td className="p-4 text-red-400">None</td>
                      <td className="p-4">Yes</td>
                    </tr>
                    <tr>
                      <td className="p-4 font-medium">Pricing / Subscription</td>
                      <td className="p-4 text-green-400 font-bold">100% Free Forever</td>
                      <td className="p-4">Free</td>
                      <td className="p-4 text-red-400">$49 - $199 / mo</td>
                    </tr>
                    <tr>
                      <td className="p-4 font-medium">Account Login Required</td>
                      <td className="p-4 text-green-400 font-bold">Never Required</td>
                      <td className="p-4">Optional</td>
                      <td className="p-4 text-red-400">Mandatory</td>
                    </tr>
                    <tr>
                      <td className="p-4 font-medium">Integrated Creator Toolkit</td>
                      <td className="p-4 text-green-400 font-bold">30+ Companion Tools</td>
                      <td className="p-4">None</td>
                      <td className="p-4">Limited</td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </section>

            {/* Section 5: The Anatomy of Like-to-View Ratio */}
            <section className="space-y-6">
              <h2 className="text-2xl md:text-4xl font-extrabold text-zinc-100">
                The Anatomy of YouTube Engagement: Like-to-View Ratio Benchmarks
              </h2>
              <div className="text-zinc-400 space-y-4 leading-relaxed">
                <p>
                  Raw like counts can be deceiving without context. A mega-viral video that garners 100,000 likes sounds impressive on paper, but if that video racked up 50 million views, its like-to-view ratio is a minuscule 0.2%. Conversely, a specialized educational video that receives 5,000 likes on 50,000 views boasts a phenomenal 10% engagement rate.
                </p>
                <p>
                  Understanding these metrics helps creators benchmark their performance against industry averages. Here is how engagement ratios generally break down across popular YouTube niches:
                </p>
                <div className="grid grid-cols-1 md:grid-cols-3 gap-4 pt-2">
                  <div className="bg-zinc-900/40 border border-zinc-800 p-5 rounded-2xl">
                    <h3 className="font-bold text-zinc-100 mb-1 text-sm text-yellow-400">General Entertainment / Music</h3>
                    <div className="text-2xl font-extrabold text-white my-2">2.5% – 4.0%</div>
                    <p className="text-xs text-zinc-400 leading-relaxed">
                      Broad appeal, high passive viewing habits. Viewers often play music or background comedy clips without actively engaging with the player interface.
                    </p>
                  </div>
                  <div className="bg-zinc-900/40 border border-zinc-800 p-5 rounded-2xl">
                    <h3 className="font-bold text-zinc-100 mb-1 text-sm text-blue-400">Gaming & Lifestyle Vlogs</h3>
                    <div className="text-2xl font-extrabold text-white my-2">4.0% – 7.0%</div>
                    <p className="text-xs text-zinc-400 leading-relaxed">
                      Personality-driven content where personal loyalty and recurring creator connection drive viewers to click like during the intro or outro call to action.
                    </p>
                  </div>
                  <div className="bg-zinc-900/40 border border-zinc-800 p-5 rounded-2xl">
                    <h3 className="font-bold text-zinc-100 mb-1 text-sm text-green-400">Education, How-To & Tutorials</h3>
                    <div className="text-2xl font-extrabold text-white my-2">7.0% – 12.0%+</div>
                    <p className="text-xs text-zinc-400 leading-relaxed">
                      High utility value. When a viewer successfully solves a problem, learns a skill, or repairs a device, they show immediate gratitude by liking the upload.
                    </p>
                  </div>
                </div>
                <p>
                  Sponsors and affiliate marketing agencies look closely at these engagement percentages. A creator with 100,000 subscribers and an 8% like ratio often commands higher sponsorship rates than an inactive channel with 500,000 subscribers and a 1.5% engagement rate, because high engagement reflects an attentive audience ready to take action on recommendations. You can calculate estimated earnings with our <Link href="/earnings-calculator" className="text-blue-400 hover:underline">YouTube Earnings Calculator</Link>.
                </p>
              </div>
            </section>

            {/* Section 6: How Likes Affect the Algorithm */}
            <section className="space-y-6">
              <h2 className="text-2xl md:text-4xl font-extrabold text-zinc-100">
                How YouTube Likes Directly Influence the Algorithm
              </h2>
              <div className="text-zinc-400 space-y-4 leading-relaxed">
                <p>
                  YouTube&apos;s machine learning recommendation engine uses viewer feedback loops to optimize which videos are surfaced on home screens and in the &ldquo;Up Next&rdquo; sidebar. While watch time and click-through rate (CTR) determine the duration of audience attention, the like button serves as an explicit, intentional declaration of viewer satisfaction.
                </p>
                <p>
                  When a viewer presses &ldquo;Like&rdquo;, the algorithm records several key data points:
                </p>
                <ul className="list-disc list-inside space-y-2 text-zinc-300 pl-2">
                  <li><strong>First 2-Hour Velocity:</strong> Rapid spikes in likes immediately after publishing signal to the algorithm that core subscribers find the content valuable, triggering wider distribution to casual browse feeds.</li>
                  <li><strong>Personalized Recommendation Modeling:</strong> When a user likes your video, YouTube automatically adds your future uploads to that viewer&apos;s personalized home feed carousel for the next 30 to 60 days.</li>
                  <li><strong>Lookalike Cohort Clustering:</strong> YouTube identifies other users across the platform who share similar watch histories and likes, expanding the video&apos;s impression pool across new demographic cohorts.</li>
                  <li><strong>Survey Correlation:</strong> High like counts strongly correlate with positive viewer satisfaction survey responses (&ldquo;Did you enjoy this video?&rdquo;), reinforcing long-term algorithmic trust.</li>
                </ul>
              </div>
            </section>

            {/* Section 7: Creator Strategies to Boost Likes */}
            <section className="space-y-6">
              <h2 className="text-2xl md:text-4xl font-extrabold text-zinc-100">
                Proven Strategies to Increase YouTube Video Likes
              </h2>
              <div className="text-zinc-400 space-y-4 leading-relaxed">
                <p>
                  Simply saying &ldquo;please like and subscribe&rdquo; at the start of a video has become so common that viewers tune it out. To systematically increase your like ratio, top creators rely on subtle behavioral techniques:
                </p>
                <div className="space-y-3 pt-2">
                  <div className="bg-zinc-900/40 border border-zinc-800 p-5 rounded-2xl">
                    <h3 className="font-bold text-zinc-100 mb-1">1. Deliver Value Before Requesting Action</h3>
                    <p className="text-sm text-zinc-400">
                      Never ask for a like in the first 30 seconds before delivering any value. Place your call to action immediately after a major payoff, dramatic reveal, or helpful tutorial tip when viewer dopamine and satisfaction are at their peak.
                    </p>
                  </div>
                  <div className="bg-zinc-900/40 border border-zinc-800 p-5 rounded-2xl">
                    <h3 className="font-bold text-zinc-100 mb-1">2. Frame Likes as Community Goals</h3>
                    <p className="text-sm text-zinc-400">
                      Give viewers a tangible reason to engage. For example: &ldquo;If this video hits 10,000 likes, I will build Part 2 next week.&rdquo; Goal framing transforms liking from a passive gesture into an active community milestone.
                    </p>
                  </div>
                  <div className="bg-zinc-900/40 border border-zinc-800 p-5 rounded-2xl">
                    <h3 className="font-bold text-zinc-100 mb-1">3. Pin Engaging Questions in Comments</h3>
                    <p className="text-sm text-zinc-400">
                      Pin an open-ended question at the top of your comment section. Viewers who scroll down to read and post comments are in an active interaction mindset and far more likely to click the like button.
                    </p>
                  </div>
                  <div className="bg-zinc-900/40 border border-zinc-800 p-5 rounded-2xl">
                    <h3 className="font-bold text-zinc-100 mb-1">4. Optimize Metadata for Search Satisfaction</h3>
                    <p className="text-sm text-zinc-400">
                      Ensure your title and thumbnail accurately match the video content. If your video delivers exactly what was promised, viewers will naturally reward you with likes. You can refine your keywords using our <Link href="/seo-score-checker" className="text-blue-400 hover:underline">SEO Score Checker</Link>.
                    </p>
                  </div>
                </div>
              </div>
            </section>

            {/* Section 8: FAQ Accordion */}
            <section className="space-y-6">
              <h2 className="text-2xl md:text-4xl font-extrabold text-zinc-100">
                Frequently Asked Questions
              </h2>
              <div className="space-y-4">
                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>How does this tool find unrounded like counts?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    While the standard YouTube interface truncates numbers into shorthand notation to save visual space on mobile devices, our system communicates directly with public data endpoints that contain the unrounded, exact numeric integer.
                  </p>
                </details>

                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>What is a healthy like-to-view ratio?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    A standard ratio on YouTube ranges between 4% and 5% (roughly 4 to 5 likes per 100 views). Anything above 7% indicates strong audience loyalty, while tutorial and highly focused community channels often reach 10% to 15%.
                  </p>
                </details>

                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>Do likes directly earn ad revenue?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    No. Google AdSense does not pay creators per like. Earnings are based on monetized ad impressions, CPM rates, and viewer location. However, higher like engagement leads to broader algorithmic promotion, generating more total views and revenue.
                  </p>
                </details>

                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>Why do like counts sometimes drop?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    YouTube continuously audits interactions to eliminate fake engagements, click bots, and duplicate votes. Minor drops occur when invalid interactions are purged to protect platform data integrity.
                  </p>
                </details>

                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>Can I check likes on YouTube Shorts?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    Yes. Paste any YouTube Shorts URL into the input field above. The tool automatically resolves the video ID and calculates the exact like count and engagement rate.
                  </p>
                </details>

                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>What does the 100-point satisfaction rating mean?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    The satisfaction score converts internal 5-star rating heuristics into an easy-to-read percentage. A score of 95/100 or higher signifies that the overwhelming majority of interacting viewers rated the video positively.
                  </p>
                </details>

                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>How does this tool compare to the Dislike Checker?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    While our <Link href="/dislike-checker" className="text-blue-400 hover:underline">Dislike Checker</Link> focuses on restoring hidden dislike statistics and dislike percentages, this tool is dedicated to detailed like counts, unrounded figures, and view-to-like engagement ratios.
                  </p>
                </details>

                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>Is this tool free to use?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    Yes, 100% free with unlimited checks. There are no registration steps, credit cards, or subscription tiers required.
                  </p>
                </details>

                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>Can I check competitors&apos; videos?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    Yes! You can analyze any public YouTube video to benchmark your competitor&apos;s engagement metrics, evaluate audience sentiment, and understand what topics resonate with viewers.
                  </p>
                </details>

                <details className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-5 cursor-pointer group">
                  <summary className="font-bold text-lg text-zinc-100 group-hover:text-blue-400 transition-colors list-none flex items-center justify-between">
                    <span>How can I check if a channel is monetized?</span>
                    <HelpCircle className="w-5 h-5 text-zinc-500 group-hover:text-blue-400 transition-colors" />
                  </summary>
                  <p className="mt-3 text-zinc-400 leading-relaxed text-sm">
                    You can quickly verify channel partnership and ad status using our free <Link href="/monetization-checker" className="text-blue-400 hover:underline">Monetization Checker</Link>.
                  </p>
                </details>
              </div>
            </section>

            {/* Section 9: Related Tools */}
            <section className="space-y-6">
              <h2 className="text-2xl md:text-4xl font-extrabold text-zinc-100">
                Related YouTube Analytics & Growth Tools
              </h2>
              <p className="text-zinc-400 leading-relaxed">
                Expand your YouTube research with our suite of free creator tools:
              </p>
              <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
                <Link
                  href="/dislike-checker"
                  className="p-5 bg-zinc-900/40 hover:bg-zinc-900 border border-zinc-800 hover:border-zinc-700 rounded-2xl transition-all group block"
                >
                  <div className="p-3 bg-zinc-950 rounded-xl border border-zinc-800 w-fit mb-3 group-hover:scale-105 transition-transform text-red-500">
                    <BarChart2 className="w-5 h-5" />
                  </div>
                  <h3 className="font-semibold text-zinc-100 group-hover:text-red-400 transition-colors mb-1">
                    Dislike Checker
                  </h3>
                  <p className="text-zinc-400 text-xs leading-relaxed">
                    Check hidden dislike metrics and view exact audience satisfaction ratios.
                  </p>
                </Link>

                <Link
                  href="/seo-score-checker"
                  className="p-5 bg-zinc-900/40 hover:bg-zinc-900 border border-zinc-800 hover:border-zinc-700 rounded-2xl transition-all group block"
                >
                  <div className="p-3 bg-zinc-950 rounded-xl border border-zinc-800 w-fit mb-3 group-hover:scale-105 transition-transform text-yellow-500">
                    <TrendingUp className="w-5 h-5" />
                  </div>
                  <h3 className="font-semibold text-zinc-100 group-hover:text-yellow-400 transition-colors mb-1">
                    SEO Score Checker
                  </h3>
                  <p className="text-zinc-400 text-xs leading-relaxed">
                    Analyze metadata health, title character counts, and tag relevance.
                  </p>
                </Link>

                <Link
                  href="/shadowban-detector"
                  className="p-5 bg-zinc-900/40 hover:bg-zinc-900 border border-zinc-800 hover:border-zinc-700 rounded-2xl transition-all group block"
                >
                  <div className="p-3 bg-zinc-950 rounded-xl border border-zinc-800 w-fit mb-3 group-hover:scale-105 transition-transform text-purple-500">
                    <Shield className="w-5 h-5" />
                  </div>
                  <h3 className="font-semibold text-zinc-100 group-hover:text-purple-400 transition-colors mb-1">
                    Shadowban Detector
                  </h3>
                  <p className="text-zinc-400 text-xs leading-relaxed">
                    Diagnose algorithmic penalties, search suppression, and comment ghosting.
                  </p>
                </Link>

                <Link
                  href="/monetization-checker"
                  className="p-5 bg-zinc-900/40 hover:bg-zinc-900 border border-zinc-800 hover:border-zinc-700 rounded-2xl transition-all group block"
                >
                  <div className="p-3 bg-zinc-950 rounded-xl border border-zinc-800 w-fit mb-3 group-hover:scale-105 transition-transform text-green-500">
                    <Award className="w-5 h-5" />
                  </div>
                  <h3 className="font-semibold text-zinc-100 group-hover:text-green-400 transition-colors mb-1">
                    Monetization Checker
                  </h3>
                  <p className="text-zinc-400 text-xs leading-relaxed">
                    Instantly check if any YouTube channel is earning revenue from AdSense.
                  </p>
                </Link>

                <Link
                  href="/tag-extractor"
                  className="p-5 bg-zinc-900/40 hover:bg-zinc-900 border border-zinc-800 hover:border-zinc-700 rounded-2xl transition-all group block"
                >
                  <div className="p-3 bg-zinc-950 rounded-xl border border-zinc-800 w-fit mb-3 group-hover:scale-105 transition-transform text-cyan-500">
                    <Zap className="w-5 h-5" />
                  </div>
                  <h3 className="font-semibold text-zinc-100 group-hover:text-cyan-400 transition-colors mb-1">
                    Tag Extractor
                  </h3>
                  <p className="text-zinc-400 text-xs leading-relaxed">
                    Extract hidden video keywords and inspect competitor SEO optimization.
                  </p>
                </Link>

                <Link
                  href="/watch-time-calculator"
                  className="p-5 bg-zinc-900/40 hover:bg-zinc-900 border border-zinc-800 hover:border-zinc-700 rounded-2xl transition-all group block"
                >
                  <div className="p-3 bg-zinc-950 rounded-xl border border-zinc-800 w-fit mb-3 group-hover:scale-105 transition-transform text-emerald-500">
                    <Activity className="w-5 h-5" />
                  </div>
                  <h3 className="font-semibold text-zinc-100 group-hover:text-emerald-400 transition-colors mb-1">
                    Watch Time Calculator
                  </h3>
                  <p className="text-zinc-400 text-xs leading-relaxed">
                    Calculate total watch hours and track your roadmap to 4,000 YPP hours.
                  </p>
                </Link>
              </div>
            </section>
          </article>
        </div>
      </div>
    </>
  );
}
