/* Perbaikan CSS untuk logo dan container */
:root{
  --card-bg: #c49756;
  --card-border: rgba(255,255,255,.35);
  --card-radius: 16px;
  --header-top: #c49756;
  --nav-bg: #3f1900;
  --accent: #ffd37a;
  --text-dark: #2b1b00;
  --page-bg: #0b1320;
  --page-bg-img: url('/togel/img/bg.jpg');
  --table-bg: #2b180a;
  --table-head-bg: #3a200c;
  --table-head-color: #ffffff;
  --table-row-alt-bg: #241307;
  --table-border: #8b5a2b;
  --table-text: #f1e7d6;
}

/* Reset & base styles */
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:inherit;background:transparent;color:var(--table-text);height:100%}
a{color:inherit}

/* Container - seragamkan max-width menjadi 1200px */
.container{
  max-width:1200px;
  width:100%;
  margin:0 auto;
  padding:12px;
  box-sizing:border-box
}

/* Background layer */
html::before{
  content:"";
  position:fixed;inset:0;z-index:-9999;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), var(--page-bg-img) center/cover no-repeat fixed;
  pointer-events:none;
}

/* keep layout full height */
body{display:flex;flex-direction:column;min-height:100vh}

/* Header styling - perbaikan */
header.site-header, .site-header { 
  background: var(--header-top); 
  position: relative; 
  z-index: 1100; 
}

.site-header .brand-row{
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,.15);
}

/* Container untuk brand-row - pastikan max-width konsisten */
.site-header .brand-row .container{
  max-width: 1200px; /* Sesuaikan dengan nilai yang digunakan di tempat lain */
  margin: 0 auto;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo, .brand, .logo{
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo img, .brand img, .logo img, .loto-img{
  display: block;
  width: auto;
  height: 64px;
  max-height: 84px;
}

@media (min-width:1024px){ 
  .loto-img{
    width: 64px;
    height: 64px
  } 
}

@media (max-width:900px){ 
  .site-logo img{
    height: 56px
  } 
}

/* Menu styling - DEFINISI BARU */
.main-nav {
  background-color: var(--nav-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1000;
}

.main-nav .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  display: flex;
}

.main-nav .menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.main-nav .menu li {
  position: relative;
  margin: 0;
  padding: 0;
  flex-grow: 0;
}

.main-nav .menu li:not(.date-time-display) {
  flex-grow: 1;
  text-align: center;
}

.main-nav .menu a {
  display: block;
  color: #ffd79a;
  text-decoration: none;
  font-weight: 700;
  padding: 15px 10px;
  transition: all 0.2s ease;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid transparent;
}

.main-nav .menu a:hover {
  color: #ffd700;
  background: rgba(255,255,255,0.1);
  border-bottom: 3px solid #ffd700;
}

.main-nav .menu a[aria-current="page"] {
  color: #ffd700;
  background: rgba(255,215,0,0.15);
  border-bottom: 3px solid #ffd700;
}

.date-time-display {
  margin-left: auto;
  padding: 0 15px;
  min-width: 180px;
  text-align: right;
}

#current-datetime {
  color: #ffd700;
  font-size: 0.85rem;
  padding: 5px 10px;
  border-radius: 4px;
  background-color: rgba(0,0,0,0.2);
  line-height: 1.2;
}

/* Tombol Toggle Menu */
.nav-toggle {
  display: none; /* Hidden by default on desktop */
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--text-dark);
  font-size: 20px;
  cursor: pointer;
  margin-left: auto;
  z-index: 1050;
}

/* Menu mobile styles */
@media (max-width: 900px) {
  /* Toggle button - only visible on mobile */
  .nav-toggle {
    display: inline-flex;
  }
  
  /* Overlay background */
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1080;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
  }
  
  body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  /* Menu slide dari kanan */
  .main-nav {
    position: fixed;
    top: 0;
    right: -75%;
    width: 75%;
    height: 100%;
    background: var(--nav-bg);
    z-index: 1090;
    transition: right 0.3s ease;
    padding-top: 60px; /* Space for header */
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
  }
  
  body.menu-open .main-nav {
    right: 0;
  }
  
  .main-nav .container {
    padding: 0;
    flex-direction: column;
    max-width: none;
  }
  
  .main-nav .menu {
    flex-direction: column;
    width: 100%;
  }
  
  .main-nav .menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .main-nav .menu li:not(.date-time-display) {
    flex-grow: 0;
  }
  
  .main-nav .menu a {
    padding: 15px 20px;
    text-align: left;
    border-bottom: none;
  }
  
  .main-nav .menu a:hover,
  .main-nav .menu a[aria-current="page"] {
    border-bottom: none;
    padding-left: 25px;
    background: rgba(255,215,0,0.1);
  }
  
  /* Header menu */
  .menu-header {
    position: fixed;
    top: 0;
    right: -75%;
    width: 75%;
    height: 60px;
    background: var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 1091;
    transition: right 0.3s ease;
  }
  
  body.menu-open .menu-header {
    right: 0;
  }
  
  .menu-title {
    color: var(--text-dark);
    font-weight: bold;
    font-size: 18px;
  }
  
  .menu-close {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Special styling for date-time */
  .date-time-display {
    margin: 10px 0 0 0;
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    min-width: unset;
  }
  
  #current-datetime {
    width: 100%;
    text-align: center;
  }
}

