/* Xbox360TrYama v170 - Haber penceresi + mobil genel iyileştirmeler */

/* ---------- HABER PENCERESİ: daha kompakt, daha sade ---------- */
html body #newsModal.news-reader-modal{
  padding:20px!important;
  background:rgba(1,6,10,.82)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}
html body #newsModal .news-reader-box{
  width:min(620px,calc(100vw - 40px))!important;
  max-width:620px!important;
  max-height:min(78vh,720px)!important;
  padding:0 0 16px!important;
  border:1px solid rgba(105,242,200,.22)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#0b1519 0%,#081014 100%)!important;
  box-shadow:0 24px 65px rgba(0,0,0,.52),0 0 0 1px rgba(255,255,255,.025) inset!important;
  scrollbar-width:thin;
  scrollbar-color:rgba(98,232,190,.35) transparent;
}
html body #newsModal .news-reader-image-wrap{
  height:clamp(150px,25vw,225px)!important;
  border-radius:17px 17px 0 0!important;
  background:#091216!important;
}
html body #newsModal .news-reader-image-wrap img{object-position:center!important}
html body #newsModal .news-reader-close{
  top:10px!important;
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  max-height:30px!important;
  margin:10px 10px -40px auto!important;
  border:1px solid rgba(255,255,255,.17)!important;
  background:rgba(5,12,15,.9)!important;
  font-size:19px!important;
  box-shadow:0 5px 16px rgba(0,0,0,.3)!important;
}
html body #newsModal .news-reader-meta,
html body #newsModal .news-reader-box>h2,
html body #newsModal .news-reader-summary,
html body #newsModal .news-reader-content,
html body #newsModal .news-reader-navigation{
  margin-left:19px!important;
  margin-right:19px!important;
}
html body #newsModal .news-reader-meta{margin-top:17px!important;font-size:11px!important;color:#88a39d!important}
html body #newsModal .news-reader-badge{
  padding:4px 8px!important;
  background:rgba(48,205,151,.12)!important;
  border:1px solid rgba(75,235,180,.2)!important;
  color:#72efbd!important;
  font-size:9px!important;
  letter-spacing:.08em!important;
}
html body #newsModal .news-reader-box>h2{
  margin-top:10px!important;
  font-size:clamp(21px,3vw,28px)!important;
  line-height:1.2!important;
  letter-spacing:-.015em!important;
}
html body #newsModal .news-reader-summary{
  margin-top:10px!important;
  padding:10px 12px!important;
  border:1px solid rgba(86,219,177,.11)!important;
  border-left:2px solid #4bddaa!important;
  border-radius:10px!important;
  background:rgba(72,209,166,.045)!important;
  color:#cfe4de!important;
  font-size:13px!important;
  font-weight:650!important;
  line-height:1.5!important;
}
html body #newsModal .news-reader-content{
  margin-top:14px!important;
  color:#c5d8d3!important;
  font-size:14px!important;
  line-height:1.7!important;
}
html body #newsModal .news-reader-navigation{
  margin-top:18px!important;
  padding-top:12px!important;
  border-top:1px solid rgba(255,255,255,.065)!important;
}
html body #newsModal .news-reader-navigation button{
  min-height:34px!important;
  padding:7px 11px!important;
  border:1px solid rgba(255,255,255,.09)!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.035)!important;
  color:#d9e8e4!important;
  font-size:11px!important;
}
html body #newsModal .news-reader-navigation strong{font-size:11px!important;color:#61ddb1!important}

/* Ana sayfa haber şeridi de biraz daha kompakt */
html body .latest-news-shell{padding:11px!important;border-radius:16px!important}
html body .latest-news-card{min-height:72px!important;border-radius:13px!important}
html body .latest-news-thumb{border-radius:10px!important}

/* ---------- GENEL TAŞMA / DOKUNMA GÜVENLİĞİ ---------- */
html,body{max-width:100%;overflow-x:hidden}
html body img,html body video,html body iframe{max-width:100%}
html body input,html body select,html body textarea,html body button{box-sizing:border-box}

