:root {
    --bg-base: #020617;
    --bg-surface: #0f172a;
    --primary: #22d3ee;
    --primary-glow: rgba(34, 211, 238, 0.4);
    --secondary: #a855f7;
    --accent-cyan: #06b6d4;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-circuit: rgba(34, 211, 238, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.text-muted {
    color: #94a3b8 !important;
}

.clip-path-polygon {
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
}

.circuit-pattern {
    background-image: radial-gradient(var(--border-circuit) 1px, transparent 1px);
    background-size: 30px 30px;
}

.glow-hover:hover {
    box-shadow: 0 0 20px var(--primary-glow);
    border-color: var(--primary) !important;
}

* {
    box-sizing: border-box;
    transition: all 0.3s ease;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.btn-cyber {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0891b2 0%, #22d3ee 100%);
    color: #020617;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: 0.3s;
}

.btn-cyber:hover {
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
    transform: translateY(-2px);
}

/* ===== header ===== */
.site-header .js-dropdown-content.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-header .js-mobile-nav.active {
    display: flex !important;
}

.site-header .nav-link-active {
    color: #22d3ee !important;
}

.site-header .js-dropdown-trigger[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.site-header .js-dropdown-trigger i {
    transition: transform 0.3s ease;
}

.site-header .mobile-menu-open {
    overflow: hidden;
}

/* ===== hero ===== */
.hero-altivaceth {
    font-family: 'Inter', sans-serif;
    position: relative;
}

.hero-altivaceth h1 {
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

.hero-altivaceth .circuitry-overlay {
    background-image: radial-gradient(circle at 2px 2px, rgba(34, 211, 238, 0.15) 1px, transparent 0);
    background-size: 40px 40px;
}

.hero-altivaceth .js-hero-cta {
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
}

.hero-altivaceth .hero-bg-layer div {
    transition: transform 0.5s ease-out;
}

/* ===== games_grid ===== */
.games-grid-section .js-game-card {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.games-grid-section .js-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -5px rgba(34, 211, 238, 0.15);
}

.games-grid-section .js-filter-btn {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.games-grid-section .js-filter-btn.active {
    background-color: #22d3ee !important;
    color: #020617 !important;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
}

.games-grid-section input::-webkit-input-placeholder {
    color: #475569;
}

.games-grid-section input:-ms-input-placeholder {
    color: #475569;
}

.games-grid-section input::placeholder {
    color: #475569;
}

@media (max-width: 767px) {
    .games-grid-section h2 {
        font-size: 16px !important;
    }

    .games-grid-section h3 {
        font-size: 14px !important;
    }
}

/* ===== open_rooms ===== */
.lobby-section {
    font-family: 'Inter', sans-serif;
}

.lobby-section h2 {
    font-family: 'Outfit', sans-serif;
}

.lobby-section .js-lobby-card {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.lobby-section .js-join-btn {
    clip-path: polygon(0 0, 100% 0, 100% 70%, 90% 100%, 0 100%);
}

@media (max-width: 768px) {
    .lobby-section .js-lobby-card {
        clip-path: none;
        border-radius: 4px;
    }

    .lobby-section .js-join-btn {
        clip-path: none;
        border-radius: 2px;
    }
}

/* ===== game_troubleshooting ===== */
.troubleshooting-block .clip-path-container {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.troubleshooting-block .js-troubleshoot-btn:active {
    transform: scale(0.98);
}

.troubleshooting-block .js-troubleshoot-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    opacity: 0;
}

.troubleshooting-block .js-troubleshoot-btn:hover::after {
    left: 100%;
    opacity: 1;
}

@media (max-width: 767px) {
    .troubleshooting-block .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ===== support_faq ===== */
.support-faq-block .clip-path-polygon {
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
}

.support-faq-block__circuit-layer {
    background-image: radial-gradient(circle at 2px 2px, rgba(34, 211, 238, 0.15) 1px, transparent 0);
    background-size: 24px 24px;
}

.support-faq-block__card.is-active {
    border-color: #22d3ee;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.05);
}

.support-faq-block__card.is-active .js-faq-icon {
    transform: rotate(45deg);
    color: #a855f7;
}

.support-faq-block__card:hover {
    border-color: rgba(34, 211, 238, 0.5);
}

@media (max-width: 767px) {
    .support-faq-block .clip-path-polygon {
        clip-path: none;
        border-radius: 4px;
    }
}

/* ===== footer ===== */
.footer-block .footer-block-circuitry {
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

.footer-block h3 {
    font-family: 'Outfit', sans-serif;
}

.footer-block a {
    text-decoration: none;
}

.footer-block .footer-link-group a:hover {
    padding-left: 4px;
}

.footer-block transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 767px) {
    .footer-block .grid {
        text-align: left;
    }

    .footer-block .footer-logo {
        margin-bottom: 24px;
    }
}

.site-header .js-dropdown-content.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-header .js-mobile-nav.active {
    display: flex !important;
}

.site-header .mobile-menu-open {
    overflow: hidden;
}

.site-header .js-dropdown-trigger[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.hero-altivaceth .circuitry-overlay {
    background-image: radial-gradient(circle at 2px 2px, rgba(34, 211, 238, 0.15) 1px, transparent 0);
    background-size: 40px 40px;
}

.games-section .js-filter-btn.active {
    border-color: #22d3ee;
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.05);
}

.footer-block .footer-block-circuitry {
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}


/* ===== PAGE: about ===== */
.about-section .js-stat-card {
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.about-section .clip-path-polygon {
  clip-path: polygon(10px 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0% 100%, 0% 10px);
}

.about-section .js-counter {
  transition: all 2s ease-out;
}

.about-section img {
  object-fit: cover;
  min-height: 300px;
}

@media (max-width: 768px) {
  .about-section img {
    min-height: 200px;
  }
}

/* ===== PAGE: updates ===== */
.updates-section {
  background-image: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.05) 0%, transparent 70%);
}

.updates-section__circuit-overlay {
  background-image: 
    linear-gradient(rgba(34, 211, 238, 0.1) 1px, transparent 1px), 
    linear-gradient(90deg, rgba(34, 211, 238, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

.updates-section__card {
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.updates-section__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px -10px rgba(34, 211, 238, 0.3);
  border-color: #22d3ee;
}

.updates-section .js-filter-btn.active {
  background-color: #22d3ee !important;
  color: #ffffff !important;
  border-color: #22d3ee !important;
}

.updates-section .js-filter-btn.active:hover {
  color: #ffffff !important;
}

.updates-section .js-filter-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.updates-section .js-filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: #22d3ee;
  transition: height 0.3s ease;
  z-index: -1;
}

.updates-section .js-filter-btn:hover::after {
  height: 100%;
}

/* ===== PAGE: chat ===== */
.chat-interface-block .custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.chat-interface-block .custom-scrollbar::-webkit-scrollbar-track {
  background: #020617;
}
.chat-interface-block .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #22d3ee50;
}
.chat-interface-block .js-user-item.active {
  background: rgba(34, 211, 238, 0.1);
  border-left: 3px solid #22d3ee;
}
@media (max-width: 1023px) {
  .chat-interface-block .js-sidebar.mobile-hidden {
    display: none;
  }
  .chat-interface-block main.mobile-hidden {
    display: none;
  }
}
.chat-interface-block .js-chat-messages {
  display: flex;
  flex-direction: column;
}
.chat-interface-block .js-user-item:hover .flex-shrink-0 img {
  border-color: #22d3ee;
}

/* ===== PAGE: leaderboard ===== */
.leaderboard-section .leaderboard-row {
  clip-path: polygon(2% 0, 100% 0, 100% 85%, 98% 100%, 0 100%, 0 15%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.leaderboard-section .leaderboard-row:hover {
  transform: translateX(10px);
  background: rgba(30, 41, 59, 0.8);
}

.leaderboard-section .js-icon-spin.is-spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.leaderboard-section ::-webkit-scrollbar {
  height: 6px;
}

.leaderboard-section ::-webkit-scrollbar-track {
  background: #020617;
}

.leaderboard-section ::-webkit-scrollbar-thumb {
  background: #22d3ee20;
  border-radius: 10px;
}

.leaderboard-section ::-webkit-scrollbar-thumb:hover {
  background: #22d3ee50;
}

/* ===== PAGE: contacts ===== */
.support-terminal .support-info-card {
  clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 95% 100%, 0% 100%);
}
.support-terminal .js-faq-item[data-open="true"] {
  border-color: #22d3ee;
  background-color: #1e293b;
}
.support-terminal .js-faq-item[data-open="true"] i {
  transform: rotate(180deg);
}
.support-terminal .js-faq-content {
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

/* ===== PAGE: privacy ===== */
.privacy-content .clip-path-polygon {
  clip-path: polygon(5% 0, 100% 0, 100% 90%, 95% 100%, 0 100%, 0 10%);
}

.privacy-content article h2 {
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

.privacy-content .container {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.privacy-content #js-accept-privacy:active {
  transform: scale(0.95);
}

/* ===== PAGE: terms ===== */
.terms-content .js-section {
  border-left: 2px solid rgba(34, 211, 238, 0.1);
  padding-left: 1.5rem;
  transition: border-color 0.3s ease;
}
.terms-content .js-section:hover {
  border-left-color: #22d3ee;
}
.terms-content .prose ul li::marker {
  color: #22d3ee;
}
.terms-content #js-accept-terms {
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}

/* ===== PAGE: disclaimer ===== */
.disclaimer-section {
  font-family: 'Inter', sans-serif;
}

.disclaimer-section .circuit-pattern {
  background-image: radial-gradient(circle at 2px 2px, rgba(34, 211, 238, 0.15) 1px, transparent 0);
  background-size: 24px 24px;
}

.disclaimer-section .disclaimer-card {
  position: relative;
  clip-path: polygon(0% 0%, 95% 0%, 100% 5%, 100% 100%, 5% 100%, 0% 95%);
}

.disclaimer-section .disclaimer-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.02) 0%, transparent 100%);
  pointer-events: none;
}

.disclaimer-section h1, .disclaimer-section h2 {
  line-height: 1.2;
}

.disclaimer-section p {
  line-height: 1.8;
}

.clip-path-container {
    clip-path: polygon(0% 0%, 97% 0%, 100% 10%, 100% 100%, 3% 100%, 0% 90%);
}

.clip-path-avatar {
    clip-path: polygon(20% 0%, 100% 0%, 100% 80%, 80% 100%, 0% 100%, 0% 20%);
}

.comment-card:hover {
    border-color: #22d3ee;
    transform: translateY(-2px);
}

.action-btn {
    transition: transform 0.2s ease;
}

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

.clip-path-reply {
    clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 95% 100%, 0% 100%);
}

.reply-card:hover {
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.1);
}

.reply-comment-wrapper::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 1.5rem;
    width: 2rem;
    height: 2px;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.2), transparent);
}


