.modal{
    position:fixed;
    inset:0;
    z-index:2000;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(0,0,0,.78);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
}

.modal-content{
    position:relative;
    width:min(92vw,410px);
    max-height:min(90vh,720px);
    overflow-y:auto;
    padding:30px;
    border:1px solid rgba(226,184,87,.22);
    border-radius:8px;
    text-align:center;
    background:var(--panel-2);
    box-shadow:var(--shadow);
}

.close-btn{position:absolute;top:14px;left:14px;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.10);border-radius:10px;background:rgba(255,255,255,.055);color:#c8c8cc;font-size:20px;line-height:1;cursor:pointer;transition:.22s ease;box-shadow:0 8px 20px rgba(0,0,0,.22);font-family:Arial,sans-serif;font-weight:400}

.close-btn:hover{color:#0a0907;border-color:var(--gold);background:var(--gold);transform:scale(1.04);box-shadow:0 0 18px rgba(226,184,87,.18)}

.modal-title{
    color:var(--gold);
    margin:6px 0 24px;
    font-size:22px;
    font-weight:900;
}

.menu-item{
    width:100%;
    min-height:54px;
    margin-bottom:10px;
    padding:14px;
    display:flex;
    align-items:center;
    gap:12px;
    text-align:right;
    color:var(--text);
    background:rgba(255,255,255,.035);
    border:1px solid rgba(226,184,87,.12);
    border-radius:8px;
    cursor:pointer;
}

.menu-item:hover{
    border-color:var(--gold);
    background:rgba(226,184,87,.08);
    transform:translateX(-3px);
}

.menu-item svg{color:var(--gold);flex:0 0 auto}

.input-field{
    width:100%;
    min-height:48px;
    margin-bottom:12px;
    padding:12px 13px;
    border:1px solid var(--border);
    border-radius:8px;
    color:var(--text);
    background:rgba(7,8,11,.7);
    font:inherit;
    outline:0;
}

.input-field:focus{
    border-color:var(--gold);
    box-shadow:0 0 0 3px rgba(226,184,87,.13);
}

.main-btn{
    width:100%;
    min-height:48px;
    padding:12px;
    border:0;
    border-radius:8px;
    color:#07080b;
    background:linear-gradient(135deg,var(--gold),var(--gold-2));
    font:inherit;
    font-weight:900;
    cursor:pointer;
}

.main-btn:hover{
    filter:brightness(1.06);
    transform:translateY(-2px);
}

.text-link{
    margin-top:14px;
    color:var(--muted);
    font-size:13px;
    cursor:pointer;
    text-decoration:underline;
}

.bookmarks-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    max-height:250px;
    overflow-y:auto;
    margin-top:10px;
    padding:10px;
    border:1px solid var(--border);
    border-radius:8px;
    background:rgba(7,8,11,.45);
}

.manga-mini-card{
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:6px;
    color:var(--muted);
    text-decoration:none;
}

.manga-mini-card img{
    width:100%;
    aspect-ratio:2/3;
    object-fit:cover;
    border:1px solid rgba(226,184,87,.18);
    border-radius:6px;
}

