:root {
  --accent: #7c5cff;
  --accent2: #2fdcff;
  --text: #cfd6ff;
  --text-muted: #5d6793;
  --bg-dark: #05060d;
  --glow-purple: 0 0 15px rgba(124, 92, 255, 0.5);
  --glow-cyan: 0 0 15px rgba(47, 220, 255, 0.5);
  --text-glow-cyan: 0 0 10px rgba(47, 220, 255, 0.6);
  --text-glow-purple: 0 0 10px rgba(124, 92, 255, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at top, #0b0f2a, var(--bg-dark));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  overflow: hidden;
  line-height: 1.5;
}

svg {
  fill: #ffffff !important;
  transition: filter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

svg[stroke] {
  stroke: #ffffff !important;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(5, 6, 13, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 92, 255, 0.2);
  border-radius: 3px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  box-shadow: var(--glow-purple);
}

#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-content img {
  border-radius: 24px !important;
  border: 2px solid var(--accent);
  padding: 16px;
  background: rgba(13, 16, 37, 0.6);
  box-shadow: var(--glow-purple);
  animation: pulseLogo 2s ease-in-out infinite;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(124, 92, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent2);
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
  box-shadow: var(--glow-cyan);
}

#hint {
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.5px;
  font-weight: 500;
}

#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 9, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: linear-gradient(150deg, rgba(13, 16, 37, 0.95) 0%, rgba(5, 6, 13, 0.98) 100%);
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-top: 3px solid var(--accent2);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(124, 92, 255, 0.15);
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  animation: modalScaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#welcome-icon-container, #announcement-icon-container {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(47, 220, 255, 0.05);
  border: 1px solid rgba(47, 220, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 15px rgba(47, 220, 255, 0.1);
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.modal-text {
  font-size: 13.5px;
  color: #a4b3e6;
  line-height: 1.6;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.pagination .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.pagination .dot.active {
  width: 14px;
  border-radius: 4px;
  background: var(--accent2);
  box-shadow: var(--glow-cyan);
}

.modal-footer {
  display: flex;
  width: 100%;
  gap: 12px;
  margin-top: 8px;
}

.modal-footer button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.sidebar {
  width: 56px;
  background: rgba(4, 5, 11, 0.98);
  border-right: 1px solid rgba(124, 92, 255, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 0;
  z-index: 100;
  flex-shrink: 0;
}

.nav-group, .extra-nav-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn svg {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}

.nav-btn:hover, .nav-btn.active {
  background: rgba(124, 92, 255, 0.12);
  border-color: rgba(124, 92, 255, 0.3);
  box-shadow: var(--glow-purple);
  transform: translateY(-2px);
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn:hover svg, .nav-btn.active svg {
  opacity: 1;
  filter: drop-shadow(0 0 4px #fff);
}

.main {
  flex: 1;
  height: 100%;
  position: relative;
  background: transparent;
  overflow: hidden;
}

.home {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 60px 40px;
  text-align: center;
  gap: 14px;
}

#contentFrame, #htmlContainer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  display: none;
}

#htmlContainer {
  overflow: auto;
}

.logo img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(124, 92, 255, 0.4));
  margin-bottom: 6px;
  transition: filter 0.3s ease;
}

.logo img:hover {
  filter: drop-shadow(0 0 25px rgba(124, 92, 255, 0.7));
}

.title {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  text-shadow: var(--text-glow-purple);
  letter-spacing: 1px;
}

.subtitle {
  font-size: 14px;
  color: var(--text);
  max-width: 650px;
  opacity: 0.85;
  line-height: 1.6;
}

#checkversion {
  color: var(--accent2);
  font-weight: 600;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 92, 255, 0.2);
}

.btn-primary:hover {
  background: #8b6eff;
  box-shadow: var(--glow-purple);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.stats {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.stats h1 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stats img {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats img:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.stats h2 {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
  letter-spacing: 0.5px;
}

.stats h2 a {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.stats h2 a:hover {
  text-decoration: underline;
  color: #fff;
  text-shadow: var(--text-glow-cyan);
}

#clock-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(10, 12, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(124, 92, 255, 0.2);
  padding: 12px 20px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(124, 92, 255, 0.05);
  z-index: 50;
  min-width: 150px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#clock-container:hover {
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), inset 0 0 25px rgba(124, 92, 255, 0.1);
}

.time-wrapper {
  display: flex;
  align-items: baseline;
  color: #fff;
}

#time-display {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: var(--text-glow-cyan);
}

#seconds-display {
  font-size: 13px;
  color: var(--accent2);
  margin-left: 4px;
  font-weight: 700;
}

.details-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 5px;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

#extraOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 56px;
  bottom: 0;
  background: rgba(6, 7, 10, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 90;
  color: var(--text);
  flex-direction: column;
  padding: 32px 24px;
  width: 320px;
  border-right: 1px solid rgba(124, 92, 255, 0.1);
  box-shadow: 30px 0 60px rgba(0, 0, 0, 0.8);
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}


#extraOverlay[style*="display: flex"], 
#extraOverlay[style*="display:flex"] {
  transform: translateX(0);
  opacity: 1;
  animation: slideInExtra 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


#extraOverlay.closing {
  animation: slideOutExtra 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#extraOverlay h2 {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
  text-shadow: 0 0 15px rgba(150, 120, 255, 0.8), 0 0 25px rgba(150, 120, 255, 0.4);
  letter-spacing: 0.5px;
}

#extraList {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

#extraList div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 19, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 14px 16px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

#extraList div:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

#extraList div span, 
#extraList div .title {
  flex: 1;
  margin-left: 14px;
  text-align: left;
  line-height: 1.3;
}

#extraList div svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  opacity: 0.8;
}

#extraList div button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

#extraList div button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

#extraOverlay > button {
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  background: rgba(18, 19, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#extraOverlay > button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

@keyframes pulseLogo {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(124, 92, 255, 0.5)); }
  50% { filter: drop-shadow(0 0 22px rgba(124, 92, 255, 0.8)); transform: scale(1.02); }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #10b981; }
  50% { opacity: 0.5; box-shadow: 0 0 4px #10b981; }
}

@keyframes slideInExtra {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutExtra {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-100%); opacity: 0; }
}


@media (max-width: 768px) {
  #extraOverlay {
    width: calc(100vw - 56px); 
    padding: 24px 16px;
    border-right: none;
  }


  #extraList div {
    padding: 12px 14px;
    font-size: 13px;
  }
  
  #contentFrame {
    width: 83.33% !important;
    height: 83.33% !important;
    transform: scale(1.2) !important; 
    transform-origin: top left;
    max-width: 83.33% !important;
    max-height: 83.33% !important;
    -webkit-overflow-scrolling: touch;
  }

  #clock-container {
    bottom: 16px;
    right: 16px;
    padding: 8px 14px;
    min-width: 120px;
  }

  #time-display {
    font-size: 20px;
  }

  #seconds-display {
    font-size: 11px;
  }
}
