 :root {
      --bg: #ffffff;
      --text: #111827;
      --accent: #ef4444;
      --input-bg: #f3f4f6;
      --button-bg: #ef4444;
      --button-text: white;
    }

    body.dark {
      --bg: #0f172a;
      --text: #f1f5f9;
      --accent: #3b82f6;
      --input-bg: #1e293b;
      --button-bg: #3b82f6;
      --button-text: white;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'Segoe UI', sans-serif;
      margin: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 2rem;
      transition: all 0.4s ease-in-out;
      min-height: 100vh;
      position: relative;
      padding-bottom: 80px;
    }

    .logo {
      width: 140px;
      margin-bottom: 1rem;
      transition: transform 0.5s ease;
    }

    .logo:hover {
      transform: scale(1.05);
    }

    h1 {
      font-size: 2.5rem;
      margin-bottom: 1rem;
      text-align: center;
      color: var(--accent);
    }

    input {
      width: 100%;
      max-width: 500px;
      padding: 0.75rem;
      font-size: 1rem;
      border-radius: 0.5rem;
      border: none;
      background-color: var(--input-bg);
      color: var(--text);
      margin-bottom: 1rem;
      outline: none;
      transition: background 0.3s;
    }

    button {
      padding: 0.75rem 1.5rem;
      font-size: 1rem;
      background-color: var(--button-bg);
      color: var(--button-text);
      border: none;
      border-radius: 0.5rem;
      cursor: pointer;
      margin-bottom: 1.5rem;
      transition: background 0.3s;
    }

    button:hover {
      filter: brightness(1.1);
    }

    .thumbnail {
      max-width: 100%;
      border-radius: 1rem;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
      margin-bottom: 1rem;
      animation: fadeIn 1s ease-in-out;
    }

    .download-link {
      font-size: 1rem;
      background-color: var(--accent);
      color: white;
      padding: 0.5rem 1rem;
      border-radius: 0.5rem;
      text-decoration: none;
      display: inline-block;
      margin: 0.5rem;
      cursor: pointer;
    }

    .download-link:hover {
      filter: brightness(1.1);
    }

    .quality-info {
      color: var(--accent);
      font-size: 0.95rem;
      margin-bottom: 1rem;
    }

    .theme-toggle {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: transparent;
      border: 2px solid var(--accent);
      color: var(--accent);
      padding: 0.4rem 1rem;
      border-radius: 2rem;
      cursor: pointer;
      font-weight: bold;
    }

    .join-telegram {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-top: 1rem;
      text-decoration: none;
      background-color: var(--accent);
      color: white;
      padding: 0.6rem 1.2rem;
      border-radius: 2rem;
      font-weight: 600;
      transition: background 0.3s ease;
    }

    .join-telegram:hover {
      filter: brightness(1.1);
    }

    .join-telegram img {
      width: 20px;
      height: 20px;
    }

    #popup {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--input-bg);
      color: var(--text);
      padding: 2rem;
      border-radius: 1rem;
      box-shadow: 0 10px 30px rgba(0,0,0,0.4);
      z-index: 9999;
      text-align: center;
      display: none;
      max-width: 90%;
    }

    .feature-cards {
      display: flex;
      flex-wrap: wrap;
      gap: 2rem;
      justify-content: center;
      margin-top: 2rem;
    }

    .feature-card {
      background-color: var(--input-bg);
      color: var(--text);
      border-radius: 1rem;
      padding: 1.5rem;
      box-shadow: 0 10px 25px rgba(0,0,0,0.1);
      max-width: 300px;
      text-align: center;
      transition: transform 0.3s ease;
    }

    .feature-card:hover {
      transform: translateY(-5px);
    }

    .feature-card img {
      width: 50px;
      height: 50px;
      margin-bottom: 1rem;
      animation: floatIcon 2.5s ease-in-out infinite;
    }

    .loading-spinner {
      border: 4px solid rgba(0, 0, 0, 0.1);
      border-radius: 50%;
      border-top: 4px solid var(--accent);
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
      margin: 1rem auto;
    }

    .button-group {
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
    }

    .developer-credit {
      margin-top: 3rem;
      text-align: center;
      font-size: 1.1rem;
    }

    .developer-credit strong {
      font-weight: bold;
    }

    .developer-credit em {
      font-style: italic;
      font-weight: bold;
    }

    .ak-coder-logo {
      position: fixed;
      bottom: 20px;
      right: 20px;
      width: 60px;
      height: 60px;
      background: var(--accent);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: bold;
      font-size: 14px;
      box-shadow: 0 4px 15px rgba(0,0,0,0.2);
      transition: all 0.3s ease;
      text-decoration: none;
    }

    .ak-coder-logo:hover {
      transform: scale(1.1);
      box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }

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

    @keyframes floatIcon {
      0% { transform: translateY(0); }
      50% { transform: translateY(-8px); }
      100% { transform: translateY(0); }
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
