* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --ak-bg: #0B1220;
    --ak-bg-deep: #020617;
    --ak-card: rgba(17, 24, 39, 0.82);
    --ak-card-solid: #111827;
    --ak-border: rgba(148, 163, 184, 0.18);
    --ak-border-strong: #1F2937;
    --ak-green: #70E763;
    --ak-green-deep: #22C55E;
    --ak-green-soft: rgba(112, 231, 99, 0.35);
    --ak-orange: #FF8423;
    --ak-purple: #8074FF;
    --ak-text: #F9FAFB;
    --ak-muted: #9CA3AF;
    --ak-dim: #6B7280;
    --ak-radius-xl: 28px;
    --ak-radius-lg: 22px;
    --ak-radius-md: 16px;
    --ak-visual-height: 100dvh;
    --ak-keyboard-inset: 0px;
}

body.ak-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% -5%, rgba(112, 231, 99, 0.16), transparent 30%),
        radial-gradient(circle at 10% 18%, rgba(59, 130, 246, 0.12), transparent 28%),
        linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
    color: var(--ak-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
}

html.ak-game-active,
body.ak-game-active {
    width: 100%;
    height: var(--ak-visual-height, 100dvh);
    overflow: hidden;
    overscroll-behavior: none;
}

body.ak-game-active {
    position: fixed;
    inset: 0;
}

.ak-container {
    position: relative;
    width: min(100%, 430px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 38px 20px 128px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 31%, rgba(112, 231, 99, 0.12), transparent 10%),
        radial-gradient(circle at 76% 33%, rgba(112, 231, 99, 0.11), transparent 13%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.98));
}

.ak-container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 50% 20%, black 0%, transparent 68%);
}

.ak-container > * {
    position: relative;
    z-index: 1;
}

.ak-app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
}

.ak-wordmark {
    display: grid;
    gap: 4px;
}

.ak-wordmark-row {
    display: grid;
    grid-template-columns: repeat(4, 27px);
    gap: 4px;
}

.ak-wordmark span {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: linear-gradient(145deg, #273142, #121927);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 16px rgba(0, 0, 0, 0.22);
    color: white;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0;
}

.ak-wordmark-row-accent span {
    background: linear-gradient(145deg, #8cf27b, #45c95b);
    color: #083017;
}

.ak-player-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24), 0 0 24px rgba(112, 231, 99, 0.12);
}

.ak-avatar-wrap {
    position: relative;
}

.ak-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #04110b;
    font-size: 14px;
    font-weight: 900;
    background: radial-gradient(circle at 35% 25%, white, #98f18b 54%, #17202e 56%);
    border: 3px solid rgba(112, 231, 99, 0.75);
}

.ak-level-badge {
    position: absolute;
    right: -8px;
    bottom: -3px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #0B1220;
    border: 2px solid var(--ak-green);
    color: var(--ak-green);
    font-size: 12px;
    font-weight: 800;
}

.ak-points-bolt {
    color: var(--ak-green);
    font-size: 32px;
    line-height: 1;
    filter: drop-shadow(0 0 12px var(--ak-green-soft));
}

.ak-points-copy {
    display: grid;
    line-height: 1.1;
}

.ak-points-copy strong {
    color: white;
    font-size: 26px;
    font-weight: 900;
}

.ak-points-copy span {
    color: var(--ak-muted);
    font-size: 15px;
}

.ak-header {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.ak-title {
    display: grid;
    gap: 2px;
    color: white;
    font-size: clamp(34px, 10vw, 48px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: 0;
    text-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
}

.ak-title span:last-child {
    color: var(--ak-green);
}

.ak-subtitle {
    max-width: 340px;
    margin: 16px auto 0;
    color: #CBD5E1;
    font-size: 20px;
    line-height: 1.35;
}

.ak-hero-sparkle,
.ak-hero-dot {
    position: absolute;
    color: var(--ak-green);
    filter: drop-shadow(0 0 14px var(--ak-green-soft));
}

.ak-sparkle-one {
    left: 7%;
    top: 32%;
    font-size: 22px;
}

.ak-sparkle-two {
    right: 13%;
    top: 10%;
    font-size: 18px;
}

.ak-hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ak-green);
}

.ak-dot-one {
    left: 14%;
    bottom: 17%;
}

.ak-dot-two {
    right: 9%;
    bottom: 10%;
}

