:root {
  --win-gray: #c0c0c0;
  --win-dark: #808080;
  --win-darker: #404040;
  --win-light: #ffffff;
  --win-blue: #000080;
  --win-blue-light: #1084d0;
  --text-dark: #111111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  color: var(--text-dark);
  background-color: #7aa7d9;
  background-image: url("images/background.png");
  background-size: cover;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

.win-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
}

.header-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #f5f5f5, #a0a0a0);
  background-image: url("images/icon.png");
  background-size: cover;
  background-position: center;
  border: 1px solid var(--win-darker);
  box-shadow: inset 1px 1px 0 var(--win-light);
}

.header-title {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  flex: 1;
}

.page-content {
  padding: 96px 16px 96px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: calc(100vh - 160px);
}

.tower {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.tower-window {
  width: min(520px, 92vw);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tower-window:hover .win-window {
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
  border-color: #f7f7f7;
}

.tilt-1 {
  transform: rotate(-2.5deg);
}

.tilt-2 {
  transform: rotate(1.5deg);
}

.tilt-3 {
  transform: rotate(-1deg);
}

.tilt-4 {
  transform: rotate(2.2deg);
}

.tilt-5 {
  transform: rotate(-1.8deg);
}

.win-window {
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
}

.win-titlebar {
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-light));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 6px 8px;
  font-weight: bold;
  font-size: 14px;
}

.click-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 10px;
  font-style: italic;
  font-weight: normal;
  opacity: 0.85;
}

.win-controls {
  display: flex;
  gap: 4px;
}

.win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--win-gray);
  color: #000000;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  font-size: 10px;
  line-height: 1;
}

.win-body {
  background: #ececec;
  padding: 18px;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
}

.tower .win-body {
  padding: 8px;
}

.tower-image {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--win-dark);
  background: #ffffff;
}

.win-placeholder {
  height: 140px;
  border: 2px dashed var(--win-dark);
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #555555;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  padding: 8px 16px;
}

.taskbar-inner {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.trend-page {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.trend-window {
  width: min(720px, 92vw);
}

.sponsor-window {
  width: min(720px, 92vw);
  margin-top: 16px;
}

.sponsor-body {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.sponsor-link {
  display: inline-block;
}

.sponsor-image {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
  border: 2px solid var(--win-dark);
  background: #ffffff;
}

.trend-content {
  display: grid;
  gap: 12px;
}

.trend-image {
  width: 100%;
  border: 2px solid var(--win-dark);
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555555;
  font-size: 12px;
}

.trend-image img {
  display: block;
  width: 100%;
  height: auto;
}

.trend-meta {
  font-size: 14px;
}

.trend-description {
  min-height: 120px;
  border: 2px solid var(--win-dark);
  background: #ffffff;
  padding: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 10px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  font-size: 12px;
}

.back-link:active {
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
}

@media (max-width: 600px) {
  .taskbar-inner {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
}