/* ===== PAGE TEMPLATE: games ===== */
.site-header .js-dropdown-content.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-header .js-mobile-nav.active {
    display: flex !important;
}

.site-header .js-dropdown-trigger[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.site-header .js-dropdown-trigger i {
    transition: transform 0.3s ease;
}

.game-detail-hero .js-game-container {
    position: relative;
}

.game-detail-hero .js-game-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #22d3ee, transparent, #a855f7);
    z-index: -1;
    opacity: 0.3;
}

.footer-block .footer-block-circuitry {
    background-image: linear-gradient(rgba(34, 211, 238, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 211, 238, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

.game-info-block .content-wrapper p {
    margin-bottom: 1rem;
}

.game-info-block .content-wrapper h1,
.game-info-block .content-wrapper h2,
.game-info-block .content-wrapper h3 {
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1.5rem;
}

.game-info-block .content-wrapper ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.game-info-block .content-wrapper li {
    margin-bottom: 0.5rem;
}

/* ===== FULLSCREEN GAME ===== */
.js-game-container:fullscreen,
.js-game-container:-webkit-full-screen {
    max-width: none !important;
    width: 100vw !important;
    height: 100vh !important;
    border: none !important;
    background: #0f172a !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

.js-game-container:fullscreen .relative,
.js-game-container:-webkit-full-screen .relative {
    width: 100% !important;
    height: 100% !important;
    max-width: 1600px !important;
}

.js-game-container:fullscreen iframe,
.js-game-container:-webkit-full-screen iframe {
    width: 100% !important;
    height: 100% !important;
}

.js-game-container:fullscreen .game-controls,
.js-game-container:-webkit-full-screen .game-controls {
    z-index: 9999 !important;
}

.js-game-container:fullscreen .js-exit-fullscreen,
.js-game-container:-webkit-full-screen .js-exit-fullscreen {
    display: flex !important;
}

.js-game-container:fullscreen .js-fullscreen-btn,
.js-game-container:-webkit-full-screen .js-fullscreen-btn {
    display: none !important;
}