.manga-mini-card span{
    width:100%;
    display:block;
    overflow:hidden;
    color:var(--muted);
    font-size:10px;
    text-align:center;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.edit-profile-fields{
    display:none;
    padding:14px;
    margin-bottom:10px;
    border:1px solid var(--border);
    border-radius:8px;
    background:rgba(7,8,11,.52);
}.info-modal-content{width:min(92vw,560px);padding:34px 32px 28px;text-align:right;background:linear-gradient(180deg,#111214,#08090b);border:1px solid rgba(226,184,87,.22);box-shadow:0 30px 80px rgba(0,0,0,.65),0 0 40px rgba(226,184,87,.05)}
.info-modal-body{margin:0;color:#d7d7db;font-size:14px;line-height:2.05;white-space:pre-line}
.info-modal-link{margin-top:22px;display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;border:1px solid rgba(226,184,87,.35);border-radius:999px;color:#0a0a0a;background:var(--gold);text-decoration:none;font-size:12px;font-weight:900;transition:.22s ease}
.info-modal-link:hover{transform:translateY(-2px);filter:brightness(1.06);box-shadow:0 0 22px rgba(226,184,87,.16)}
body.modal-open{overflow:hidden}


.user-comments-list{display:flex;flex-direction:column;gap:10px;margin-top:10px;max-height:340px;overflow:auto;padding-right:2px}
.user-comment-card{padding:11px 12px;border:1px solid rgba(226,184,87,.14);border-radius:12px;background:rgba(255,255,255,.025)}
.user-comment-top{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:6px}.user-comment-top span{color:var(--gold);font-size:10px;font-weight:900}.user-comment-top small,.user-comment-card>small{color:var(--muted);font-size:9px}.user-comment-card strong{display:block;color:#fff;font-size:11px;margin-bottom:3px}.user-comment-card p{margin:6px 0 0;color:#ddd;font-size:11px;line-height:1.7;word-break:break-word}.user-comments-empty,.user-comments-loading{color:var(--muted);font-size:11px;text-align:center;padding:12px}

/* ===== Account dashboard polish ===== */
.account-heading{display:flex;align-items:center;gap:12px;text-align:right;margin:2px 2px 22px}
.account-heading-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border:1px solid rgba(226,184,87,.24);border-radius:13px;color:var(--gold);background:rgba(226,184,87,.07);box-shadow:0 10px 24px rgba(0,0,0,.18)}
.account-heading .modal-title{margin:0 0 3px}
.account-subtitle{margin:0;color:var(--muted);font-size:10px;line-height:1.8}
.auth-switch{margin:18px 0 2px;color:var(--muted);font-size:12px}
.auth-switch span{color:var(--gold);font-weight:900;cursor:pointer;transition:.2s ease}
.auth-switch span:hover{color:#fff}
.dashboard-view{text-align:right}
.account-profile-head{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid rgba(226,184,87,.16);border-radius:16px;background:linear-gradient(180deg,rgba(226,184,87,.07),rgba(255,255,255,.025));box-shadow:0 16px 34px rgba(0,0,0,.2);margin-bottom:15px}
.account-avatar{width:50px;height:50px;flex:0 0 50px;border-radius:15px;display:grid;place-items:center;color:var(--gold);background:#0b0d11;border:1px solid rgba(226,184,87,.26);font-size:18px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)}
.account-profile-copy{min-width:0;flex:1}
.account-profile-copy h2{margin:0 0 4px;color:#fff;font-size:16px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.account-profile-copy p{margin:0;color:var(--muted);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.account-status{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;color:#91d36b;font-size:13px;background:rgba(145,211,107,.08);border:1px solid rgba(145,211,107,.14)}
.account-menu-section{margin-top:13px}
.account-section-label{margin:0 2px 8px;color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.2px}
.account-section-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.account-section-hint{color:var(--gold);font-size:9px;font-weight:900;padding:4px 8px;border-radius:999px;background:rgba(226,184,87,.08);border:1px solid rgba(226,184,87,.12)}
.account-menu-item{width:100%;border:1px solid rgba(255,255,255,.07);border-radius:13px;padding:12px;margin-bottom:8px;display:flex;align-items:center;gap:10px;text-align:right;color:var(--text);background:rgba(255,255,255,.026);cursor:pointer;font:inherit;transition:transform .22s ease,border-color .22s ease,background .22s ease,box-shadow .22s ease}
.account-menu-item:hover{transform:translateX(-3px);border-color:rgba(226,184,87,.38);background:rgba(226,184,87,.065);box-shadow:0 12px 26px rgba(0,0,0,.18)}
.account-menu-item:active{transform:translateX(-1px) scale(.99)}
.account-menu-icon{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:10px;color:var(--gold);background:rgba(226,184,87,.08);border:1px solid rgba(226,184,87,.11)}
.account-menu-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.account-menu-copy strong{font-size:11px;color:#fff}
.account-menu-copy small{font-size:9px;color:var(--muted)}
.account-menu-arrow{font-size:10px;color:#777;transition:transform .2s ease,color .2s ease}
.account-menu-item:hover .account-menu-arrow{transform:translateX(-2px);color:var(--gold)}
.account-expand-panel{margin:4px 0 10px;border:1px solid rgba(226,184,87,.12);border-radius:13px;background:rgba(7,8,11,.42);overflow:hidden;animation:accountPanelIn .22s ease}
.account-expand-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.06);color:var(--gold);font-size:10px;font-weight:900}
.account-expand-head button{width:24px;height:24px;border:1px solid rgba(255,255,255,.07);border-radius:7px;background:rgba(255,255,255,.035);color:#aaa;cursor:pointer;transition:.2s ease}
.account-expand-head button:hover{color:#111;border-color:var(--gold);background:var(--gold)}
.edit-profile-fields{display:none;padding:0 12px 12px;margin:4px 0 10px;border:1px solid rgba(226,184,87,.12);border-radius:13px;background:rgba(7,8,11,.42);overflow:hidden;animation:accountPanelIn .22s ease}
.edit-profile-fields .account-expand-head{margin:0 -12px 12px}
.account-logout{width:100%;display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:11px 12px;margin-top:14px;border:1px solid rgba(226,184,87,.2);border-radius:13px;background:rgba(226,184,87,.055);color:var(--gold);font:inherit;font-size:11px;font-weight:900;cursor:pointer;transition:.22s ease}
.account-logout:hover{transform:translateX(-3px);border-color:var(--gold);background:rgba(226,184,87,.11);box-shadow:0 12px 26px rgba(0,0,0,.18)}
.account-logout .account-menu-icon{background:rgba(226,184,87,.08)}
.favorites-section{margin-top:4px}
.favorites-section .bookmarks-grid{margin-top:0}
@keyframes accountPanelIn{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:480px){.account-profile-head{padding:12px}.account-menu-copy strong{font-size:10px}.account-menu-copy small{font-size:8px}.account-avatar{width:46px;height:46px;flex-basis:46px}}


/* ===== Final account modal layout pass ===== */
#userModal .modal-content{width:min(94vw,560px);max-height:min(92vh,820px);padding:30px 30px 26px;overflow-y:auto;overflow-x:hidden}
#userModal .close-btn{top:12px;left:12px;z-index:5;width:36px;height:36px}
#userModal .dashboard-view{padding-top:8px}
#userModal .account-profile-head{margin-top:4px}
#userModal .account-menu-section{display:flex;flex-direction:column;gap:0}
#userModal .account-menu-item{flex:0 0 auto}
#userModal .edit-profile-fields,#userModal .account-expand-panel{width:100%;box-sizing:border-box}
#userModal .edit-profile-fields{margin:0 0 10px;padding:0 12px 12px}
#userModal .account-expand-panel{margin:0 0 10px}
@media(max-width:600px){#userModal{padding:10px}#userModal .modal-content{width:min(96vw,520px);max-height:94vh;padding:28px 18px 20px}#userModal .close-btn{top:10px;left:10px}}


/* FINAL ACCOUNT WINDOW — wider, cleaner close button, strict accordion order */
#userModal .modal-content{
  width:min(94vw,640px) !important;
  max-width:640px !important;
  max-height:min(92vh,860px) !important;
  padding:68px 34px 30px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  box-sizing:border-box !important;
  border-radius:16px !important;
}
#userModal .close-btn{
  top:16px !important;
  right:16px !important;
  left:auto !important;
  z-index:20 !important;
  width:40px !important;
  height:40px !important;
  border-radius:11px !important;
}
#userModal .dashboard-view{
  width:100% !important;
  box-sizing:border-box !important;
}
#userModal .account-menu-section{
  display:block !important;
  width:100% !important;
  margin-top:14px !important;
}
#userModal .account-menu-item{
  display:flex !important;
  width:100% !important;
  margin:0 0 8px !important;
  box-sizing:border-box !important;
}
#userModal .edit-profile-fields,
#userModal #userCommentsPanel{
  position:relative !important;
  width:100% !important;
  margin:0 0 10px !important;
  box-sizing:border-box !important;
}
#userModal .edit-profile-fields{padding:0 14px 14px !important;}
#userModal .edit-profile-fields .account-expand-head{margin:0 -14px 14px !important;}
#userModal .account-expand-panel{padding:0 !important;}
#userModal .account-expand-head{min-height:44px !important;box-sizing:border-box !important;}
#userModal .account-profile-head{padding:16px !important;margin-top:0 !important;}
#userModal .favorites-section{margin-top:16px !important;}
#userModal .account-logout{margin-top:16px !important;}

@media(max-width:600px){
  #userModal{padding:10px !important;}
  #userModal .modal-content{
    width:min(97vw,560px) !important;
    max-width:none !important;
    max-height:94vh !important;
    padding:66px 18px 22px !important;
    border-radius:15px !important;
  }
  #userModal .close-btn{top:14px !important;right:14px !important;width:38px !important;height:38px !important;}
}


/* ===== FINAL SITE-IDENTITY ACCOUNT WINDOW ===== */
#userModal .modal-content{
  background:
    radial-gradient(circle at 50% 0%,rgba(226,184,87,.10),transparent 42%),
    linear-gradient(180deg,rgba(13,16,21,.98),rgba(5,6,8,.99)) !important;
  border:1px solid rgba(226,184,87,.28) !important;
  box-shadow:0 30px 90px rgba(0,0,0,.68),0 0 45px rgba(226,184,87,.055) !important;
}
#userModal .account-heading-icon,#userModal .account-avatar,#userModal .account-menu-icon{
  color:var(--gold) !important;
  border-color:rgba(226,184,87,.24) !important;
  background:rgba(226,184,87,.07) !important;
}
#userModal .account-profile-head{
  background:linear-gradient(180deg,rgba(226,184,87,.085),rgba(255,255,255,.025)) !important;
  border-color:rgba(226,184,87,.20) !important;
}


/* FINAL PC ACCOUNT WINDOW — match Steel Ball site identity */
@media(min-width:601px){
  #userModal .modal-content{
    background:radial-gradient(circle at 50% 0%,rgba(226,184,87,.12),transparent 44%),linear-gradient(180deg,#101319,#080a0d)!important;
    border:1px solid rgba(226,184,87,.30)!important;
    box-shadow:0 30px 90px rgba(0,0,0,.72),0 0 48px rgba(226,184,87,.07)!important;
  }
  #userModal .account-menu-item{
    background:rgba(255,255,255,.025)!important;
    border-color:rgba(226,184,87,.12)!important;
  }
  #userModal .account-menu-item:hover{
    background:rgba(226,184,87,.065)!important;
    border-color:rgba(226,184,87,.34)!important;
  }
  #userModal .edit-profile-fields,#userModal #userCommentsPanel{
    background:rgba(8,10,13,.72)!important;
    border-color:rgba(226,184,87,.15)!important;
  }
  #userModal .account-logout{
    background:rgba(226,184,87,.055)!important;
    border-color:rgba(226,184,87,.20)!important;
  }
}