/* Prevent scrolling when menu is open */
body.menu-open {
  overflow: hidden;
}

/* TradingView Widget */
.tradingview-widget-container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.tradingview-widget-header {
    background-color: #201505;
    border-bottom: 1px solid #3e2a0e;
    padding: 5px 0;
    margin-bottom: 5px;
}

/* Date Time Display */
.date-time-display {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding-right: 15px;
}

#current-datetime {
    color: #ffd700;
    font-size: 0.9rem;
    text-align: right;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(0,0,0,0.2);
}

/* Footer styling */
footer {
    background-color: #0f0a03;
    padding: 20px 0;
    text-align: center;
    color: #ffd79a;
    margin-top: 30px;
}

footer a {
    color: #ffd700;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

.social-icons {
    margin: 10px 0;
}

.social-icons a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background-color: #3e2a0e;
    color: #ffd700;
    margin: 0 5px;
    transition: all 0.2s;
}

.social-icons a:hover {
    background-color: #ffd700;
    color: #201505;
}

/* Mobile Responsive untuk waktu dan tanggal */
@media (max-width: 768px) {
    .date-time-display {
        border-top: 1px solid rgba(255,215,0,0.2);
        margin-top: 10px;
        padding-top: 10px;
        justify-content: center;
        width: 100%;
        padding-right: 0;
    }
    
    #current-datetime {
        font-size: 0.85rem;
        text-align: center;
        width: 100%;
    }
}

/* Tambahkan CSS ini untuk footer */
html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body > * {
  flex-shrink: 0;
}

#site-content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

#site-content > .container,
#site-content > main,
#site-content > .wrap {
  flex: 1 0 auto;
}

.site-footer {
  margin-top: auto;
  width: 100%;
}

/* Responsif untuk layar kecil */
@media (max-width: 768px) {
  .contact-info {
    flex-direction: column;
    gap: 10px;
  }
}

/* Memastikan tidak ada transisi atau fade */
html, body {
  transition: none !important;
  animation: none !important;
}

.no-transition,
.no-transition * {
  transition: none !important;
  animation: none !important;
}

/* Hapus semua kode CSS yang menggunakan opacity dan transition */

/* Utilities */
.center{text-align:center}
.hidden{display:none!important}
.small{font-size:.95rem;color:#ffddb0}

/* Style untuk navigasi mulus */
#site-content {
  min-height: 300px; /* Pastikan ada ruang untuk konten */
  transition: none !important; /* Mencegah efek transisi yang tidak diinginkan */
}

/* Opsional: Tambahkan loading indicator */
body.page-loading:after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5) url('/togel/img/spinner.gif') center no-repeat;
  z-index: 9999;
}

/* CSS untuk navigasi halus */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: transparent;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

.ajax-loading .page-loader {
    opacity: 1;
    visibility: visible;
}

.page-loader:before {
    content: '';
    position: absolute;
    left: -10%;
    top: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    animation: loading 1s ease infinite;
}

@keyframes loading {
    0% {
        left: -30%;
    }
    100% {
        left: 100%;
    }
}

/* Struktur halaman untuk footer di bawah */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
}

#page-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

/* Perbaikan tampilan menu mobile/desktop */
@media (min-width: 901px) {
  .nav-toggle, 
  .menu-overlay,
  .menu-header,
  .menu-close {
    display: none !important;
  }
  
  .main-nav {
    position: static !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -75%;
    width: 75%;
    height: 100%;
    background: var(--nav-bg);
    z-index: 10001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
  }
  
  .menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--header-top);
    border-bottom: 1px solid rgba(0,0,0,0.1);
  }
  
  body.menu-open .main-nav {
    right: 0;
  }
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  z-index: 10000;
  overflow: auto;
}

.modal-content {
  background-color: var(--card-bg);
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  max-width: 800px;
  border-radius: var(--card-radius);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: var(--accent);
}

.modal-header {
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header h2 {
  margin: 0;
  color: var(--accent);
}

/* Style untuk body saat modal terbuka */
body.modal-open {
  overflow: hidden;
}