    * { margin: 0; padding: 0; }
    html, body { width: 100%; height: 100%; overflow: hidden; background: #09090b; }
    canvas { display: block; width: 100vw; height: 100vh; }

    /* ---- Auth Screen ---- */
    #login {
      position: fixed; inset: 0; z-index: 10;
      display: flex; align-items: center; justify-content: center;
      background: #09090b;
    }
    #login.hidden { display: none; }

    .login-card {
      background: #18181b;
      border: 1px solid #27272a;
      border-radius: 12px;
      padding: 32px;
      width: 320px;
      text-align: center;
      font-family: system-ui, -apple-system, sans-serif;
    }
    .login-card h1 {
      color: #a78bfa;
      font-size: 24px;
      font-weight: 700;
      margin-bottom: 4px;
      letter-spacing: 2px;
    }
    .logo { width: 200px; height: auto; margin-bottom: 6px; }
    .logo-sm { width: 100px; height: auto; }
    .login-card .subtitle {
      color: #71717a;
      font-size: 13px;
      margin-bottom: 20px;
    }
    .login-card input {
      width: 100%;
      box-sizing: border-box;
      padding: 10px 14px;
      background: #09090b;
      border: 1px solid #27272a;
      border-radius: 8px;
      color: #fafafa;
      font-size: 15px;
      outline: none;
      transition: border-color 0.15s;
      margin-bottom: 10px;
    }
    .login-card input:focus { border-color: #a78bfa; }
    .login-card input::placeholder { color: #3f3f46; }
    .login-card button {
      width: 100%;
      margin-top: 4px;
      padding: 10px;
      background: #a78bfa;
      color: #09090b;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s;
    }
    .login-card button:hover { background: #8b5cf6; }
    .login-card button:disabled { background: #3f3f46; cursor: not-allowed; }

    .auth-tabs {
      display: flex; gap: 0; margin-bottom: 20px;
      border-radius: 8px; overflow: hidden;
      border: 1px solid #27272a;
    }
    .auth-tabs button {
      flex: 1; padding: 8px; margin: 0;
      background: #09090b; color: #71717a;
      border: none; border-radius: 0;
      font-size: 13px; font-weight: 500;
      cursor: pointer; transition: all 0.15s;
    }
    .auth-tabs button.active {
      background: #27272a; color: #fafafa;
    }
    .auth-tabs button:hover:not(.active) { color: #a1a1aa; }

    #auth-error {
      color: #ef4444; font-size: 13px;
      margin-top: 10px; min-height: 18px;
    }

    /* ---- Hub Screen ---- */
    #hub {
      position: fixed; inset: 0; z-index: 10;
      display: flex; align-items: center; justify-content: center;
      background: #09090b;
      font-family: system-ui, -apple-system, sans-serif;
    }
    #hub.hidden { display: none; }

    .hub-container {
      background: #18181b;
      border: 1px solid #27272a;
      border-radius: 12px;
      padding: 28px;
      width: 680px;
      max-height: 80vh;
      display: flex;
      flex-direction: column;
      position: relative;
    }

    .hub-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }
    .hub-header h1 {
      color: #a78bfa;
      font-size: 22px;
      font-weight: 700;
      letter-spacing: 2px;
    }
    .hub-header .welcome {
      color: #71717a;
      font-size: 14px;
    }
    .hub-header .welcome strong { color: #fafafa; }

    .hub-body {
      display: flex;
      gap: 20px;
      flex: 1;
      min-height: 0;
      overflow: auto;
    }

    /* Worlds list */
    .hub-worlds {
      flex: 1;
      min-height: 0;
    }
    .hub-worlds h2 {
      color: #a1a1aa;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 10px;
    }
    .hub-world-list {
      overflow-y: auto;
      max-height: 340px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .world-card {
      background: #0c0c0f;
      border: 1px solid #27272a;
      border-radius: 8px;
      padding: 12px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: border-color 0.15s;
    }
    .world-card:hover { border-color: #3f3f46; }
    .world-card .world-info { flex: 1; }
    .world-card .world-name {
      color: #fafafa;
      font-size: 14px;
      font-weight: 600;
    }
    .world-card .world-meta {
      color: #71717a;
      font-size: 12px;
      margin-top: 2px;
    }
    .world-card .world-meta .online {
      color: #22c55e;
    }
    .world-card .play-btn {
      width: auto;
      padding: 6px 16px;
      margin: 0;
      font-size: 13px;
      border-radius: 6px;
    }
    .world-empty {
      color: #3f3f46;
      font-size: 13px;
      text-align: center;
      padding: 20px;
    }

    /* Profile panel */
    .hub-profile {
      width: 200px;
      flex-shrink: 0;
    }
    .hub-profile h2 {
      color: #a1a1aa;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 10px;
    }
    .profile-section {
      margin-bottom: 16px;
    }
    .profile-section label {
      display: block;
      color: #71717a;
      font-size: 11px;
      margin-bottom: 6px;
      text-transform: uppercase;
    }

    .skin-selector {
      display: flex; gap: 6px;
    }
    .skin-option {
      flex: 1;
      padding: 8px 4px;
      background: #09090b;
      border: 2px solid #27272a;
      border-radius: 6px;
      color: #a1a1aa;
      font-size: 11px;
      text-align: center;
      cursor: pointer;
      transition: all 0.15s;
    }
    .skin-option.active {
      border-color: #a78bfa;
      color: #fafafa;
    }

    .color-selector {
      display: flex; gap: 6px;
    }
    .color-swatch {
      width: 28px; height: 28px;
      border-radius: 6px;
      border: 2px solid transparent;
      cursor: pointer;
      transition: all 0.15s;
    }
    .color-swatch.active {
      border-color: #fafafa;
      box-shadow: 0 0 0 1px #27272a;
    }

    .profile-stats {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
    }
    .stat-item {
      background: #09090b;
      border-radius: 6px;
      padding: 8px;
      text-align: center;
    }
    .stat-item .stat-val {
      color: #fafafa;
      font-size: 16px;
      font-weight: 700;
    }
    .stat-item .stat-label {
      color: #71717a;
      font-size: 10px;
      text-transform: uppercase;
    }

    /* Hub tabs */
    .hub-tabs {
      display: flex;
      gap: 0;
      margin-bottom: 16px;
      border-bottom: 1px solid #27272a;
    }
    .hub-tab {
      flex: 1;
      padding: 10px 0;
      background: none;
      border: none;
      border-bottom: 2px solid transparent;
      color: #71717a;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s;
      text-align: center;
      margin: 0;
      width: auto;
    }
    .hub-tab:hover { color: #a1a1aa; }
    .hub-tab.active {
      color: #a78bfa;
      border-bottom-color: #a78bfa;
    }
    .hub-tab-content { display: none; }
    .hub-tab-content.active { display: flex; gap: 20px; flex: 1; min-height: 0; }

    /* Achievements grid */
    .achievements-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      overflow-y: auto;
      max-height: 340px;
      flex: 1;
    }
    .achievement-card {
      background: #0c0c0f;
      border: 1px solid #27272a;
      border-radius: 8px;
      padding: 10px 12px;
      transition: border-color 0.15s;
    }
    .achievement-card.unlocked {
      border-color: #facc1544;
    }
    .achievement-card .ach-icon {
      font-size: 18px;
      margin-right: 6px;
    }
    .achievement-card .ach-name {
      color: #3f3f46;
      font-size: 13px;
      font-weight: 600;
    }
    .achievement-card.unlocked .ach-name {
      color: #facc15;
    }
    .achievement-card .ach-desc {
      color: #52525b;
      font-size: 11px;
      margin-top: 2px;
    }
    .achievement-card.unlocked .ach-desc {
      color: #71717a;
    }
    .achievement-card .ach-date {
      color: #52525b;
      font-size: 10px;
      margin-top: 4px;
    }
    .ach-category-header {
      grid-column: 1 / -1;
      color: #71717a;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 1px;
      padding-top: 8px;
    }

    /* Community worlds */
    .community-grid {
      display: flex;
      flex-direction: column;
      gap: 8px;
      overflow-y: auto;
      max-height: 340px;
      flex: 1;
    }
    .community-controls {
      display: flex;
      gap: 8px;
      margin-bottom: 10px;
    }
    .community-search {
      flex: 1;
      padding: 6px 10px;
      background: #09090b;
      border: 1px solid #27272a;
      border-radius: 6px;
      color: #fafafa;
      font-size: 13px;
      outline: none;
    }
    .community-search:focus { border-color: #a78bfa; }
    .community-sort {
      padding: 6px 10px;
      background: #09090b;
      border: 1px solid #27272a;
      border-radius: 6px;
      color: #a1a1aa;
      font-size: 12px;
      outline: none;
      cursor: pointer;
      width: auto;
      margin: 0;
    }
    .community-card {
      background: #0c0c0f;
      border: 1px solid #27272a;
      border-radius: 8px;
      padding: 12px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: border-color 0.15s;
    }
    .community-card:hover { border-color: #3f3f46; }
    .community-card .comm-info { flex: 1; }
    .community-card .comm-name {
      color: #fafafa;
      font-size: 14px;
      font-weight: 600;
    }
    .community-card .comm-author {
      color: #71717a;
      font-size: 11px;
    }
    .community-card .comm-meta {
      color: #52525b;
      font-size: 11px;
      margin-top: 2px;
    }
    .community-card .comm-rating {
      color: #facc15;
      font-size: 13px;
      font-weight: 600;
      margin-left: 12px;
    }
    .community-card .comm-plays {
      color: #71717a;
      font-size: 11px;
    }
    .community-card .comm-play-btn {
      width: auto;
      padding: 6px 16px;
      margin: 0 0 0 12px;
      font-size: 13px;
      border-radius: 6px;
    }

    /* Hub actions */
    .hub-actions {
      display: flex;
      gap: 10px;
      margin-top: 16px;
      border-top: 1px solid #27272a;
      padding-top: 16px;
    }
    .hub-actions button {
      flex: 1;
      padding: 10px;
      background: #27272a;
      color: #fafafa;
      border: 1px solid #3f3f46;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s;
      margin: 0;
    }
    .hub-actions button:hover {
      background: #3f3f46;
    }

    .logout-btn {
      background: none !important;
      border: none !important;
      color: #71717a !important;
      font-size: 12px !important;
      padding: 4px 8px !important;
      cursor: pointer;
      flex: 0 !important;
      white-space: nowrap;
    }
    .logout-btn:hover { color: #ef4444 !important; }

    /* Preview */
    .preview-container {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 12px;
    }
    .preview-container canvas {
      border-radius: 8px;
      background: #09090b;
    }

    /* DisplayName input */
    .profile-name-input {
      width: 100%;
      box-sizing: border-box;
      padding: 6px 10px;
      background: #09090b;
      border: 1px solid #27272a;
      border-radius: 6px;
      color: #fafafa;
      font-size: 13px;
      outline: none;
      transition: border-color 0.15s;
    }
    .profile-name-input:focus { border-color: #a78bfa; }

    /* Coins balance */
    .coins-balance {
      color: #facc15;
      font-weight: 700;
      font-size: 14px;
      margin-bottom: 12px;
      text-align: center;
    }

    /* Locked cosmetics */
    .skin-option.locked {
      opacity: 0.5;
      border-style: dashed;
      position: relative;
    }
    .color-swatch.locked {
      opacity: 0.4;
      position: relative;
    }
    .price-badge {
      display: inline-block;
      background: #facc15;
      color: #09090b;
      font-size: 9px;
      font-weight: 700;
      padding: 1px 4px;
      border-radius: 4px;
      margin-left: 4px;
      vertical-align: middle;
    }
    .color-swatch .price-badge {
      position: absolute;
      bottom: -4px;
      right: -4px;
      margin: 0;
      font-size: 8px;
      padding: 0 3px;
      line-height: 14px;
    }

    /* Admin modal */
    .modal-overlay {
      position: fixed; inset: 0; z-index: 100;
      background: rgba(0,0,0,0.6);
      display: flex; align-items: center; justify-content: center;
      font-family: system-ui, -apple-system, sans-serif;
    }
    .admin-modal-overlay {
      position: fixed; inset: 0; z-index: 100;
      background: rgba(0,0,0,0.6);
      display: flex; align-items: center; justify-content: center;
      font-family: system-ui, -apple-system, sans-serif;
    }
    .admin-modal {
      background: #18181b;
      border: 1px solid #27272a;
      border-radius: 12px;
      padding: 24px;
      width: 420px;
      max-height: 70vh;
      display: flex;
      flex-direction: column;
    }
    .admin-modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
    }
    .admin-modal-header h3 {
      color: #fafafa;
      font-size: 16px;
      font-weight: 600;
    }
    .admin-close-btn {
      background: none; border: none;
      color: #71717a; font-size: 18px;
      cursor: pointer; padding: 4px 8px;
    }
    .admin-close-btn:hover { color: #fafafa; }
    .admin-user-list {
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .admin-user-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #0c0c0f;
      border: 1px solid #27272a;
      border-radius: 8px;
      padding: 10px 14px;
    }
    .admin-user-info {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .admin-user-name {
      color: #fafafa;
      font-size: 14px;
      font-weight: 500;
    }
    .role-badge {
      font-size: 10px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .role-badge.role-admin { background: #a78bfa22; color: #a78bfa; }
    .role-badge.role-mod { background: #facc1522; color: #facc15; }
    .role-badge.role-player { background: #71717a22; color: #71717a; }
    .role-toggle-btn {
      padding: 5px 12px;
      background: #27272a;
      color: #fafafa;
      border: 1px solid #3f3f46;
      border-radius: 6px;
      font-size: 12px;
      cursor: pointer;
      transition: all 0.15s;
      margin: 0;
      width: auto;
    }
    .role-toggle-btn:hover { background: #3f3f46; }

    /* World status badges */
    .world-status-badge {
      font-size: 10px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .world-status-badge.status-draft { background: #71717a22; color: #71717a; }
    .world-status-badge.status-submitted { background: #facc1522; color: #facc15; }
    .world-status-badge.status-approved { background: #22c55e22; color: #22c55e; }
    .world-status-badge.status-rejected { background: #ef444422; color: #ef4444; }

    /* My worlds grid */
    .my-worlds-grid {
      display: flex;
      flex-direction: column;
      gap: 8px;
      overflow-y: auto;
      max-height: 300px;
    }
    .my-world-card {
      background: #0c0c0f;
      border: 1px solid #27272a;
      border-radius: 8px;
      padding: 12px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: border-color 0.15s;
    }
    .my-world-card:hover { border-color: #3f3f46; }
    .my-world-card .world-name {
      color: #fafafa;
      font-size: 14px;
      font-weight: 600;
    }
    .my-world-card .world-meta {
      color: #71717a;
      font-size: 12px;
      margin-top: 2px;
    }
    .my-world-actions {
      display: flex;
      gap: 6px;
      align-items: center;
    }
    .my-world-actions button {
      width: auto;
      padding: 4px 12px;
      margin: 0;
      font-size: 11px;
      border-radius: 4px;
    }
    .btn-submit { background: #facc15; color: #09090b; }
    .btn-submit:hover { background: #eab308; }
    .btn-edit { background: #3f3f46; color: #fafafa; }
    .btn-edit:hover { background: #52525b; }
    .btn-delete { background: #27272a; color: #ef4444; border: 1px solid #ef444444; }
    .btn-delete:hover { background: #ef444433; }
    .btn-approve { background: #22c55e; color: #09090b; }
    .btn-approve:hover { background: #16a34a; }
    .btn-reject { background: #27272a; color: #ef4444; border: 1px solid #ef444444; }
    .btn-reject:hover { background: #ef444433; }

    .my-worlds-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }
    .my-worlds-header h2 {
      color: #a1a1aa;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin: 0;
    }
    .create-world-btn {
      width: auto !important;
      padding: 6px 14px !important;
      margin: 0 !important;
      font-size: 12px !important;
      background: #a78bfa !important;
      color: #09090b !important;
      border: none !important;
      border-radius: 6px !important;
    }
    .create-world-btn:hover { background: #8b5cf6 !important; }
    .pending-section { margin-top: 16px; border-top: 1px solid #27272a; padding-top: 12px; }
    .version-tag { color: #52525b; font-size: 11px; font-family: monospace; margin: 0; }
    .version-tag:hover { color: #a1a1aa; }
    .lang-btn {
      background: none !important; border: 1px solid #3f3f46 !important;
      color: #a1a1aa !important; font-size: 11px !important; font-weight: 600 !important;
      padding: 2px 8px !important; border-radius: 4px !important;
      cursor: pointer; flex: 0 !important; white-space: nowrap;
      font-family: monospace;
    }
    .lang-btn:hover { border-color: #a78bfa !important; color: #fafafa !important; }
    .report-hub-btn {
      background: none !important; border: 1px solid #3f3f46 !important;
      color: #a1a1aa !important; font-size: 11px !important; font-weight: 500 !important;
      padding: 4px 10px !important; border-radius: 4px !important;
      cursor: pointer; flex: 0 !important; white-space: nowrap;
    }
    .report-hub-btn:hover { border-color: #ef4444 !important; color: #ef4444 !important; }

    /* Changelog modal */
    .changelog-modal { width: 520px; max-height: 75vh; }
    .changelog-content {
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 20px;
      padding-right: 4px;
    }
    .changelog-version-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
    }
    .changelog-version-tag {
      background: #a78bfa22;
      color: #a78bfa;
      font-size: 13px;
      font-weight: 700;
      padding: 2px 10px;
      border-radius: 4px;
      font-family: monospace;
    }
    .changelog-version-date {
      color: #52525b;
      font-size: 12px;
      font-family: monospace;
    }
    .changelog-section { margin-bottom: 6px; }
    .changelog-section-title {
      color: #d4d4d8;
      font-size: 12px;
      font-weight: 600;
      margin-bottom: 4px;
    }
    .changelog-content ul {
      margin: 0;
      padding-left: 18px;
      list-style: none;
    }
    .changelog-content li {
      color: #a1a1aa;
      font-size: 12px;
      line-height: 1.6;
      position: relative;
      padding-left: 4px;
    }
    .changelog-content li::before {
      content: '—';
      position: absolute;
      left: -16px;
      color: #3f3f46;
    }

    /* World Complete overlay */
    .world-complete-overlay {
      position: fixed; inset: 0; z-index: 100;
      background: rgba(0,0,0,0.75);
      display: flex; align-items: center; justify-content: center;
      font-family: system-ui, -apple-system, sans-serif;
      animation: wc-fade-in 0.4s ease-out;
    }
    @keyframes wc-fade-in { from { opacity: 0; } to { opacity: 1; } }
    @keyframes wc-slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes wc-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
    .wc-modal {
      background: #18181b;
      border: 1px solid #27272a;
      border-radius: 16px;
      padding: 32px 40px;
      width: 380px;
      text-align: center;
      animation: wc-slide-up 0.5s ease-out 0.1s both;
    }
    .wc-title {
      color: #a78bfa;
      font-size: 28px;
      font-weight: 800;
      letter-spacing: 1px;
      margin-bottom: 4px;
    }
    .wc-world-name {
      color: #a1a1aa;
      font-size: 14px;
      margin-bottom: 16px;
    }
    .wc-new-best {
      color: #facc15;
      font-size: 18px;
      font-weight: 800;
      letter-spacing: 2px;
      margin-bottom: 14px;
      animation: wc-pulse 1s ease-in-out infinite;
    }
    .wc-best-section {
      background: #0c0c0f;
      border: 1px solid #27272a;
      border-radius: 8px;
      padding: 10px 14px;
      margin-bottom: 14px;
    }
    .wc-best-title {
      color: #71717a;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 6px;
    }
    .wc-best-stats {
      display: flex;
      justify-content: center;
      gap: 16px;
      color: #a1a1aa;
      font-size: 13px;
    }
    .wc-stats-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 20px;
    }
    .wc-stat {
      background: #0c0c0f;
      border: 1px solid #27272a;
      border-radius: 10px;
      padding: 14px 10px;
    }
    .wc-stat-value {
      color: #fafafa;
      font-size: 22px;
      font-weight: 700;
    }
    .wc-stat-label {
      color: #71717a;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-top: 2px;
    }
    .wc-return-btn {
      width: 100%;
      padding: 12px;
      background: #a78bfa;
      color: #09090b;
      border: none;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s;
    }
    .wc-return-btn:hover { background: #8b5cf6; }

    /* Mode toggle (create world) */
    .cw-mode-row { display: flex; gap: 16px; }
    .cw-mode-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; color: #a1a1aa; font-size: 13px; }
    .mode-badge {
      font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
      background: #a78bfa22; color: #a78bfa; text-transform: uppercase; letter-spacing: 0.5px;
      vertical-align: middle; margin-left: 4px;
    }

    /* Report modal */
    .report-modal { width: 440px; }
    .report-form { display: flex; flex-direction: column; gap: 12px; }
    .report-form > label { color: #a1a1aa; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
    .report-form select,
    .report-form textarea {
      width: 100%; box-sizing: border-box; padding: 8px 12px;
      background: #09090b; border: 1px solid #27272a; border-radius: 6px;
      color: #fafafa; font-size: 13px; font-family: inherit; outline: none;
      resize: vertical;
    }
    .report-form select:focus,
    .report-form textarea:focus { border-color: #a78bfa; }
    .report-screenshot-preview {
      max-width: 100%; border-radius: 6px; border: 1px solid #27272a; margin-top: 6px;
    }
    .report-screenshot-section label {
      display: flex; align-items: center; gap: 6px; cursor: pointer;
      color: #a1a1aa; font-size: 12px;
    }
    .report-actions { display: flex; gap: 8px; justify-content: flex-end; }
    .report-cancel-btn {
      padding: 8px 16px; background: #27272a; color: #fafafa;
      border: 1px solid #3f3f46; border-radius: 6px; font-size: 13px; cursor: pointer;
      margin: 0; width: auto;
    }
    .report-cancel-btn:hover { background: #3f3f46; }
    .report-submit-btn {
      padding: 8px 16px; background: #a78bfa; color: #09090b;
      border: none; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer;
      margin: 0; width: auto;
    }
    .report-submit-btn:hover { background: #8b5cf6; }
    .report-submit-btn:disabled { background: #3f3f46; cursor: not-allowed; }
    .report-status { font-size: 12px; text-align: center; min-height: 16px; margin: 0; }
    .report-status.success { color: #22c55e; }
    .report-status.error { color: #ef4444; }

    /* Admin Dashboard */
    .admin-dashboard { padding: 16px; overflow-y: auto; max-height: 420px; }
    .admin-sub-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
    .admin-sub-tab { padding: 6px 16px; background: #18181b; border: 1px solid #27272a; border-radius: 6px; color: #a1a1aa; cursor: pointer; font-size: 12px; transition: all 0.15s; margin: 0; width: auto; }
    .admin-sub-tab.active { background: #27272a; color: #fafafa; border-color: #3f3f46; }
    .admin-sub-tab:hover:not(.active) { color: #fafafa; }

    .admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
    .admin-stat-card { background: #18181b; border: 1px solid #27272a; border-radius: 8px; padding: 16px; text-align: center; }
    .admin-stat-value { font-size: 28px; font-weight: 700; color: #fafafa; }
    .admin-stat-label { font-size: 11px; color: #71717a; margin-top: 4px; text-transform: uppercase; }

    .admin-table-wrapper { overflow-x: auto; }
    .admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
    .admin-table th { text-align: left; padding: 8px; color: #71717a; border-bottom: 1px solid #27272a; cursor: pointer; user-select: none; font-weight: 600; }
    .admin-table th:hover { color: #a1a1aa; }
    .admin-table th.sorted-asc::after { content: ' \u25B2'; font-size: 9px; }
    .admin-table th.sorted-desc::after { content: ' \u25BC'; font-size: 9px; }
    .admin-table td { padding: 8px; color: #fafafa; border-bottom: 1px solid #27272a22; }
    .admin-table tr:hover { background: #18181b; }

    .admin-section-title { color: #a1a1aa; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin: 16px 0 8px; }
    .admin-rooms-list { display: flex; flex-direction: column; gap: 8px; }
    .admin-room-card { background: #18181b; border: 1px solid #27272a; border-radius: 8px; padding: 12px; display: flex; justify-content: space-between; align-items: center; }
    .admin-room-name { color: #fafafa; font-size: 13px; font-weight: 600; }
    .admin-room-players { color: #71717a; font-size: 12px; }

    .status-online { color: #22c55e; font-weight: 600; }
    .status-offline { color: #71717a; }

    .admin-observe-btn { padding: 4px 10px; background: #27272a; color: #a78bfa; border: 1px solid #a78bfa44; border-radius: 4px; font-size: 11px; cursor: pointer; margin: 0; width: auto; }
    .admin-observe-btn:hover { background: #a78bfa22; }

    .admin-report-card { background: #18181b; border: 1px solid #27272a; border-radius: 8px; padding: 12px; margin-bottom: 8px; cursor: pointer; transition: border-color 0.15s; }
    .admin-report-card:hover { border-color: #3f3f46; }
    .admin-report-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
    .admin-report-user { color: #fafafa; font-size: 13px; font-weight: 600; }
    .admin-report-date { color: #52525b; font-size: 11px; }
    .admin-report-preview { color: #a1a1aa; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 500px; }
    .admin-report-detail { margin-top: 10px; padding-top: 10px; border-top: 1px solid #27272a; }
    .admin-report-detail p { color: #d4d4d8; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
    .admin-report-meta { display: flex; gap: 12px; margin-top: 8px; color: #71717a; font-size: 11px; }
    .admin-report-actions { display: flex; gap: 6px; margin-top: 8px; }

    .type-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
    .type-badge.type-bug { background: #ef444422; color: #ef4444; }
    .type-badge.type-improvement { background: #22c55e22; color: #22c55e; }
    .type-badge.type-other { background: #71717a22; color: #71717a; }

    .admin-world-status { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
    .admin-world-status.ws-published { background: #22c55e22; color: #22c55e; }
    .admin-world-status.ws-pending { background: #facc1522; color: #facc15; }
    .admin-world-status.ws-draft { background: #71717a22; color: #71717a; }
    .admin-world-status.ws-featured { background: #a78bfa22; color: #a78bfa; }

    .admin-action-btn { padding: 4px 10px; background: #27272a; border: 1px solid #3f3f46; border-radius: 4px; color: #fafafa; font-size: 11px; cursor: pointer; margin: 0; width: auto; transition: all 0.15s; }
    .admin-action-btn:hover { background: #3f3f46; }
    .admin-action-btn.btn-approve { background: #22c55e; color: #09090b; border-color: #22c55e; }
    .admin-action-btn.btn-approve:hover { background: #16a34a; }
    .admin-action-btn.btn-reject { background: #27272a; color: #ef4444; border-color: #ef444444; }
    .admin-action-btn.btn-reject:hover { background: #ef444422; }

/* ============================================================
   Mobile / Touch
   ============================================================ */

/* Touch controls overlay */
.touch-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.touch-joystick {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 120px;
  height: 120px;
  pointer-events: auto;
  touch-action: none;
}

.touch-joystick-base {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.touch-joystick-knob {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: none;
}

.touch-jump {
  position: absolute;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  pointer-events: auto;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 24px;
}

.touch-jump.active {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Hub responsive */
@media (max-width: 768px) {
  #hub {
    padding: 8px !important;
  }

  .hub-header {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .hub-header .logo {
    width: 100px;
    height: auto;
  }

  .hub-tabs {
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
  }

  .hub-tab {
    font-size: 11px;
    padding: 6px 10px;
  }

  .hub-body {
    flex-direction: column;
    overflow-x: hidden;
  }

  .hub-profile {
    width: 100% !important;
    order: 1;
  }

  .hub-worlds {
    width: 100%;
    order: 0;
  }

  .hub-worlds-list {
    gap: 8px;
  }

  .world-card {
    flex-direction: column;
    gap: 6px;
  }

  .world-card-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .hub-actions {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 4px;
  }

  .hub-actions button {
    font-size: 10px;
    padding: 8px 4px;
    min-height: 40px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hub-profile .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Login card */
  .login-card {
    width: 90% !important;
    max-width: 340px;
    padding: 16px !important;
  }

  .login-card input {
    min-height: 44px;
    font-size: 16px !important; /* prevents iOS zoom on focus */
  }

  .login-card button {
    min-height: 44px;
  }

  /* Modal overlays */
  .modal-overlay > div {
    width: 95% !important;
    max-width: 95% !important;
    max-height: 90vh !important;
  }

  /* Admin tables */
  .admin-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 600px;
  }
}

/* Prevent iOS text selection and callouts during gameplay */
canvas {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .touch-controls {
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .hub-actions {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