.ak-input-section,
.ak-game-section,
.ak-daily-card,
.ak-stats-card {
    width: 100%;
    border: 1px solid var(--ak-border);
    background:
        linear-gradient(145deg, rgba(17, 24, 39, 0.88), rgba(8, 15, 28, 0.82)),
        url("../assets/wordhunt/card-default.png") center / cover;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
}

.ak-input-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border-radius: var(--ak-radius-lg);
    margin-bottom: 22px;
}

.ak-setup-eyebrow {
    grid-column: 1 / -1;
    color: var(--ak-green);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ak-form-group {
    width: 100%;
}

.ak-word-field,
.ak-category-field,
.ak-input-section .ak-button-primary {
    grid-column: 1 / -1;
}

.ak-random-field,
.ak-hint-field {
    grid-column: 1 / -1;
}

.ak-section-text,
.ak-modal-text,
.ak-used-letters-title {
    display: block;
    margin-bottom: 5px;
    color: #D1D5DB;
    font-size: 13px;
    font-weight: 750;
}

.ak-input,
.ak-select {
    width: 100%;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.62);
    color: var(--ak-text);
    font-size: 16px;
    appearance: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ak-input::placeholder {
    color: rgba(156, 163, 175, 0.72);
}

.ak-input:disabled {
    background: rgba(15, 23, 42, 0.8) !important;
    color: var(--ak-muted);
}

.ak-input:focus,
.ak-select:focus {
    border-color: rgba(112, 231, 99, 0.76);
    box-shadow: 0 0 0 4px rgba(112, 231, 99, 0.14);
    outline: none;
}

.ak-select {
    background-image:
        linear-gradient(45deg, transparent 50%, #70E763 50%),
        linear-gradient(135deg, #70E763 50%, transparent 50%);
    background-position:
        calc(100% - 19px) 21px,
        calc(100% - 13px) 21px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

.ak-checkbox-group,
.ak-checkbox-wrapper {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.44);
    cursor: pointer;
}

.ak-checkbox {
    width: 19px;
    height: 19px;
    accent-color: var(--ak-green);
    cursor: pointer;
}

.ak-checkbox-label,
.ak-checkbox-text {
    color: #D1D5DB;
    font-size: 13px;
    font-weight: 650;
}

.ak-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(112, 231, 99, 0.55);
    border-radius: 7px;
    flex: 0 0 auto;
}

.ak-checkbox-wrapper .ak-checkbox {
    position: absolute;
    opacity: 0;
}

.ak-checkbox:checked + .ak-checkmark {
    background: linear-gradient(135deg, var(--ak-green), #3ed451);
    border-color: var(--ak-green);
    box-shadow: 0 0 18px var(--ak-green-soft);
}

.ak-button,
.ak-btn {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--ak-text);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.ak-button:active,
.ak-btn:active,
.ak-menu-item:active {
    transform: scale(0.98);
}

.ak-button-primary {
    min-height: 70px;
    justify-content: flex-start;
    padding: 12px 26px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent),
        linear-gradient(135deg, #9AF68D, #58D856);
    color: #06130b;
    box-shadow: 0 0 38px rgba(112, 231, 99, 0.36), 0 18px 30px rgba(0, 0, 0, 0.24);
}

.ak-button-primary:hover {
    filter: brightness(1.04);
    box-shadow: 0 0 46px rgba(112, 231, 99, 0.44), 0 18px 34px rgba(0, 0, 0, 0.3);
}

.ak-start-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #07111f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    flex: 0 0 auto;
}

.ak-start-icon img {
    width: 30px;
    height: 30px;
}

.ak-start-copy {
    display: grid;
    text-align: left;
    line-height: 1.15;
}

.ak-start-copy strong {
    font-size: 22px;
    letter-spacing: 0;
}

.ak-start-copy small {
    margin-top: 5px;
    color: rgba(6, 19, 11, 0.72);
    font-size: 15px;
    font-weight: 750;
}

.ak-button-secondary,
.ak-btn-secondary {
    padding: 12px 16px;
    background: rgba(31, 41, 55, 0.9);
    color: var(--ak-text);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.ak-button-word-guess {
    width: 100%;
    margin-top: 12px;
    padding: 13px 16px;
    background: linear-gradient(135deg, rgba(255, 132, 35, 0.95), #F59E0B);
    color: #101014;
    box-shadow: 0 12px 24px rgba(255, 132, 35, 0.18);
}

.ak-daily-card {
    border-radius: var(--ak-radius-xl);
    padding: 18px;
    margin-bottom: 18px;
}

.ak-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--ak-green);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.ak-card-timer {
    color: #CBD5E1;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0;
}

.ak-daily-content {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 64px;
    align-items: center;
    gap: 14px;
}

.ak-trophy-visual {
    font-size: 64px;
    line-height: 1;
    filter: drop-shadow(0 13px 20px rgba(245, 158, 11, 0.2));
}

.ak-daily-copy h2 {
    color: white;
    font-size: 21px;
    line-height: 1.1;
    margin-bottom: 9px;
}

.ak-daily-copy p {
    color: #CBD5E1;
    font-size: 17px;
}

.ak-daily-copy p strong {
    color: var(--ak-green);
}

.ak-progress-track {
    height: 8px;
    margin: 17px 0 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.ak-progress-fill {
    width: 60%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #86EFAC, var(--ak-green));
    box-shadow: 0 0 18px var(--ak-green-soft);
}

.ak-progress-empty {
    width: 0;
    box-shadow: none;
}

.ak-daily-copy span {
    color: #CBD5E1;
    font-size: 16px;
}

.ak-gift-tile {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: rgba(31, 41, 55, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.ak-gift-tile img {
    width: 38px;
    height: 38px;
}

.ak-stats-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-radius: var(--ak-radius-xl);
    margin-bottom: 30px;
    padding: 20px 0;
}

.ak-stat-item {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 4px 8px;
}

.ak-stat-item + .ak-stat-item {
    border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.ak-stat-item img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 16px rgba(112, 231, 99, 0.18));
}

.ak-stat-item strong {
    margin-top: 4px;
    color: white;
    font-size: 31px;
    line-height: 1;
    font-weight: 950;
}

.ak-stat-item span {
    color: #CBD5E1;
    font-size: 14px;
    text-align: center;
}

.ak-how-to-play {
    text-align: center;
    margin-bottom: 8px;
}

.ak-how-to-play h2 {
    margin-bottom: 20px;
    color: white;
    font-size: 22px;
    line-height: 1;
    font-weight: 950;
}

.ak-how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ak-how-item {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

.ak-how-item > span {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(31, 41, 55, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ak-how-item img {
    width: 42px;
    height: 42px;
}

.ak-how-item strong {
    color: white;
    font-size: 14px;
    line-height: 1.12;
}

.ak-how-item p {
    color: #CBD5E1;
    font-size: 13px;
    line-height: 1.32;
}

.ak-footer-menu {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 1000;
    width: min(calc(100% - 28px), 408px);
    height: 84px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 8px 12px;
    border-radius: 31px;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(2, 6, 23, 0.92)),
        url("../assets/wordhunt/nav-bar-bg.png") center / cover;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
}

body.ak-game-active .ak-footer-menu {
    display: none;
}

.ak-menu-item {
    min-width: 0;
    height: 68px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: var(--ak-muted);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.ak-menu-item img {
    width: 26px;
    height: 26px;
    opacity: 0.78;
    filter: grayscale(0.2);
}

.ak-menu-item span {
    display: block;
    white-space: nowrap;
}

.ak-menu-item.ak-active,
.ak-menu-item:hover {
    color: #B7F7AB;
}

.ak-nav-home.ak-active {
    background: rgba(112, 231, 99, 0.12);
    box-shadow: inset 0 0 22px rgba(112, 231, 99, 0.12);
}

.ak-menu-play {
    transform: translateY(-17px);
    color: #B7F7AB;
}

.ak-menu-play:active {
    transform: translateY(-17px) scale(0.98);
}

.ak-nav-play-circle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid !important;
    place-items: center;
    background: linear-gradient(135deg, #93F184, #55D856);
    box-shadow: 0 0 28px rgba(112, 231, 99, 0.44), 0 12px 24px rgba(0, 0, 0, 0.25);
}

.ak-nav-play-circle img {
    width: 36px;
    height: 36px;
    opacity: 1;
}

.ak-menu-profile img {
    opacity: 0.68;
}

.ak-game-section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
    border-radius: var(--ak-radius-xl);
    margin-bottom: 20px;
}

body.ak-game-active .ak-container {
    width: min(100%, 430px);
    height: var(--ak-visual-height, 100dvh);
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

body.ak-game-active .ak-container > :not(.ak-game-section):not(.ak-modal):not(.ak-language-mega-menu):not(#ak-error) {
    display: none !important;
}

body.ak-game-active .ak-game-section {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: auto;
    bottom: max(10px, calc(var(--ak-keyboard-inset, 0px) + env(safe-area-inset-bottom)));
    left: 50%;
    width: min(calc(100vw - 20px), 410px);
    z-index: 1200;
    min-height: 0;
    max-height: calc(var(--ak-visual-height, 100dvh) - 20px - var(--ak-keyboard-inset, 0px));
    margin: 0;
    padding: 14px;
    gap: 10px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(84px, 0.9fr) auto minmax(76px, 0.75fr) auto;
    transform: translateX(-50%);
    border-radius: 24px;
}

body.ak-game-active .ak-game-header {
    grid-row: 1;
}

.ak-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 42px;
}

.ak-category-badge,
.ak-timer {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ak-green);
    background: rgba(112, 231, 99, 0.1);
    border: 1px solid rgba(112, 231, 99, 0.18);
    font-size: 14px;
    font-weight: 800;
}

.ak-timer {
    color: #FDE68A;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.ak-timer.ak-urgent {
    color: #FCA5A5;
    background: rgba(239, 68, 68, 0.14);
    animation: ak-pulse 1.2s infinite;
}

.ak-word-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    min-height: 72px;
    padding: 8px 0;
}

body.ak-game-active .ak-word-display {
    grid-row: 2;
    min-height: 84px;
    max-height: 150px;
    align-content: center;
    overflow: hidden;
    padding: 6px 0;
}

.ak-letter-box {
    width: 42px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.58);
    color: rgba(249, 250, 251, 0.5);
    font-size: 24px;
    font-weight: 900;
}

body.ak-game-active .ak-letter-box {
    width: clamp(32px, 9vw, 42px);
    height: clamp(38px, 10vw, 48px);
    font-size: clamp(18px, 5vw, 24px);
}

.ak-letter-box.ak-revealed {
    color: #06130b;
    background: linear-gradient(135deg, #9AF68D, #58D856);
    box-shadow: 0 0 18px rgba(112, 231, 99, 0.24);
}

.ak-guess-section {
    display: grid;
    gap: 10px;
}

body.ak-game-active .ak-guess-section {
    grid-row: 4;
    align-self: end;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(112, 231, 99, 0.16);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.58);
    box-shadow: 0 0 28px rgba(112, 231, 99, 0.08);
}

.ak-guess-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 10px;
}

body.ak-game-active .ak-guess-input {
    grid-template-columns: minmax(0, 1fr) 58px;
    align-items: stretch;
}

body.ak-game-active .ak-guess-input .ak-input,
body.ak-game-active .ak-guess-input .ak-button {
    height: 56px;
    min-height: 56px;
}

body.ak-game-active .ak-guess-input .ak-input {
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
}

body.ak-game-active #ak-guess-btn {
    width: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, #9AF68D, #58D856);
    color: #06130b;
    box-shadow: 0 0 22px rgba(112, 231, 99, 0.22);
}

.ak-guess-input .ak-button {
    padding: 0;
}

.ak-used-letters {
    display: grid;
    gap: 8px;
}

body.ak-game-active .ak-used-letters {
    grid-row: 3;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
}

.ak-letters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.ak-game-active .ak-letters-container {
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
}

body.ak-game-active #ak-result,
body.ak-game-active #ak-error {
    grid-row: 5;
}

