/**
 * Modern theme overrides – coherent design system
 * Load after maine6ef.css
 */

@view-transition {
  navigation: auto;
}

:root {
  --color-bg: #121212;
  --color-surface: #1a1a1a;
  --color-surface-elevated: #242424;
  --color-border: #2d2d2d;
  --color-text: #e8e4df;
  --color-text-muted: #9a9590;
  --color-accent: #ff9d00;
  --color-accent-hover: #ffb733;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);
  --transition: 0.2s ease;
}

/* Base – full viewport, no cropping */
html {
  min-height: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

body,
html,
* {
  color: var(--color-text);
}

/* Wrapper – full width, match original max (1920px) so not cropped */
.wrapper {
  max-width: 1920px;
  width: 100%;
  box-shadow: none;
  animation: page-fade-in 0.3s ease-out;
}

@keyframes page-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Content area – match original max width, consistent padding */
.content-area {
  max-width: 1400px;
  width: calc(100% - 60px);
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 1024px) {
  .content-area {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Nav – fixed global bar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding-top: 12px;
  padding-bottom: 12px;
}

.header {
  position: relative;
  z-index: 100;
  padding-top: 70px;
}

.nav__links-item a {
  transition: color var(--transition);
  letter-spacing: 0.02em;
}

.nav__links-item a:hover {
  color: var(--color-accent) !important;
}

.nav__links-item--active a {
  color: var(--color-accent) !important;
}

/* Buttons */
.button {
  border-radius: var(--radius-pill);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 157, 0, 0.35);
}

.button:after {
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
}

.button:hover:after {
  background-color: var(--color-accent-hover);
}

.button.big {
  border-radius: var(--radius-pill);
}

.button.big:after {
  border-radius: var(--radius-pill);
}

.circle-button {
  border-radius: 50%;
  transition: transform var(--transition);
}

.circle-button:hover {
  transform: scale(1.05);
}

/* Section titles – cleaner typography */
.section__title-center-big {
  letter-spacing: 0.02em;
  font-weight: 500;
}

.section__title-small {
  color: var(--color-text-muted) !important;
  letter-spacing: 0.04em;
  font-size: 14px !important;
}

@media (min-width: 1024px) {
  .section__title-small {
    font-size: 15px !important;
  }
}

/* Sections – consistent spacing */
.section {
  padding-top: 72px;
  padding-bottom: 72px;
}

@media (max-width: 1024px) {
  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/* Features swiper – card style */
.features .swiper-slide {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.features .swiper-slide:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Information boxes – modern cards
   Hover is applied to the parent .col-1-4 so the hit area doesn’t change when
   the card expands, which prevents flicker. */
.information__box {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border: 1px solid var(--color-border);
}

/* Trigger hover from parent so expanding card doesn’t lose hover and flicker */
.information__box,
.information__box:hover {
  max-height: 400px !important;
  -webkit-animation: none !important;
  animation: none !important;
}

.information .col-1-4:hover .information__box {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 157, 0, 0.25);
}

.information .col-1-4:hover .information__box:after,
.information .col-1-4:hover .information__box .information__box-button {
  -webkit-transform: none !important;
  transform: none !important;
}

.information__box-button {
  transition: background var(--transition), color var(--transition);
}

/* Keep card at 400px even if main CSS animation runs */
@-webkit-keyframes box-hover-on {
  0%, 100% { max-height: 400px; }
}
@keyframes box-hover-on {
  0%, 100% { max-height: 400px; }
}
@-webkit-keyframes box-hover-off {
  0%, 100% { max-height: 400px; }
}
@keyframes box-hover-off {
  0%, 100% { max-height: 400px; }
}

/* Join section */
.join__text p {
  line-height: 1.65;
  color: var(--color-text-muted);
}

/* Streams section – grid cards */
.streams__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.streams__item:hover {
  transform: scale(1.02);
}

/* Timer – cleaner boxes */
.header__content-timer-time-box {
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  min-width: 64px;
}

.header__content-timer-time-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.25rem;
}

.header__content-timer-time-desc {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted) !important;
  margin-top: 4px;
}

.header__content-timer-time-end {
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 16px 24px;
  background: rgba(255, 157, 0, 0.12);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 157, 0, 0.3);
}

/* Download / start boxes */
.start__box {
  border-radius: var(--radius-lg);
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.start__box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.start__box:before {
  border-radius: var(--radius-sm);
}

.text-box {
  color: var(--color-text-muted);
  line-height: 1.6;
}

.text-box a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

.text-box a:hover {
  color: var(--color-accent-hover);
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding-top: 48px;
  padding-bottom: 48px;
  background: var(--color-surface);
}

.footer__cpr-title,
.footer__cpr-text {
  color: var(--color-text-muted);
}

.footer__cpr-links a {
  transition: color var(--transition);
}

.footer__cpr-links a:hover {
  color: var(--color-accent) !important;
}

/* Inner page header */
.header.inner {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

/* Header promo text – readability */
.header__content-promo-text {
  line-height: 1.5;
  color: var(--color-text);
}

.header__content-promo-title span {
  color: var(--color-accent);
}

/* Nav lang dropdown */
.nav__langs-items {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.nav__langs-items a {
  transition: background var(--transition);
}

/* Socials floating */
.socials {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.socials .circle-button {
  box-shadow: var(--shadow-md);
}

/* Col spacing */
.col-1-4 {
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 1024px) {
  .col-1-4 {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.col-1-2 {
  padding-left: 20px;
  padding-right: 20px;
}

/* Language page – uses start__box structure for consistent backgrounds */
.language-page .language-card {
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}

.language-page .language-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.language-page .language-card img {
  border-radius: 50%;
}

.language-help-box::before {
  display: none;
}

.language-help-box .start__box-title {
  color: var(--color-accent);
}

.language-help-box .button {
  margin-top: 16px;
}

/* Wiki – Castle Siege video container: large enough to see, no horizontal overflow */
.wiki-video-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 460px;
  aspect-ratio: 1095 / 460;
  overflow: hidden;
  border-radius: 8px;
}

.wiki-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* L2Oops badge – fixed in page corner */
.l2oops-corner {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 9999;
  display: block;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.l2oops-corner:hover {
  opacity: 1;
}
