@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,650;1,6..72,650&display=swap");

@font-face {
    font-family: "Outfit-Regular";
    src: url("/strands-game/fonts/Outfit-Regular.woff2") format("woff2");
}
@font-face {
    font-family: "Outfit-SemiBold";
    src: url("/strands-game/fonts/Outfit-SemiBold.woff2") format("woff2");
}

html {
    --ink: #121212;
    --muted: #5c5c56;
    --line: #e2e2de;
    --paper: #ffffff;
    --sand: #f6f4ef;
    --yellow: #f7d64a;
    --theme-blue: #85c4e4;
    --on-accent: #121212;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 320px;
    min-height: 100svh;
    background: var(--paper);
    font-family: "Libre Franklin", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#root {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    background: var(--paper);
}

.div {
    min-height: 0;
    padding: 8px 16px 12px;
    --primary: var(--ink);
    --bg: var(--paper);
    --gray: var(--sand);
    --buttonGray: var(--sand);
    --buttonGrayBorder: var(--ink);
}

.div.dark-theme-on {
    --bg: #121212;
    --primary: #ecece8;
    --ink: #ecece8;
    --paper: #121212;
    --sand: #1c1c1a;
    --muted: #b7b7b0;
    --line: #333330;
    --gray: #1c1c1a;
    --buttonGray: #1c1c1a;
    --buttonGrayBorder: #ecece8;
    --theme-blue: #5aa8c8;
}

h1, h2, h3, h4, h5, h6, span, input, button, p, a, div {
    font-family: "Libre Franklin", Helvetica, Arial, sans-serif;
}

a {
    color: inherit;
    font-weight: 650;
}

a:hover {
    color: inherit;
}

.header {
    max-width: 1188px;
    padding: 8px 4px 12px;
    border-bottom: 1px solid var(--line);
}

.header .logo h5 {
    font-family: "Newsreader", Georgia, serif !important;
    font-weight: 650 !important;
    font-style: italic;
    letter-spacing: -0.02em;
    font-size: 1.85rem;
    line-height: 1;
}

.header__right {
    gap: 4px;
    margin-left: 12px;
}

.header__right .ant-btn,
.header__right .ant-btn-icon-only,
.ant-btn-icon-only,
.ant-select-selector {
    background: transparent !important;
    box-shadow: none !important;
}

.header__right .ant-btn {
    border: 0 !important;
    width: 36px;
    height: 36px;
}

.ant-select-selector {
    border: 1px solid var(--ink) !important;
    border-radius: 999px !important;
    height: 40px !important;
    padding: 0 14px !important;
    background: transparent !important;
}