/* ===== STEEL BALL AUTH — FINAL IDENTITY PASS ===== */
#userModal .modal-content{isolation:isolate!important;overflow:hidden!important;background:radial-gradient(circle at 50% -18%,rgba(226,184,87,.16),transparent 42%),linear-gradient(145deg,#14171d 0%,#0b0d12 58%,#060709 100%)!important;border:1px solid rgba(226,184,87,.34)!important;box-shadow:0 34px 100px rgba(0,0,0,.76),0 0 54px rgba(226,184,87,.075)!important;}
#userModal .modal-content::before{content:"";position:absolute;inset:0 0 auto;height:2px;background:linear-gradient(90deg,transparent,rgba(226,184,87,.95),transparent);pointer-events:none;z-index:-1;}
#userModal .auth-view{max-width:500px;margin:0 auto;text-align:right;}
#userModal .account-heading{align-items:center;gap:14px;margin:0 0 26px!important;padding:0 0 18px;border-bottom:1px solid rgba(226,184,87,.14);}
#userModal .account-heading-icon{width:52px!important;height:52px!important;border-radius:16px!important;font-size:18px!important;background:linear-gradient(145deg,rgba(226,184,87,.15),rgba(255,255,255,.025))!important;border-color:rgba(226,184,87,.36)!important;box-shadow:0 14px 30px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.08)!important;}
#userModal .account-heading .modal-title{color:#f0c76c!important;font-size:23px!important;line-height:1.25!important;letter-spacing:.1px!important;}
#userModal .account-subtitle{font-size:11px!important;color:#9da4af!important;}
#userModal .auth-view .input-field{height:50px!important;min-height:50px!important;margin:0 0 11px!important;padding:0 15px!important;border-radius:13px!important;border-color:rgba(255,255,255,.09)!important;background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(0,0,0,.14))!important;color:#f4f5f6!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;}
#userModal .auth-view .input-field::placeholder{color:#7f8792!important;opacity:1!important;}
#userModal .auth-view .input-field:focus{border-color:rgba(226,184,87,.62)!important;background:rgba(226,184,87,.045)!important;box-shadow:0 0 0 3px rgba(226,184,87,.09),0 12px 28px rgba(0,0,0,.16)!important;}
#userModal .auth-view .main-btn{height:50px!important;min-height:50px!important;margin-top:4px!important;border:1px solid rgba(255,232,177,.56)!important;border-radius:13px!important;background:linear-gradient(135deg,#f0cf7d,#b8872d)!important;color:#15110a!important;box-shadow:0 14px 28px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.42)!important;}
#userModal .auth-view .text-link{text-decoration:none!important;color:#9fa6b0!important;}
#userModal .auth-view .text-link:hover{color:#e2b857!important;}
#userModal .auth-switch{margin-top:18px!important;padding-top:16px!important;border-top:1px solid rgba(255,255,255,.055)!important;text-align:center!important;}
@media(max-width:600px){#userModal .account-heading{flex-direction:column!important;text-align:center!important;gap:9px!important;}#userModal .auth-view{text-align:right!important;}#userModal .account-heading .modal-title{font-size:21px!important;}#userModal .account-subtitle{text-align:center!important;font-size:10px!important;}}

/* ===== STEEL BALL AUTH MODAL — FINAL CLEAN IDENTITY ===== */
#userModal .auth-view .main-btn{font-family:'Noto Kufi Arabic',sans-serif!important;}
#userModal .auth-view .auth-switch span{display:inline-block!important;padding:2px 7px!important;border-radius:7px!important;}
#userModal .auth-view .auth-switch span:hover{background:rgba(226,184,87,.08)!important;}
#userModal .auth-view .text-link{display:inline-block!important;padding:6px 10px!important;border-radius:8px!important;}
#userModal .auth-view .text-link:hover{background:rgba(255,255,255,.035)!important;}


/* ===== GOOGLE AUTH — STEEL BALL ===== */
.google-auth-btn{
  width:100%!important;
  min-height:50px!important;
  margin:12px 0 0!important;
  padding:0 16px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:13px!important;
  background:#4285F4!important;
  color:#fff!important;
  font:900 12px/1 'Noto Kufi Arabic',sans-serif!important;
  cursor:pointer!important;
  box-shadow:0 12px 28px rgba(66,133,244,.18),inset 0 1px 0 rgba(255,255,255,.22)!important;
  transition:transform .18s ease,filter .18s ease,box-shadow .18s ease!important;
}
.google-auth-btn i{font-size:17px!important;color:#fff!important;line-height:1!important;}
.google-auth-btn:hover{filter:brightness(1.06)!important;transform:translateY(-1px)!important;box-shadow:0 15px 32px rgba(66,133,244,.26),inset 0 1px 0 rgba(255,255,255,.26)!important;}
.google-auth-btn:active{transform:translateY(0)!important;}
.google-auth-btn:disabled{opacity:.72!important;cursor:wait!important;transform:none!important;}
.auth-divider{display:flex!important;align-items:center!important;gap:10px!important;margin:14px 0 0!important;color:#7f8792!important;font:700 10px 'Noto Kufi Arabic',sans-serif!important;}
.auth-divider::before,.auth-divider::after{content:""!important;flex:1!important;height:1px!important;background:rgba(255,255,255,.07)!important;}
.auth-divider span{padding:0 4px!important;}
@media(max-width:600px){
  .google-auth-btn{min-height:48px!important;border-radius:12px!important;font-size:11px!important;}
}
