:root {
    --mint: #10b981;
    --forest: #059669;
    --light-green: #d1fae5;
    --bg-white: #ffffff;
    --bg-gray: #f8fafc;
    --text-main: #1f2937;
    --text-light: #4b5563;
    --shadow-green: 0 10px 25px -5px rgba(16, 185, 129, 0.15);
    --shadow-hover: 0 20px 35px -5px rgba(16, 185, 129, 0.25);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 30px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
  }
  a { text-decoration: none; color: inherit; }
  img { display: block; max-width: 100%; }

  /* Header */
  header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
  }
  .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .logo-box { display: flex; align-items: center; gap: 8px; }
  .logo-box img { height: 32px; width: auto; border-radius: 8px; }
  .logo-box span { font-weight: 700; font-size: 1.2rem; color: var(--forest); }
  
  .nav-pill {
    display: none;
    background: var(--bg-gray);
    padding: 6px;
    border-radius: var(--radius-sm);
  }
  .nav-pill a {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
  }
  .nav-pill a:hover { background: var(--light-green); color: var(--forest); }

  .header-right { display: flex; align-items: center; gap: 16px; }
  .search-box {
    display: none;
    align-items: center;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    padding: 6px 16px;
    transition: box-shadow 0.3s;
  }
  .search-box:focus-within { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
  .search-box input {
    border: none; background: transparent; outline: none;
    padding: 4px 8px; font-size: 0.9rem; width: 140px;
  }
  .btn-download-nav {
    background: var(--mint);
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s;
  }
  .btn-download-nav:hover { background: var(--forest); }

  /* Hero */
  .hero {
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-white) 100%);
    position: relative;
    overflow: hidden;
  }
  .hero::before {
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 300px; height: 300px; background: var(--light-green);
    border-radius: 50%; filter: blur(80px); opacity: 0.6;
  }
  .hero-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 40px; align-items: center;
  }
  .hero-text h1 {
    font-size: 2.4rem; line-height: 1.2; color: var(--text-main); margin-bottom: 16px;
  }
  .hero-text h1 span { color: var(--forest); }
  .hero-text p {
    font-size: 1.1rem; color: var(--text-light); margin-bottom: 32px; max-width: 500px;
  }
  .hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
  .btn-primary {
    background: var(--mint); color: white;
    padding: 14px 32px; border-radius: var(--radius-sm);
    font-size: 1.1rem; font-weight: 600;
    box-shadow: var(--shadow-green); transition: transform 0.2s, box-shadow 0.2s;
  }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
  .btn-outline {
    border: 2px solid var(--mint); color: var(--mint);
    padding: 12px 30px; border-radius: var(--radius-sm);
    font-size: 1.1rem; font-weight: 600; transition: background 0.2s;
  }
  .btn-outline:hover { background: var(--light-green); }

  .hero-img {
    width: 100%; max-width: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-green);
    overflow: hidden;
  }
  .hero-img img { width: 100%; height: auto; object-fit: cover; }

  /* Sections Common */
  section { padding: 60px 20px; }
  .section-inner { max-width: 1200px; margin: 0 auto; }
  .section-title { font-size: 1.8rem; text-align: center; margin-bottom: 40px; color: var(--text-main); }
  .section-title span { color: var(--forest); }

  /* Ranking */
  .ranking-list { display: flex; flex-direction: column; gap: 16px; }
  .rank-item {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-white); padding: 16px;
    border-radius: var(--radius-md); box-shadow: var(--shadow-green);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .rank-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
  .rank-num {
    font-size: 2rem; font-weight: 800; width: 40px; text-align: center;
  }
  .rank-1 .rank-num { color: #fbbf24; }
  .rank-2 .rank-num { color: #9ca3af; }
  .rank-3 .rank-num { color: #d97706; }
  .rank-img {
    width: 60px; height: 80px; border-radius: 8px; object-fit: cover;
  }
  .rank-info { flex: 1; }
  .rank-info h3 { font-size: 1.1rem; margin-bottom: 4px; }
  .rank-info p { font-size: 0.9rem; color: var(--text-light); line-height: 1.4; }
  .rank-views { font-weight: 700; color: var(--forest); font-size: 1.1rem; white-space: nowrap; }

  /* Grid Layouts */
  .card-grid { display: grid; gap: 24px; }
  .grid-3 { grid-template-columns: 1fr; }

  .card {
    background: var(--bg-white); border-radius: var(--radius-md);
    overflow: hidden; box-shadow: var(--shadow-green);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
  .card-img-wrap { position: relative; overflow: hidden; }
  .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
  .card:hover .card-img-wrap img { transform: scale(1.05); }
  
  .badge {
    position: absolute; top: 12px; right: 12px;
    background: var(--mint); color: white;
    padding: 4px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 600;
  }

  .card-content { padding: 16px; }
  .card-content h4 { font-size: 1.1rem; margin-bottom: 8px; }
  .card-content p {
    font-size: 0.9rem; color: var(--text-light);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }

  /* Movie Cards */
  .movie-card .card-img-wrap { aspect-ratio: 16 / 10; }
  
  /* Anime Cards */
  .anime-card .card-img-wrap { aspect-ratio: 3 / 4; }

  /* QA & Community */
  .qa-section { background: var(--bg-gray); }
  .qa-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
  .qa-card {
    background: var(--bg-white); padding: 24px;
    border-radius: var(--radius-md); box-shadow: var(--shadow-green);
    border-left: 6px solid var(--mint);
    transition: transform 0.2s;
  }
  .qa-card:hover { transform: translateX(5px); }
  .qa-card.tag-guide { border-left-color: var(--forest); }
  .qa-card.tag-help { border-left-color: #f59e0b; }
  .qa-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
  .qa-card p { font-size: 0.95rem; color: var(--text-light); margin-bottom: 8px; }

  /* Reviews */
  .reviews-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
  .review-card {
    background: var(--bg-white); padding: 20px; border-radius: var(--radius-md);
    box-shadow: var(--shadow-green);
  }
  .review-user { font-weight: 600; color: var(--forest); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
  .review-text { font-size: 0.95rem; color: var(--text-light); }

  /* Download Area */
  .download-area {
    background: linear-gradient(135deg, var(--mint) 0%, var(--forest) 100%);
    padding: 60px 20px; border-radius: var(--radius-lg);
    margin: 40px 20px; color: white;
    text-align: center;
  }
  .download-area h2 { font-size: 2rem; margin-bottom: 24px; }
  .download-btns { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
  .btn-white {
    background: white; color: var(--forest);
    padding: 16px 36px; border-radius: var(--radius-sm);
    font-size: 1.2rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .btn-white:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

  /* Gallery */
  .gallery-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  }
  .gallery-grid img {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 12px; box-shadow: var(--shadow-green);
    transition: transform 0.2s;
  }
  .gallery-grid img:hover { transform: scale(1.03); }

  /* Footer */
  footer {
    text-align: center; padding: 40px 20px;
    font-size: 0.85rem; color: #9ca3af;
    border-top: 1px solid #e5e7eb; margin-top: 40px;
  }
  footer p { margin-bottom: 8px; }
  footer a { color: #9ca3af; }
  footer a:hover { color: var(--mint); }

  /* Floating Widget */
  .floating-widget {
    position: fixed; bottom: 30px; right: 30px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 12px; z-index: 999;
  }
  .floating-panel {
    background: white; border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover); padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
    border: 1px solid #e5e7eb;
  }
  .floating-panel a {
    display: block; padding: 8px 16px; border-radius: var(--radius-sm);
    background: var(--light-green); color: var(--forest);
    font-weight: 600; font-size: 0.9rem; text-align: center;
    transition: background 0.2s;
  }
  .floating-panel a:hover { background: var(--mint); color: white; }
  
  .floating-ball {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--mint); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; cursor: pointer;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
    animation: bounce 2s infinite;
    position: relative;
  }
  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }
  .floating-ball .tooltip {
    position: absolute; right: 80px;
    background: #1f2937; color: white;
    padding: 6px 12px; border-radius: 8px;
    font-size: 0.85rem; white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s;
  }
  .floating-ball:hover .tooltip { opacity: 1; }

  /* Media Queries */
  @media (min-width: 768px) {
    .header-inner { padding: 16px 40px; }
    .nav-pill { display: flex; }
    .search-box { display: flex; }
    .hero-inner { flex-direction: row; justify-content: space-between; text-align: left; }
    .hero-text { flex: 1; }
    .hero-img { flex: 0 0 400px; }
    .hero-text h1 { font-size: 3rem; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .qa-grid { grid-template-columns: repeat(2, 1fr); }
    .reviews-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
    .ranking-list { flex-direction: row; }
    .rank-item { flex: 1; flex-direction: column; text-align: center; }
    .rank-num { font-size: 2.5rem; }
    .rank-info { text-align: center; }
    .rank-views { margin-top: 8px; }
  }

  @media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .reviews-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid { grid-template-columns: repeat(5, 1fr); }
  }