.ant-select-selection-item {
    font-family: "Libre Franklin", Helvetica, Arial, sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.ant-select-arrow {
    color: var(--ink) !important;
}

.nickname-block label {
    background: transparent;
    border: 1px solid var(--ink);
    border-radius: 999px;
    padding: 8px 10px 8px 20px;
}

.nickname-block input {
    font-weight: 650;
    font-size: 1rem;
}

.nickname-block button {
    background: var(--ink);
}

.nickname-block button > svg {
    fill: var(--paper);
}

.main-block h4,
.main-block .lobby-status,
.game-block__result > h3 {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.main-block p,
.main-block > p {
    font-weight: 500;
    color: var(--muted);
}

.double-text-button,
.green-button,
.red-button,
.blue-button,
.full-button,
.cancel-button,
.invite-block > div button,
.lime-button,
.game-block__result > button,
.stats-block > button {
    border-radius: 999px !important;
    border: 1px solid var(--ink) !important;
    border-bottom: 1px solid var(--ink) !important;
    box-shadow: none !important;
    text-transform: none;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.double-text-button {
    height: auto;
    min-height: 52px;
    padding: 10px 22px;
    width: 280px;
}

.double-text-button:active,
.green-button:active,
.red-button:active,
.blue-button:active,
.cancel-button:active,
.invite-block > div button:active,
.lime-button:active {
    transform: none;
    height: auto;
    margin-bottom: 0;
    border-bottom: 1px solid var(--ink) !important;
}

.green-button,
.double-text-button.green-button {
    background: var(--ink);
    color: var(--paper);
}

.green-button h5,
.green-button p,
.double-text-button.green-button h5,
.double-text-button.green-button p {
    color: var(--paper);
}

.red-button,
.double-text-button.red-button {
    background: transparent;
    color: var(--ink);
}

.red-button h5,
.red-button p,
.double-text-button.red-button h5,
.double-text-button.red-button p {
    color: var(--ink);
}

.blue-button,
.double-text-button.blue-button {
    background: transparent;
    color: var(--ink);
}

.blue-button h5,
.blue-button p {
    color: var(--ink);
}

.double-text-button h5,
.double-text-button.full-button {
    text-transform: none;
    font-weight: 650;
    width: auto;
}

.cancel-button,
.invite-block > div button {
    background: transparent;
    font-weight: 650;
    padding: 8px 18px;
}

.cancel-button.selected,
.invite-block > div button.selected {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.lime-button {
    background: var(--ink);
    color: var(--paper);
    border-radius: 999px;
    width: auto;
    min-width: 150px;
    padding: 12px 22px;
}

.div.dark-theme-on .lime-button {
    background: #ecece8;
    color: #121212;
    border-color: #ecece8;
}

.invite-block > input {
    background: transparent;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-weight: 500;
}

.game-block__field > div > a {
    font-family: "Outfit-Regular", sans-serif !important;
    font-weight: 400 !important;
}

.game-block__topic > p {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 650;
    font-size: 1.15rem;
}

.settings-block__popup {
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 12px 40px rgba(18, 18, 18, 0.12);
}

.settings-block__popup__header {
    background: var(--ink);
}

.settings-block__popup__header > p,
.popupOver__header > h5 {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 650;
    color: var(--paper);
}

.game-block__result > button,
.stats-block > button {
    background: var(--ink);
    color: var(--paper);
    border-radius: 999px;
    font-weight: 650;
}

.game-block__words > a {
    border-radius: 999px;
}

.bottom-share {
    background: var(--sand);
    border: 1px solid var(--line);
    border-radius: 0;
}

/* Mode pills under the game */
.mode-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px 36px;
    flex-wrap: wrap;
    background: var(--paper);
}

.mode-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    padding: 10px 18px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.02em;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font-family: "Libre Franklin", Helvetica, Arial, sans-serif;
}

.mode-pill:hover {
    background: var(--sand);
    color: var(--ink);
}

.mode-pill.is-active {
    background: var(--ink);
    color: var(--paper);
}

@media (max-width: 768px) {
    .header {
        border-bottom: none;
    }
}

@media (max-width: 640px) {
    .mode-pill {
        min-width: 0;
        flex: 1;
    }
}

body:has(.dark-theme-on) {
    --ink: #ecece8;
    --muted: #b7b7b0;
    --line: #333330;
    --paper: #121212;
    --sand: #1c1c1a;
    background: #121212;
}

body:has(.dark-theme-on) .mode-bar {
    background: #121212;
}

body:has(.dark-theme-on) .mode-pill {
    color: #ecece8;
    border-color: #ecece8;
}

body:has(.dark-theme-on) .mode-pill:hover {
    background: #1c1c1a;
    color: #ecece8;
}

body:has(.dark-theme-on) .mode-pill.is-active {
    background: #ecece8;
    color: #121212;
}

.game-block__field a {
    color: var(--primary);
}
.div.dark-theme-on .game-block__field a[style*="247, 214"],
.div.dark-theme-on .game-block__field a[style*="f7d64a"],
.div.dark-theme-on .game-block__field a[style*="133, 196"],
.div.dark-theme-on .game-block__field a[style*="85c4e4"] {
    color: #121212 !important;
}
