:root {
      --body-bg-start: #0f172a;
      --body-bg-end: #1e293b;
      --header-bg-start: #0f172a;
      --header-bg-end: #1e3a8a;
      --accent-color: #3b82f6;
      --container-bg: rgba(255, 255, 255, 0.96);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: Arial, Helvetica, sans-serif;
    }

    body {
      min-height: 100vh;
      background: linear-gradient(135deg, var(--body-bg-start) 0%, var(--body-bg-end) 100%);
      color: #e5eefc;
      padding: 18px;
    }

    .container {
      max-width: 950px;
      margin: 24px auto;
      background: var(--container-bg);
      border-radius: 24px;
      overflow: hidden;
      box-shadow: 0 18px 45px rgba(47, 95, 167, 0.18);
      border: 1px solid rgba(96, 165, 250, 0.20);
    }

    .header {
      text-align: center;
      padding: 42px 24px 38px;
      background:
        radial-gradient(circle at top left, rgba(255,255,255,0.28), transparent 35%),
        linear-gradient(135deg, var(--header-bg-start), var(--header-bg-end));
      color: white;
    }

    .logo-wrap {
      width: 156px;
      height: 156px;
      margin: 0 auto 20px;
      background: rgba(255,255,255,0.9);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 10px 28px rgba(0,0,0,0.18);
      padding: 10px;
    }

    .header img {
      width: 136px;
      height: 136px;
      object-fit: contain;
      border-radius: 50%;
    }

    .header h1 {
      font-size: clamp(30px, 5vw, 46px);
      margin-bottom: 12px;
      letter-spacing: 0.2px;
    }

    .header p {
      font-size: clamp(18px, 3vw, 25px);
      color: #eef6ff;
      font-weight: 600;
    }

    .form-title {
      text-align: center;
      padding: 28px 20px;
      background: linear-gradient(180deg, #f3f8ff, #ffffff);
      border-bottom: 1px solid #cfe0ff;
    }

    .form-title h2 {
      font-size: clamp(28px, 4.5vw, 40px);
      color: var(--header-bg-end);
      line-height: 1.35;
    }

    form {
      padding: 32px;
    }

    .form-group {
      margin-bottom: 24px;
    }

    label {
      display: block;
      margin-bottom: 10px;
      font-size: 18px;
      font-weight: 700;
      color: #203956;
    }

    .hint {
      display: block;
      margin-top: 7px;
      font-size: 14px;
      color: #607896;
      font-weight: normal;
      line-height: 1.5;
    }

    .row {
      display: flex;
      gap: 20px;
    }

    .col {
      flex: 1;
    }

    input,
    select,
    textarea {
      width: 100%;
      padding: 15px 16px;
      border: 1.5px solid #b9c9f0;
      border-radius: 14px;
      font-size: 16px;
      background: #fbfdff;
      color: #22384f;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--accent-color);
      background: white;
      box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
    }

    select {
      cursor: pointer;
    }

    textarea {
      resize: vertical;
      min-height: 120px;
    }

    .date-row {
      display: grid;
      grid-template-columns: 1fr 1fr 1.2fr;
      gap: 14px;
    }

    .games-box {
      padding: 18px;
      background: #e8eefc;
      border: 1px solid #c7d7ff;
      border-radius: 16px;
      font-size: 18px;
      line-height: 2;
      min-height: 58px;
    }

    .games-box label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin: 6px 18px 6px 0;
      padding: 8px 12px;
      background: white;
      border-radius: 999px;
      border: 1px solid #d5e5ff;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
    }

    .games-box input {
      width: auto;
    }

    .agreement-box {
      padding: 18px;
      background: #f7fbff;
      border: 1px solid #d5e5ff;
      border-radius: 16px;
    }

    .agreement-box label {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      font-size: 16px;
      line-height: 1.8;
      font-weight: 500;
      margin: 0;
    }

    .agreement-box input {
      width: auto;
      margin-top: 8px;
      transform: scale(1.2);
    }

    .submit-btn {
      width: 100%;
      background: linear-gradient(135deg, var(--header-bg-start), var(--header-bg-end));
      color: white;
      padding: 17px;
      border: none;
      border-radius: 16px;
      font-size: 21px;
      font-weight: bold;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
      box-shadow: 0 12px 24px rgba(47, 95, 167, 0.25);
    }

    .submit-btn:hover {
      background: linear-gradient(135deg, var(--body-bg-start), var(--accent-color));
      transform: translateY(-1px);
      box-shadow: 0 16px 28px rgba(47, 95, 167, 0.3);
    }

    @media (max-width: 768px) {
      body {
        padding: 10px;
      }

      .container {
        margin: 10px auto;
        border-radius: 18px;
      }

      form {
        padding: 22px;
      }

      .row,
      .date-row {
        display: flex;
        flex-direction: column;
        gap: 14px;
      }

      .logo-wrap {
        width: 132px;
        height: 132px;
      }

      .header img {
        width: 114px;
        height: 114px;
      }
    }

    /* Admin Panel Floating Button */
    .admin-fab {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: linear-gradient(135deg, #2563eb, #1d4ed8);
      color: white;
      border: none;
      border-radius: 9999px;
      padding: 12px 20px;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
      display: flex;
      align-items: center;
      gap: 8px;
      z-index: 1000;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .admin-fab:hover {
      transform: translateY(-2px) scale(1.05);
      box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5);
    }
    
    /* Admin Modal Overlay */
    .admin-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(8px);
      z-index: 2000;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }
    .admin-modal.open {
      opacity: 1;
      pointer-events: auto;
    }
    
    .admin-content {
      background: #1e293b;
      color: #f1f5f9;
      width: 90%;
      max-width: 800px;
      height: 85vh;
      border-radius: 24px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transform: scale(0.95);
      transition: transform 0.3s ease;
    }
    .admin-modal.open .admin-content {
      transform: scale(1);
    }
    
    .admin-header {
      padding: 20px 24px;
      background: #0f172a;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .admin-header h3 {
      font-size: 20px;
      font-weight: bold;
      color: #3b82f6;
    }
    .admin-close {
      background: none;
      border: none;
      color: #94a3b8;
      font-size: 24px;
      cursor: pointer;
      transition: color 0.2s;
    }
    .admin-close:hover {
      color: #f1f5f9;
    }
    
    /* Tabs Navigation */
    .admin-tabs {
      display: flex;
      background: #0f172a;
      padding: 0 16px;
      gap: 8px;
      overflow-x: auto;
    }
    .admin-tab {
      background: none;
      border: none;
      color: #94a3b8;
      padding: 14px 16px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      position: relative;
      transition: color 0.2s;
    }
    .admin-tab:hover {
      color: #f1f5f9;
    }
    .admin-tab.active {
      color: #3b82f6;
    }
    .admin-tab.active::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 3px;
      background: #3b82f6;
      border-radius: 9999px;
    }
    
    /* Panel Body Content */
    .admin-body {
      flex: 1;
      padding: 24px;
      overflow-y: auto;
      background: #1e293b;
    }
    .admin-panel-section {
      display: none;
    }
    .admin-panel-section.active {
      display: block;
      animation: fadeIn 0.2s ease-in-out;
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    /* Passcode Prompt Screen */
    .passcode-screen {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100%;
      gap: 16px;
      text-align: center;
      padding: 24px;
    }
    .passcode-input-wrap {
      display: flex;
      gap: 10px;
      max-width: 320px;
      width: 100%;
    }
    .passcode-input-wrap input {
      background: #0f172a;
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: white;
      text-align: center;
      font-size: 20px;
      letter-spacing: 4px;
      border-radius: 8px;
    }
    
    /* Form Input Fields in Admin Panel */
    .admin-field {
      margin-bottom: 20px;
    }
    .admin-field label {
      color: #cbd5e1;
      font-size: 14px;
      margin-bottom: 8px;
      font-weight: 600;
      display: block;
    }
    .admin-field input[type="text"],
    .admin-field input[type="password"],
    .admin-field input[type="url"],
    .admin-field select,
    .admin-field textarea {
      background: #0f172a;
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #f1f5f9;
      padding: 12px 14px;
      font-size: 15px;
      border-radius: 8px;
      width: 100%;
    }
    .admin-field input:focus,
    .admin-field select:focus,
    .admin-field textarea:focus {
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }
    
    /* Color Picker Grid */
    .color-picker-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 16px;
    }
    .color-picker-item {
      background: #0f172a;
      padding: 16px;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.05);
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .color-picker-input-wrap {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .color-picker-input-wrap input[type="color"] {
      width: 44px;
      height: 44px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      background: none;
      padding: 0;
    }
    .color-picker-input-wrap input[type="text"] {
      padding: 8px 10px;
      font-size: 14px;
      text-transform: uppercase;
    }
    
    /* Dynamic Categories List Manager */
    .cat-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
      max-height: 45vh;
      overflow-y: auto;
      padding-right: 4px;
    }
    .cat-item {
      background: #0f172a;
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 12px;
      padding: 16px;
      transition: border-color 0.2s;
    }
    .cat-item:hover {
      border-color: rgba(59, 130, 246, 0.3);
    }
    .cat-header-inputs {
      display: grid;
      grid-template-columns: 2.2fr 1.3fr 1.3fr auto;
      gap: 12px;
      align-items: center;
      margin-bottom: 12px;
    }
    .cat-header-inputs input {
      background: #1e293b;
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: white;
      padding: 8px 10px;
      font-size: 14px;
      border-radius: 6px;
      width: 100%;
    }
    .cat-games-title {
      font-size: 13px;
      font-weight: 600;
      color: #94a3b8;
      margin-bottom: 8px;
    }
    .cat-games-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 12px;
    }
    .cat-game-tag {
      background: #1e293b;
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #cbd5e1;
      padding: 4px 10px;
      border-radius: 9999px;
      font-size: 13px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .cat-game-tag button {
      background: none;
      border: none;
      color: #94a3b8;
      cursor: pointer;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }
    .cat-game-tag button:hover {
      color: #ef4444;
    }
    .cat-game-add-wrap {
      display: flex;
      gap: 8px;
      max-width: 320px;
    }
    .cat-game-add-wrap input {
      background: #1e293b;
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: white;
      padding: 6px 10px;
      font-size: 13px;
      border-radius: 6px;
      width: 100%;
    }
    
    /* Admin Footer Controls */
    .admin-footer {
      padding: 16px 24px;
      background: #0f172a;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      display: flex;
      justify-content: flex-end;
      gap: 12px;
    }
    .admin-btn {
      padding: 10px 18px;
      font-size: 14px;
      font-weight: 600;
      border-radius: 8px;
      cursor: pointer;
      border: none;
      transition: all 0.2s;
    }
    .admin-btn-primary {
      background: #2563eb;
      color: white;
    }
    .admin-btn-primary:hover {
      background: #1d4ed8;
    }
    .admin-btn-secondary {
      background: #334155;
      color: #cbd5e1;
    }
    .admin-btn-secondary:hover {
      background: #475569;
      color: white;
    }
    .admin-btn-danger {
      background: #dc2626;
      color: white;
    }
    .admin-btn-danger:hover {
      background: #b91c1c;
    }
    .admin-btn-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 6px;
      background: #334155;
      color: #94a3b8;
      cursor: pointer;
      border: none;
    }
    .admin-btn-icon:hover {
      background: #ef4444;
      color: white;
    }
    
    /* Logo Upload and Preview Section */
    .logo-upload-wrap {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-top: 6px;
      background: #0f172a;
      padding: 12px;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .logo-preview-box {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: white;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      padding: 4px;
    }
    .logo-preview-box img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }
    .logo-upload-btn {
      background: #334155;
      color: #cbd5e1;
      padding: 8px 14px;
      border-radius: 6px;
      font-size: 13px;
      cursor: pointer;
      border: 1px solid rgba(255, 255, 255, 0.1);
      transition: background 0.2s;
    }
    .logo-upload-btn:hover {
      background: #475569;
      color: white;
    }
    
    /* Export and Code view textarea */
    .code-textarea {
      font-family: 'Courier New', Courier, monospace;
      font-size: 13px;
      line-height: 1.5;
      height: 200px;
      background: #0f172a !important;
      color: #38bdf8 !important;
      border: 1px solid rgba(255, 255, 255, 0.1);
      width: 100%;
      padding: 12px;
      border-radius: 8px;
      resize: vertical;
    }