body.ak-game-active #ak-error:not(.ak-hidden) {
    position: fixed;
    left: max(14px, calc((100vw - 430px) / 2 + 14px));
    right: max(14px, calc((100vw - 430px) / 2 + 14px));
    bottom: max(14px, calc(var(--ak-keyboard-inset, 0px) + env(safe-area-inset-bottom) + 14px));
    z-index: 1400;
}

.ak-letter-badge {
    min-width: 30px;
    min-height: 30px;
    display: grid;
    place-items: center;
    padding: 4px 8px;
    border-radius: 9px;
    color: var(--ak-text);
    background: rgba(31, 41, 55, 0.86);
    font-size: 14px;
    font-weight: 800;
}

.ak-letter-badge.ak-correct {
    background: rgba(34, 197, 94, 0.22);
    color: #BBF7D0;
}

.ak-letter-badge.ak-incorrect {
    background: rgba(239, 68, 68, 0.2);
    color: #FECACA;
}

.ak-result,
.ak-error,
.ak-attempts-info {
    padding: 13px 14px;
    border-radius: 14px;
    color: #FECACA;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.22);
    font-size: 14px;
    font-weight: 750;
    text-align: center;
}

.ak-result.ak-win,
.ak-game-result-message.ak-win {
    color: #BBF7D0;
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.26);
}

