:root {
  --light-bg-rgb: 240, 248, 255;
  --dark-bg-rgb: 26, 21, 20;
  --card-alpha: 0.8;
  --text-color: #f5f5f5;
  --link-color: #4CAF50;
  --awake-color: #4CAF50;
  --sleeping-color: #9e9e9e;
  --error-color: #f44336;
}

html {
  height: 100%;
  width: 100%;
}

body {
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-attachment: fixed;
  background-color: #121212;
  color: var(--text-color);
}

a {
  text-decoration: none;
  color: var(--link-color);
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  /* 兼容 WebKit 内核浏览器 */
  appearance: none;
  /* 标准属性，提升兼容性 */
}

button:hover {
  background: var(--control-bg);
}

div p {
  opacity: 0.8;
}

#slider {
  position: absolute;
  left: 10px;
  top: 10px;
}

#slider svg {
  width: 40px;
  height: 40px;
}

#sliderRange {
  display: none;
  position: absolute;
  border: none;
  top: 10px;
  left: 60px;
  filter: invert(0.8);
}

.light {
  background-color: rgba(var(--light-bg-rgb), var(--card-alpha));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: black;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.dark {
  background-color: rgba(var(--dark-bg-rgb), var(--card-alpha));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  color: white;
  border: 1px solid rgba(60, 60, 60, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.card {
  border-radius: 30px;
  padding: 2rem 1rem;
  margin: 1rem auto;
  font-size: 1.1em;
  /* 大屏宽度 */
  width: 65%;
  text-align: center;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 10px;
  border: 1px solid rgba(80, 80, 80, 0.5);
  position: relative;
  background-color: rgba(30, 30, 30, var(--card-alpha));
  color: var(--text-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 0 6px 1px rgba(80, 80, 80, 0.2);
  transition: all 0.2s;
}


/* 较大屏范围 */
@media (max-width: 1250px) {
  .card {
    /* 大屏宽度 */
    width: 60%;
  }
}

/* 较小屏范围 */
@media (max-width: 750px) {
  body {
    touch-action: pan-y;
  }

  .card {
    /* 较小屏宽度 */
    width: 75%;
  }
}

/* 小屏范围 */
@media (max-width: 500px) {
  .card {
    /* 小屏宽度 */
    width: 90%;
  }
}

.card:hover {
  transition: all 0.1s;
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(206, 140, 210, 0.2);
}

.glass {
  height: 200px;
}

#last-updated {
  font-size: 0.8em;
}

.card p {
  font-size: 1.1em;
  margin: 1rem;
}

.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.sleeping {
  color: var(--sleeping-color);
}

.awake {
  color: var(--awake-color);
}

.error {
  color: var(--error-color);
}

#hitokoto {
  border-radius: 0.5rem;
  padding: 0.8rem 1rem;
}

#hitokoto_text {
  color: rgba(180, 40, 200, 0.9);
}

.dark a,
.dark .awake {
  color: rgb(100, 255, 100);
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

.light a,
.light .awake {
  color: rgb(0, 100, 0);
}

.theme-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  padding: 10px;
  z-index: 1000;
}

.opacity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.opacity-controls button {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
}

.opacity-controls button:hover {
  background: rgba(255, 255, 255, 0.5);
}

.dark a.sleeping,
.light a.sleeping {
  color: gray !important;
}

.dark a.error,
.light a.error {
  color: red !important;
}

/* Steam Card */
.steam_card {
  text-align: center;
}

/* 控制栏按钮 */
button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: 0.3s;
  color: var(--text-color);
  -webkit-appearance: none;
  /* 兼容 WebKit 内核浏览器 */
  appearance: none;
  /* 标准属性，提升兼容性 */
}

button:hover {
  background: var(--control-bg);
}

/* 进度条滑块 */
input[type="range"]::-webkit-slider-thumb {
  /* 兼容 WebKit 内核浏览器 */
  -webkit-appearance: none;
  /* 标准属性，提升兼容性 */
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--text-color);
  border-radius: 50%;
}