/* ---------- TABLET / MOBİL ---------- */
@media(max-width:760px){
  html body{overflow-x:hidden!important}

  /* Navbar */
  html body .navbar{
    width:100%!important;
    min-width:0!important;
    padding-left:10px!important;
    padding-right:10px!important;
    box-sizing:border-box!important;
  }
  html body .navbar .nav-left,
  html body .navbar .nav-right{min-width:0!important;max-width:100%!important}
  html body .navbar .nav-right{gap:7px!important}
  html body .navbar .nav-btn{min-height:42px!important}

  /* Ana içerik ve oyunlar */
  html body .container,
  html body .section-page-container,
  html body .profile-section,
  html body #adminSection,
  html body #operatorSection,
  html body #salesSection{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  html body .container{padding-left:10px!important;padding-right:10px!important}
  html body .hero{padding-left:12px!important;padding-right:12px!important}
  html body .search-box{width:100%!important;max-width:100%!important;min-width:0!important}
  html body .search-box input{width:100%!important;min-width:0!important}
  html body #gamesGrid{min-width:0!important}
  html body #gamesGrid>.game-card{min-width:0!important;overflow:hidden!important}
  html body .game-card img{max-width:100%!important}

  /* Tüm modaller mobil viewport içinde */
  html body .modal{
    padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;
    box-sizing:border-box!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  html body .modal>.modal-content{
    width:min(100%,520px)!important;
    max-width:calc(100vw - 20px)!important;
    min-width:0!important;
    max-height:calc(100dvh - 20px)!important;
    margin:auto!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    box-sizing:border-box!important;
  }
  html body .modal-content input,
  html body .modal-content select,
  html body .modal-content textarea,
  html body .modal-content button:not(.close):not(.news-reader-close){max-width:100%!important}
  html body #registerModal .modal-content,
  html body #loginModal .modal-content,
  html body #forgotPasswordModal .modal-content{width:min(100%,430px)!important}
  html body #registerModal input,
  html body #loginModal input,
  html body #forgotPasswordModal input{font-size:16px!important}
  html body .register-terms-row{align-items:flex-start!important;gap:8px!important}
  html body .register-terms-row input{flex:0 0 auto!important}

  /* Haber modalı: tam ekran değil, kompakt kart */
  html body #newsModal.news-reader-modal{
    padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;
  }
  html body #newsModal .news-reader-box{
    width:calc(100vw - 20px)!important;
    max-width:560px!important;
    max-height:82dvh!important;
    border-radius:15px!important;
    padding-bottom:13px!important;
  }
  html body #newsModal .news-reader-image-wrap{height:150px!important;border-radius:14px 14px 0 0!important}
  html body #newsModal .news-reader-meta,
  html body #newsModal .news-reader-box>h2,
  html body #newsModal .news-reader-summary,
  html body #newsModal .news-reader-content,
  html body #newsModal .news-reader-navigation{margin-left:14px!important;margin-right:14px!important}
  html body #newsModal .news-reader-box>h2{font-size:20px!important}
  html body #newsModal .news-reader-content{font-size:13px!important;line-height:1.62!important}
  html body #newsModal .news-reader-navigation{grid-template-columns:1fr auto 1fr!important;gap:6px!important}
  html body #newsModal .news-reader-navigation button{padding:7px 8px!important;font-size:10px!important;min-width:0!important}

  /* Admin / operatör */
  html body #adminSection .admin-panel-shell,
  html body #operatorSection .operator-panel-shell{width:100%!important;min-width:0!important;padding-left:10px!important;padding-right:10px!important}
  html body #adminSection .admin-tabs,
  html body #operatorSection .operator-tabs{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
    gap:8px!important;
    padding-bottom:4px!important;
  }
  html body #adminSection .admin-tabs::-webkit-scrollbar,
  html body #operatorSection .operator-tabs::-webkit-scrollbar{display:none!important}
  html body #adminSection .admin-tab-btn,
  html body #operatorSection .operator-tab-btn{flex:0 0 auto!important;min-width:max-content!important;white-space:nowrap!important}
  html body .admin-inner-panel{min-width:0!important;padding:13px!important}
  html body .admin-section-toolbar,
  html body .news-admin-head,
  html body .news-admin-list-head{align-items:flex-start!important;flex-direction:column!important}
  html body .news-admin-form-grid{grid-template-columns:1fr!important}
  html body .news-admin-content-field,
  html body .news-publish-toggle{grid-column:1!important}
  html body .news-admin-card{grid-template-columns:1fr!important;min-width:0!important}
  html body .news-admin-card-image{width:100%!important;height:150px!important}

  /* Satış paneli */
  html body #salesSection{padding:12px 9px 34px!important}
  html body #salesPanel{padding:0!important}
  html body .sales-panel-head{padding:17px!important;border-radius:17px!important;gap:13px!important}
  html body .sales-panel-head h2{font-size:25px!important}
  html body .sales-panel-head p{font-size:13px!important;line-height:1.5!important}
  html body .sales-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  html body .sales-stat-card{min-width:0!important;padding:13px!important}
  html body .sales-stat-card strong{font-size:21px!important;overflow-wrap:anywhere!important}
  html body .sales-side-tabs{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    gap:7px!important;
    padding:8px!important;
    scrollbar-width:none!important;
  }
  html body .sales-side-tabs::-webkit-scrollbar{display:none!important}
  html body .sales-side-tab{flex:0 0 auto!important;min-width:132px!important;min-height:58px!important;padding:9px 10px!important}
  html body .sales-product-card{border-radius:17px!important}
  html body .sales-product-card-head{padding:16px!important}
  html body .sales-code-chip{max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important}
  html body .sales-product-stats{padding:12px 14px 0!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  html body .sales-mini-stat{min-width:0!important;padding:10px!important}
  html body .sales-mini-stat strong{font-size:17px!important}
  html body .sales-config-form{padding:14px!important;gap:11px!important}
  html body .sales-orders-panel{border-radius:17px!important}
  html body .sales-orders-head{padding:15px!important}
  html body .sales-order-row{padding:14px!important;min-width:0!important}
  html body .sales-order-id,
  html body .sales-order-products,
  html body .sales-order-total{min-width:0!important;overflow-wrap:anywhere!important}
  html body .sales-order-actions{width:100%!important}

  /* Profil / özelleştirme */
  html body #profileContainer,
  html body #customizeContainer{min-width:0!important;max-width:100%!important}
  html body .customize-grid{grid-template-columns:1fr!important;gap:12px!important}
  html body .customize-user-card{min-width:0!important;padding:14px!important}
  html body .customize-option-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  html body .customize-option-btn{min-width:0!important;white-space:normal!important}

  /* Yorumlar */
  html body .comments-section{min-width:0!important}
  html body .comment-card,
  html body .xbox-game-comment-v32{min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important}
  html body .comment-actions,
  html body .comment-footer{flex-wrap:wrap!important;gap:7px!important}
  html body .comment-card textarea,
  html body .comments-section textarea{width:100%!important;max-width:100%!important}

  /* Destek / hakkımızda */
  html body .support-center-grid{grid-template-columns:1fr!important}
  html body .social-links{grid-template-columns:1fr 1fr!important;gap:8px!important}
  html body .social-links .social{min-width:0!important}
}

@media(max-width:430px){
  html body .sales-stat-grid{grid-template-columns:1fr 1fr!important}
  html body .sales-product-stats{grid-template-columns:1fr 1fr!important}
  html body .sales-product-stats .sales-mini-stat:last-child{grid-column:1/-1!important}
  html body .customize-option-grid{grid-template-columns:1fr!important}
  html body .social-links{grid-template-columns:1fr!important}
  html body #newsModal .news-reader-image-wrap{height:132px!important}
  html body #newsModal .news-reader-navigation button{font-size:9px!important;padding:7px 6px!important}
}