.ak-result.ak-lose,
.ak-game-result-message.ak-lose {
    color: #FECACA;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.24);
}

.ak-restart-btn,
#ak-restart-btn {
    width: 100%;
    margin-bottom: 16px;
}

.ak-hidden {
    display: none !important;
}

.ak-modal,
.ak-language-mega-menu {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.ak-modal-overlay,
.ak-mega-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.ak-modal-content,
.ak-mega-menu-content {
    position: absolute;
    left: 50%;
    bottom: 106px;
    width: min(calc(100% - 32px), 398px);
    max-height: min(78vh, 620px);
    overflow: hidden;
    transform: translateX(-50%);
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.ak-modal-content {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
}

.ak-modal-header,
.ak-mega-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ak-modal-header h3,
.ak-mega-menu-header h3 {
    color: white;
    font-size: 18px;
}

.ak-close-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--ak-muted);
    background: rgba(31, 41, 55, 0.72);
    cursor: pointer;
}

.ak-modal-body {
    max-height: calc(78vh - 75px);
    overflow-y: auto;
    padding: 20px;
}

.ak-modal-body h4 {
    margin: 18px 0 7px;
    color: var(--ak-green);
}

.ak-modal-body h4:first-child {
    margin-top: 0;
}

.ak-modal-body p,
.ak-modal-body a {
    color: #CBD5E1;
}

