:root {
  --accent-color: #5ec8e8;
  --card-bg: rgba(8, 36, 72, 0.78);
  --card-border: rgba(94, 200, 232, 0.55);
}

html,
body {
  background: #061428;
  color: #fff;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.page-bg {
  position: fixed;
  inset: 0;
  background-color: #061428;
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
  transition: background-image 0.35s ease;
}

.type-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  box-sizing: border-box;
  color: #fff;
}

.type-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 3rem;
  margin-bottom: 1rem;
}

.back-link {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.back {
  width: 1rem;
  height: 1rem;
}

.header-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
}

.card-border {
  display: block;
  width: 100%;
  line-height: 0;
  position: relative;
  z-index: 2;
}

.card-border img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.card {
  position: relative;
  z-index: 1;
  width: 80%;
  box-sizing: border-box;
  margin:0 auto;
  padding: 0.9rem 0.75rem 1rem;
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
}

.zodiac-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 0.7rem 0.35rem 0.65rem;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.7rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.zodiac-item:active {
  transform: scale(0.97);
}

.zodiac-item.is-current {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.zodiac-item[data-element="fire"] {
  border-color: rgba(245, 200, 92, 0.28);
}

.zodiac-item[data-element="earth"] {
  border-color: rgba(111, 214, 160, 0.28);
}

.zodiac-item[data-element="air"] {
  border-color: rgba(94, 200, 232, 0.28);
}

.zodiac-item[data-element="water"] {
  border-color: rgba(240, 140, 184, 0.28);
}

.zodiac-item[data-element="fire"].is-active,
.zodiac-item[data-element="fire"]:active {
  border-color: rgba(245, 200, 92, 0.8);
}

.zodiac-item[data-element="earth"].is-active,
.zodiac-item[data-element="earth"]:active {
  border-color: rgba(111, 214, 160, 0.8);
}

.zodiac-item[data-element="air"].is-active,
.zodiac-item[data-element="air"]:active {
  border-color: rgba(94, 200, 232, 0.8);
}

.zodiac-item[data-element="water"].is-active,
.zodiac-item[data-element="water"]:active {
  border-color: rgba(240, 140, 184, 0.8);
}

.zodiac-icon {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: contain;
  margin-bottom: 0.45rem;
}

.zodiac-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 0.2rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zodiac-date {
  font-size: 0.62rem;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-slot {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 250px;
  margin: 1.2rem auto 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

.empty {
  width: 100%;
  height: 2rem;
}

html[dir="rtl"] .back-link {
  left: auto;
  right: 0;
  transform: translateY(-50%) rotate(0deg);
}

body[data-theme="blue"] .page-bg {
  background-image: url("../img/blueModel.jpg");
}

body[data-theme="blue"] {
  --accent-color: #5ec8e8;
  --card-bg: rgba(8, 36, 72, 0.78);
  --card-border: rgba(94, 200, 232, 0.55);
}

body[data-theme="green"] .page-bg {
  background-image: url("../img/greenModel.jpg");
}

body[data-theme="green"] {
  --accent-color: #6fd6a0;
  --card-bg: rgba(8, 48, 36, 0.78);
  --card-border: rgba(111, 214, 160, 0.55);
}

body[data-theme="pink"] .page-bg {
  background-image: url("../img/pinkModel.jpg");
}

body[data-theme="pink"] {
  --accent-color: #f08cb8;
  --card-bg: rgba(56, 18, 48, 0.78);
  --card-border: rgba(240, 140, 184, 0.55);
}

body[data-theme="yellow"] .page-bg {
  background-image: url("../img/yellowModel.jpg");
}

body[data-theme="yellow"] {
  --accent-color: #f5c85c;
  --card-bg: rgba(56, 40, 12, 0.78);
  --card-border: rgba(245, 200, 92, 0.55);
}