.ak-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.ak-modal-actions .ak-btn:only-child {
    grid-column: 1 / -1;
}

.ak-btn-primary {
    padding: 12px 16px;
    color: #06130b;
    background: linear-gradient(135deg, #9AF68D, #58D856);
}

.ak-game-result-message,
.ak-game-result-word {
    margin-bottom: 12px;
}

.ak-game-result-word {
    padding: 14px;
    border-radius: 14px;
    color: white;
    background: rgba(2, 6, 23, 0.54);
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.ak-language-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 18px;
}

.ak-language-item {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 14px 10px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.36);
    cursor: pointer;
}

.ak-language-item.ak-active,
.ak-language-item:hover {
    border-color: rgba(112, 231, 99, 0.5);
    background: rgba(112, 231, 99, 0.1);
}

.ak-language-flag {
    font-size: 28px;
}

.ak-language-name {
    color: #D1D5DB;
    font-size: 14px;
    font-weight: 700;
}

@keyframes ak-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

@media (min-width: 700px) {
    body.ak-body {
        padding: 28px 0;
        align-items: center;
    }

    .ak-container {
        min-height: min(932px, calc(100vh - 56px));
        max-height: none;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 42px;
        box-shadow: 0 40px 100px rgba(0, 0, 0, 0.42);
    }
}

@media (min-width: 520px) and (max-width: 699px) {
    .ak-container {
        width: min(100%, 520px);
    }

    .ak-footer-menu {
        width: min(calc(100% - 32px), 498px);
    }
}

@media (max-width: 390px) {
    .ak-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .ak-app-topbar {
        gap: 10px;
        margin-bottom: 40px;
    }

    .ak-player-pill {
        gap: 8px;
        padding-right: 9px;
    }

    .ak-avatar {
        width: 46px;
        height: 46px;
    }

    .ak-points-copy strong {
        font-size: 22px;
    }

    .ak-points-copy span {
        font-size: 13px;
    }

    .ak-title {
        font-size: 34px;
    }

    .ak-subtitle {
        font-size: 18px;
    }

    .ak-daily-content {
        grid-template-columns: 62px minmax(0, 1fr) 50px;
        gap: 10px;
    }

    .ak-trophy-visual {
        font-size: 48px;
    }

    .ak-gift-tile {
        width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    .ak-gift-tile img {
        width: 30px;
        height: 30px;
    }

    .ak-how-item > span {
        width: 58px;
        height: 58px;
    }

    .ak-how-item img {
        width: 34px;
        height: 34px;
    }

    .ak-menu-item {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
