/* public/assets/css/style.css */

:root {
    --bg-body: #eef2f7;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #e9eef5;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-soft: #94a3b8;

    --brand-primary: #4f46e5;
    --brand-primary-hover: #4338ca;
    --brand-accent: #e11d48;

    --grid-bg: #1e293b;
    --cell-empty: #ffffff;
    --cell-black: #1e293b;
    --cell-correct: #10b981;
    --cell-wrong: #ef4444;
    --cell-active-bg: #fef08a;
    --cell-active-border: #eab308;

    --kb-bg: #dde5ef;
    --key-bg: #ffffff;
    --key-text: #0f172a;
    --key-shadow: 0 2px 0 rgba(100, 116, 139, 0.28);
    --key-action-bg: #94a3b8;
    --key-solve: #10b981;
    --key-dir: #f59e0b;

    --line: #dbe3ef;
    --shadow-xs: 0 4px 14px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 12px 30px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 20px 50px rgba(15, 23, 42, 0.08);

    --header-h: 68px;
    --page-max: 1180px;
    --content-max: 1100px;
    --reading-max: 860px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 20px;
    --space-5: 24px;
    --space-6: 30px;
    --space-7: 40px;
    --space-8: 56px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, #f8fbff 0%, var(--bg-body) 140px, var(--bg-body) 100%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: clip;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease, transform .2s ease;
}

button,
input,
select {
    font: inherit;
    outline: none;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

.hidden {
    display: none !important;
}

.page-shell {
    width: min(100% - 24px, var(--content-max));
    margin: 0 auto;
}

.page-flow {
display: flex;
flex-direction: column;
gap: var(--space-6);
padding-top: 12px;
padding-bottom: 24px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    font-size: .82rem;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: .2px;
    margin-bottom: 6px;
}

.section-title {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.breadcrumb-wrap {
    border-top: 1px solid rgba(219, 227, 239, 0.7);
}

.breadcrumb {
    padding: 12px 0 0;
    font-size: .9rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(219, 227, 239, .8);
}

.header-inner {
    width: min(100% - 24px, var(--page-max));
    margin: 0 auto;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    font-weight: 900;
    font-size: 1.35rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.logo svg {
    width: 24px;
    height: 24px;
    fill: var(--brand-primary);
    flex-shrink: 0;
}

.logo span {
    color: var(--text-dark);
}

.logo .red {
    color: var(--brand-accent);
}

.desktop-nav {
    display: none;
}

.desktop-nav a {
    font-size: .95rem;
    font-weight: 800;
    color: var(--text-muted);
    padding: 10px 14px;
    border-radius: 999px;
}

.desktop-nav a:hover,
.desktop-nav a.is-current {
    background: #eff3fb;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .92rem;
    font-weight: 800;
    color: var(--text-muted);
}

.auth-links a:hover {
    color: var(--brand-primary);
}

.auth-links .auth-strong {
    color: var(--brand-primary);
}

.auth-sep {
    opacity: .35;
}

.menu-icon {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: #f8fbff;
    border-radius: 14px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    box-shadow: var(--shadow-xs);
}

.menu-icon:active {
    transform: scale(.98);
}

.mobile-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    padding: 18px;
    display: grid;
    gap: 18px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: .24s ease;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-group {
    display: grid;
    gap: 10px;
}

.mobile-menu-title {
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-soft);
    padding: 0 4px;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 52px;
    background: var(--surface-soft);
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 0 16px;
    font-weight: 800;
    color: var(--text-dark);
}

.mobile-menu a:active,
.mobile-menu a:hover {
    background: #eef4ff;
    border-color: #dbe4ff;
    color: var(--brand-primary);
}

/* =========================================================
   HERO / HOME
   ========================================================= */
.hero-card,
.score-page-card,
.archive-block,
.archive-grid-wrapper,
.archive-stats-card,
.archive-clues-box,
.seo-content,
.profile-card,
.not-found-card {
    background: var(--surface);
    border: 1px solid rgba(219, 227, 239, 0.95);
    border-radius: 28px;
    box-shadow: var(--shadow-sm);
}

.hero-card {
    background: linear-gradient(135deg, #4f46e5 0%, #5b52f3 38%, #7c3aed 100%);
    color: #fff;
    padding: 34px 22px;
    overflow: hidden;
}

.hero-kicker {
    display: inline-flex;
    font-size: .84rem;
    font-weight: 900;
    opacity: .92;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-copy h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.05em;
    margin-bottom: 12px;
}

.hero-copy p {
    font-size: 1rem;
    max-width: 640px;
    opacity: .95;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
    max-width: 340px;
}

.hero-btn {
    min-height: 56px;
    border-radius: 18px;
    padding: 0 18px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-btn.primary {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.16);
}

.hero-btn.secondary {
    background: rgba(255, 255, 255, .17);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .22);
}

.hero-btn:hover {
    transform: translateY(-1px);
}

/* =========================================================
   LEADERBOARD
   ========================================================= */
.leaderboard-card {
    background: var(--surface);
    border: 1px solid rgba(219, 227, 239, .95);
    border-radius: 28px;
    box-shadow: var(--shadow-sm);
    padding: 18px;
}

.leaderboard-card.compact {
    padding: 18px;
}

.leaderboard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.leaderboard-kicker {
    display: inline-flex;
    font-size: .82rem;
    font-weight: 900;
    color: var(--brand-primary);
    margin-bottom: 6px;
    letter-spacing: .02em;
}

.leaderboard-title {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.leaderboard-subtitle {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: .95rem;
    font-weight: 600;
}

.leaderboard-meta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--brand-primary);
    font-size: .86rem;
    font-weight: 900;
}

.leaderboard-list {
    display: grid;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.leaderboard-item.top3 {
    background: linear-gradient(180deg, #eff5ff 0%, #f8fbff 100%);
    border-color: #d8e4ff;
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.leaderboard-rank {
    width: 28px;
    text-align: right;
    font-size: 1rem;
    font-weight: 900;
    color: var(--text-muted);
    flex-shrink: 0;
}

.leaderboard-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    object-fit: cover;
    flex-shrink: 0;
}

.leaderboard-user-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.leaderboard-username {
    font-size: 1rem;
    font-weight: 900;
    color: var(--brand-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.leaderboard-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--line);
    font-size: .78rem;
    font-weight: 900;
}

.leaderboard-score-meta {
    display: grid;
    gap: 2px;
    text-align: right;
    flex-shrink: 0;
}

.leaderboard-score-meta strong {
    font-size: 1rem;
    color: var(--brand-primary);
    font-weight: 900;
}

.leaderboard-score-meta span {
    font-size: .84rem;
    color: var(--text-muted);
    font-weight: 700;
}

.leaderboard-empty {
    text-align: center;
    padding: 24px 16px;
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--text-muted);
    font-weight: 800;
}

.rank-callout {
    margin-top: 16px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #6257f5 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rank-callout.guest {
    background: linear-gradient(135deg, #111827 0%, #243146 100%);
}

.rank-callout-left {
    display: grid;
    gap: 4px;
}

.rank-callout-kicker {
    font-size: .8rem;
    font-weight: 900;
    opacity: .84;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.rank-callout strong {
    font-size: 1.22rem;
    font-weight: 900;
    line-height: 1.1;
}

.rank-callout span:last-child {
    font-size: .92rem;
    font-weight: 600;
    opacity: .92;
}

.rank-callout-link {
    flex-shrink: 0;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

/* =========================================================
   SCORE PAGE
   ========================================================= */
.score-shell {
    padding-bottom: 56px;
}

.score-page-card {
    padding: 22px;
}

.score-page-title {
    font-size: clamp(1.65rem, 2.5vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.score-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: #f4f7fb;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 8px;
    margin-bottom: 18px;
}

.score-tab {
    min-height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    font-weight: 900;
    color: var(--text-muted);
    text-align: center;
}

.score-tab.active {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: var(--shadow-xs);
}

.pagination {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn,
.pagination-page {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: var(--text-dark);
}

.pagination-page.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.pagination-dots {
    color: var(--text-muted);
    font-weight: 900;
    padding: 0 2px;
}

/* =========================================================
   GAME AREA
   ========================================================= */
.puzzle-shell {
    gap: 22px;
}

.game-layout {
    display: grid;
    gap: 22px;
}

.game-top-meta {
    padding: 0 2px;
}

.page-title {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.02;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: .98rem;
    color: var(--text-muted);
    line-height: 1.55;
    font-weight: 600;
    max-width: 680px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 900;
    margin-top: 14px;
    margin-bottom: 24px;
    letter-spacing: .02em;
}

.status-pill.saved {
    background: #d1fae5;
    color: #047857;
}

.status-pill.fresh {
    background: #fef3c7;
    color: #b45309;
}

.game-play-area {
    background: var(--surface);
    border: 1px solid rgba(219, 227, 239, .95);
    border-radius: 28px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.mini-clue-panel {
    background: var(--surface);
    padding: 16px 16px 12px;
    position: relative;
    z-index: 4;
}

.mini-clue-box.compact {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-clue-top {
    background: var(--brand-primary);
    color: #fff;
    border-radius: 14px;
    padding: 8px 10px;
    min-width: 76px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.mini-clue-badge {
    font-weight: 900;
    font-size: .8rem;
}

.mini-direction {
    font-size: .68rem;
    font-weight: 700;
    opacity: .94;
    margin-top: 2px;
}

.mini-clue-text {
    flex: 1;
    font-size: .95rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.32;
}

.mini-answer-meta {
    background: #fff;
    border: 1px solid var(--line);
    padding: 8px 10px;
    border-radius: 14px;
    text-align: center;
    font-weight: 900;
    color: var(--brand-primary);
    font-size: .95rem;
    min-width: 54px;
}

.mini-answer-meta span {
    display: block;
    font-size: .62rem;
    font-weight: 800;
    color: var(--text-muted);
}

.game-area {
    padding: 8px 16px 18px;
    background: var(--surface);
    position: relative;
}

.grid-stack {
    width: min(100%, 520px);
    margin: 0 auto;
    position: relative;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 2px;
    background-color: var(--grid-bg);
    border: 2px solid var(--grid-bg); /* Kaba siyah çerçeveyi zarifleştirdik */
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px; /* Köşeleri tatlı bir kavisle yumuşattık */
    overflow: hidden; /* İŞTE SİHİR BURADA: Köşelerdeki o sivri beyaz hücreleri dış çerçevenin kavisinde tıraşlıyor */
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04); /* Derinliği daha premium ve yumuşak yaptık */
}

.cell {
    background-color: var(--cell-empty);
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    font-size: clamp(1.05rem, 4.3vw, 1.6rem);
    font-weight: 900;
    color: var(--text-dark);
    text-transform: uppercase;
}

.cell.black {
    background-color: var(--cell-black);
}

.cell.active-path {
    background-color: var(--cell-active-bg);
}

.cell.current-cell {
    outline: 3px solid var(--cell-active-border);
    outline-offset: -3px;
    z-index: 2;
}

.cell.correct {
    background-color: var(--cell-correct) !important;
    color: #fff;
}

.cell.wrong {
    background-color: var(--cell-wrong) !important;
    color: #fff;
}

.cell-number {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: .6rem;
    font-weight: 900;
    color: var(--text-muted);
}

.cell-arrow {
    position: absolute;
    bottom: 1px;
    right: 2px;
    font-size: .7rem;
    color: var(--brand-accent);
    font-weight: 900;
}

.cell.correct .cell-number,
.cell.wrong .cell-number,
.cell.correct .cell-arrow,
.cell.wrong .cell-arrow {
    color: rgba(255,255,255,.92);
}

.cell.wrong-flash {
    animation: wrongFlash .6s ease;
}

@keyframes wrongFlash {
    0% { background-color: var(--cell-empty); color: inherit; }
    20% { background-color: var(--cell-wrong); color: white; }
    100% { background-color: var(--cell-empty); color: inherit; }
}

.play-status-bar {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, .96);
    color: #fff;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 800;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all .3s ease;
    z-index: 30;
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
}

.play-status-bar.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

.grid-overlay-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.92);
    background: rgba(15, 23, 42, .96);
    color: #fff;
    padding: 14px 26px;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    transition: all .2s;
    z-index: 20;
    box-shadow: 0 20px 40px rgba(0,0,0,.2);
}

.grid-overlay-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.keyboard {
position: relative;
background-color: var(--kb-bg);
padding: 10px 8px calc(12px + env(safe-area-inset-bottom));
display: flex;
flex-direction: column;
gap: 6px;
 flex-shrink: 0;
z-index: 20;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.keyboard-row.row-2 {
    padding: 0 14px;
}

.keyboard-row.row-3 {
    padding: 0 34px;
}

.key {
    flex: 1;
    background-color: var(--key-bg);
    color: var(--key-text);
    border: none;
    border-radius: 9px;
    height: 46px;
    font-size: 1.08rem;
    font-weight: 800;
    box-shadow: var(--key-shadow);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .1s ease, transform .1s ease, box-shadow .1s ease;
}

.key:active {
    background-color: #cbd5e1;
    transform: translateY(2px);
    box-shadow: none;
}

.keyboard-row.row-4 {
    gap: 8px;
    padding: 2px 4px 0;
}

.key.action {
    flex: 1.5;
    font-size: .9rem;
    font-weight: 900;
    background: var(--key-action-bg);
    color: #fff;
    box-shadow: 0 2px 0 #64748b;
}

.key.direction {
    background: var(--key-dir);
    box-shadow: 0 2px 0 #b45309;
    color: #fff;
}

.key.solve {
    background: var(--key-solve);
    box-shadow: 0 2px 0 #047857;
    color: #fff;
}

.game-ad-banner,
.ad-banner-archive {
    width: 100%;
    height: 60px;
    background: rgba(239, 246, 255, 0.7);
    border: 2px dashed #94a3b8;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Mobilde klavye altı boşluğu artık reklama ihtiyaç duymadığı için eski haline daha sıkı dönebiliriz */
@media (max-width: 768px) {
    .keyboard {
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }
}

.game-side-column {
    display: grid;
    gap: 22px;
}

.clues-box {
    background: var(--surface);
    border: 1px solid rgba(219, 227, 239, .95);
    border-radius: 28px;
    box-shadow: var(--shadow-sm);
    padding: 18px;
}

.clues-container {
    display: grid;
    gap: 18px;
}

.clue-column h3 {
    font-size: 1rem;
    color: var(--brand-primary);
    font-weight: 900;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--surface-muted);
    padding-bottom: 8px;
}

.clue-item {
    padding: 11px 12px;
    border-radius: 12px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    margin-bottom: 6px;
    background: var(--surface-soft);
    border: 1px solid transparent;
}

.clue-item strong {
    color: var(--brand-primary);
    margin-right: 6px;
}

.clue-item.active {
    background: #fff7d0;
    border-color: #fde68a;
}

/* =========================================================
   ARCHIVE
   ========================================================= */
.archive-block {
    padding: 18px;
}

.archive-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.archive-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.archive-filters select {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 36px 10px 14px;
    font-size: .95rem;
    font-weight: 800;
    color: #1e293b;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: var(--shadow-xs);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231e293b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.archive-scroll {
    display: flex;
    overflow-x: auto;
    padding: 6px 2px 6px;
    gap: 14px;
    scroll-snap-type: x proximity;
}

.archive-scroll::-webkit-scrollbar {
    height: 6px;
}

.archive-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.archive-card {
min-width: 148px;
flex-shrink: 0;
background: #fff;
border-radius: 18px;
padding: 22px 14px;
text-align: center;
border: 1px solid var(--line);
transition: .2s;
 scroll-snap-align: start;
box-shadow: var(--shadow-xs);
}

.archive-card:hover,
.archive-card:active {
    border-color: #cddaff;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.archive-card .grid-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 2px;
    background: #94a3b8;
    border-radius: 12px;
    padding: 3px;
}

.archive-card .grid-icon div {
    background: #f8fafc;
    border-radius: 3px;
}

.archive-card .grid-icon div.fill {
    background: #cbd5e1;
}

.archive-card h4 {
    font-size: 1.06rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 6px;
}

.archive-card p {
    font-size: .86rem;
    color: #64748b;
    font-weight: 700;
}

.archive-empty {
    text-align: center;
    width: 100%;
    padding: 18px;
    color: var(--text-muted);
    font-weight: 800;
}

.archive-page {
    width: min(100% - 24px, var(--reading-max));
}

.archive-alert {
    background: #fff8db;
    color: #8a6a00;
    padding: 18px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #f7e4a0;
    box-shadow: var(--shadow-xs);
}

.archive-alert p {
    font-weight: 900;
    margin-bottom: 8px;
}

.archive-alert a {
    color: #7c5c00;
    text-decoration: underline;
    font-weight: 900;
}

.archive-hero-card {
    background: var(--surface);
    border: 1px solid rgba(219, 227, 239, .95);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    text-align: center;
}

.archive-grid-wrapper {
    padding: 20px;
}

.archive-grid-wrapper .grid-container {
    max-width: 460px;
    margin: 0 auto;
}

.archive-stats-card,
.archive-clues-box {
    padding: 22px;
}

.archive-board {
    margin-bottom: 20px;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.archive-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.archive-clues-box ul {
    list-style: none;
    display: grid;
    gap: 12px;
}

.archive-clues-box h3 {
    color: var(--brand-primary);
    margin: 18px 0 10px;
    font-size: 1rem;
    font-weight: 900;
}

.archive-clues-box li {
    padding: 14px 16px;
    background: var(--surface-soft);
    border-radius: 14px;
    border: 1px solid var(--line);
    font-size: .95rem;
    color: var(--text-dark);
}

.archive-clues-box li strong {
    color: var(--text-muted);
    font-weight: 700;
}

.archive-clues-box .ans {
    color: var(--cell-correct);
    font-weight: 900;
    margin-left: 8px;
    letter-spacing: 1px;
    font-size: 1.05rem;
}

/* =========================================================
   SEO / FOOTER / PROFILE / 404
   ========================================================= */
.seo-content {
    padding: 22px;
}

.seo-content h2 {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.seo-content p + p {
    margin-top: 10px;
}

.home-guide {
    padding: 24px;
    overflow: hidden;
}

.home-guide-intro {
    max-width: 760px;
    margin-bottom: 22px;
}

.home-guide-intro h2 {
    margin-bottom: 10px;
}

.home-guide-intro p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 600;
}

.home-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.home-guide-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    display: grid;
    gap: 16px;
    min-width: 0;
}

.home-guide-card-wide {
    grid-column: 1 / -1;
}

.home-guide-visual {
    background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 100%);
    border: 1px solid #dbe4ff;
    border-radius: 18px;
    padding: 16px;
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-guide-copy h3 {
    font-size: 1.08rem;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.home-guide-copy p {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.7;
    font-weight: 600;
}

.home-guide-copy a {
    color: var(--brand-primary);
    font-weight: 800;
}

.guide-demo-grid {
    display: grid;
    gap: 4px;
    margin: 0 auto;
}

.guide-demo-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    width: 124px;
}

.guide-demo-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    width: 172px;
}

.guide-demo-cell,
.guide-demo-black {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    position: relative;
    user-select: none;
}

.guide-demo-cell {
    background: #ffffff;
    border: 1px solid #d6deeb;
    color: var(--text-dark);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.guide-demo-black {
    background: var(--cell-black);
    border: 1px solid rgba(255,255,255,0.05);
}

.guide-demo-magic {
    background: linear-gradient(135deg, #312e81 0%, #5b21b6 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
    animation: homeGuideMagicPulse 2s ease-in-out infinite;
}

.guide-demo-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    background: var(--brand-accent);
    color: #fff;
    font-style: normal;
    font-size: 0.64rem;
    font-weight: 900;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 999px;
    border: 2px solid #fff;
}

.guide-demo-reveal {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #7c3aed;
}

.guide-demo-cell-correct {
    background: var(--cell-correct);
    border-color: var(--cell-correct);
    color: #fff;
}

.guide-demo-cell-wrong {
    background: var(--cell-wrong);
    border-color: var(--cell-wrong);
    color: #fff;
}

.guide-demo-cell-active {
    background: #fef08a;
    border-color: #facc15;
    box-shadow: inset 0 0 0 2px #eab308;
}

.guide-demo-cell-path {
    background: #fffbea;
    border-color: #fde68a;
    color: #8a6500;
}

.guide-check-labels {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.guide-check-pill {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.guide-check-pill.correct {
    background: #dcfce7;
    color: #15803d;
}

.guide-check-pill.wrong {
    background: #fee2e2;
    color: #b91c1c;
}

.guide-check-rows {
    display: grid;
    gap: 10px;
    width: 100%;
    justify-items: center;
}

.guide-check-row {
    display: grid;
    grid-template-columns: repeat(5, 32px);
    gap: 4px;
}

.guide-direction-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
}

.guide-mini-clue {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--brand-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 900;
}

.guide-mini-btn {
    min-height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: 999px;
    background: var(--key-dir);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.18);
}

.guide-direction-grid {
    align-self: center;
}

.guide-mini-keyboard {
    width: min(100%, 320px);
    display: grid;
    gap: 6px;
}

.guide-key-row {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.guide-key {
    min-width: 28px;
    height: 34px;
    padding: 0 8px;
    background: #fff;
    border: 1px solid #d7dfeb;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 2px 0 rgba(100, 116, 139, 0.18);
}

.guide-key-row-actions {
    margin-top: 4px;
}

.guide-key-action {
    background: #94a3b8;
    border-color: #94a3b8;
    color: #fff;
    min-width: 58px;
}

.guide-key-solve {
    background: var(--cell-correct);
    border-color: var(--cell-correct);
    color: #fff;
    min-width: 62px;
}

@keyframes homeGuideMagicPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18), 0 0 16px rgba(139, 92, 246, 0.22);
    }
}

.site-footer {
    margin-top: 20px;
    padding: 28px 12px 24px;
    color: var(--text-muted);
}

.site-footer-inner {
    width: min(100% - 12px, var(--content-max));
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(219, 227, 239, .95);
    border-radius: 28px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
    display: grid;
    gap: 24px;
}

.footer-brand {
    display: grid;
    gap: 10px;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -0.03em;
}

.footer-logo span {
    color: var(--brand-accent);
}

.footer-brand p {
    max-width: 520px;
    font-size: .95rem;
    font-weight: 600;
}

.footer-links-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.footer-col {
    display: grid;
    gap: 10px;
}

.footer-col h3 {
    font-size: .95rem;
    font-weight: 900;
    color: var(--text-dark);
}

.footer-col a {
    font-weight: 700;
    color: var(--text-muted);
}

.footer-col a:hover {
    color: var(--brand-primary);
}

.footer-bottom {
    width: min(100% - 12px, var(--content-max));
    margin: 14px auto 0;
    padding-bottom: 24px;
    text-align: center;
    font-size: .92rem;
    font-weight: 700;
}

.profile-shell {
    padding-bottom: 56px;
}

.profile-card {
    padding: 30px 20px;
    text-align: center;
}

.profile-title {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.profile-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    margin: 0;
    background: linear-gradient(135deg, #c7d2fe, #e0e7ff);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.15);
}

.avatar-edit-btn {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #ffffff;
    border: 3px solid var(--bg-body);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    box-shadow: var(--shadow-xs);
}

.avatar-selection-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.avatar-select-btn {
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 6px;
    transition: .2s;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-select-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.avatar-select-btn:hover {
    border-color: var(--brand-primary);
    background: #e0e7ff;
    transform: translateY(-1px);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.profile-stat {
    background: var(--surface-soft);
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
}

.profile-stat strong {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--brand-primary);
    display: block;
}

.profile-stat span {
    font-size: .88rem;
    font-weight: 800;
    color: var(--text-muted);
}

.rank-progress-box {
    margin-top: 18px;
    background: var(--surface-soft);
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.rank-progress-top {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    margin-bottom: 8px;
}

.rank-progress-current {
    color: var(--brand-primary);
}

.rank-progress-next {
    color: var(--text-muted);
    font-size: .9rem;
}

.rank-progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.rank-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 20px;
    transition: width .4s;
}

.rank-progress-points {
    margin-top: 6px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-muted);
}

.rank-badge {
    font-weight: 900;
    margin-left: 6px;
    font-size: .82em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.rank-r1, .rank-r2, .rank-r3, .rank-r4, .rank-r5 { color: #94a3b8; }
.rank-r6, .rank-r7, .rank-r8, .rank-r9, .rank-r10 { color: #3b82f6; }
.rank-r11, .rank-r12, .rank-r13, .rank-r14, .rank-r15 { color: #22c55e; }
.rank-r16, .rank-r17, .rank-r18, .rank-r19, .rank-r20 { color: #eab308; }
.rank-r21, .rank-r22, .rank-r23, .rank-r24, .rank-r25 { color: #f97316; }
.rank-r26, .rank-r27, .rank-r28, .rank-r29, .rank-r30 { color: #a855f7; }

.success-rate-box {
    margin-top: 18px;
    background: var(--surface-soft);
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.success-rate-top {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: .85rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.success-rate-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.success-rate-fill {
    height: 100%;
    background: #22c55e;
}

.profile-word-history {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.word-history-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.word-column h3 {
    font-size: .95rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--text-dark);
    text-align: left;
}

.word-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.word-chip {
    padding: 7px 10px;
    border-radius: 10px;
    font-weight: 800;
    font-size: .82rem;
    letter-spacing: .02em;
}

.word-correct {
    background: #e8f8ee;
    color: #1f9d55;
    border: 1px solid #b7e4c7;
}

.word-wrong {
    background: #fdecec;
    color: #dc2626;
    border: 1px solid #f5c2c7;
}

.word-empty {
    font-size: .82rem;
    color: #888;
    font-weight: 700;
}

.profile-last-games {
    margin-top: 30px;
    text-align: left;
}

.profile-last-games h2 {
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 14px;
}

.last-games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.last-game-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    transition: .2s;
}

.last-game-card:hover {
    border-color: #d5dae4;
    box-shadow: var(--shadow-xs);
}

.last-game-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #111827;
    font-size: .95rem;
}

.game-icon {
    width: 22px;
    height: 22px;
}

.last-game-meta {
    margin-top: 6px;
    font-size: .9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.game-score {
    font-weight: 800;
    color: #111827;
}

.game-correct {
    color: #16a34a;
    font-weight: 700;
}

.game-wrong {
    color: #dc2626;
    font-weight: 700;
}

.not-found-card {
    padding: 60px 20px;
    text-align: center;
}

.not-found-card h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--brand-primary);
    margin-bottom: 10px;
    line-height: 1;
    font-weight: 900;
}

.not-found-card p {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* =========================================================
   MODALS
   ========================================================= */
.auth-modal,
.result-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 2000;
}

.auth-dialog,
.result-dialog {
    width: min(100%, 420px);
    background: #fff;
    border-radius: 30px;
    padding: 26px 20px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.3);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    background: var(--surface-soft);
    padding: 6px;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.auth-tab {
    flex: 1;
    min-height: 46px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 900;
    font-size: .95rem;
    border-radius: 14px;
}

.auth-tab.active {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: var(--shadow-xs);
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 8px;
    font-weight: 800;
    color: var(--text-dark);
    font-size: .95rem;
}

.auth-form input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-dark);
    background: #f8fafc;
    transition: all .2s;
}

.auth-form input:focus {
    border-color: var(--brand-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.auth-form button,
.result-btn,
.result-share-btn {
    min-height: 54px;
    border: none;
    border-radius: 16px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 1.02rem;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
    transition: .18s ease;
}

.auth-form button:active,
.result-btn:active,
.result-share-btn:active {
    transform: scale(.985);
}

.auth-message {
    font-weight: 800;
    color: var(--brand-accent);
    text-align: center;
    min-height: 18px;
    margin-bottom: 10px;
}
.auth-message:empty {
display: none;
}

.auth-message.success {
    color: var(--cell-correct);
}

.logout-text {
    color: var(--text-muted);
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 6px;
}

.danger-btn {
    background: #ef4444 !important;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.18) !important;
}

.result-dialog {
    text-align: center;
}

.result-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 10px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    font-size: 1.55rem;
}

.result-dialog h3 {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.result-dialog p {
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 18px;
}

.result-stats {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.result-stats .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 800;
    font-size: .98rem;
}

.result-stats .row strong {
    color: var(--brand-primary);
    font-weight: 900;
    font-size: 1.05rem;
}

.result-share {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.result-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #eef4ff;
    color: var(--brand-primary);
    box-shadow: none;
    border: 1px solid #dbe4ff;
}

.result-share-btn.whatsapp {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0;
}

.result-actions {
    display: grid;
    gap: 10px;
}

.result-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.result-btn.alt-orange {
    background: var(--key-dir);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.22);
}

.result-btn.alt-soft {
    background: var(--surface-soft);
    color: var(--text-dark);
    box-shadow: none;
    border: 1px solid var(--line);
}


/* =========================================================
   RESPONSIVE & MOBİL TAM EKRAN (FULLSCREEN) MİMARİSİ
   ========================================================= */

/* --- 1. MASAÜSTÜ & TABLET DÜZENLERİ --- */
@media (max-width: 399px) {
    .auth-links { gap: 8px; font-size: .86rem; }
    .leaderboard-username { max-width: 110px; }
    .rank-callout { align-items: flex-start; }
}

@media (min-width: 700px) {
    .page-shell { width: min(100% - 40px, var(--content-max)); }
    .hero-card { padding: 42px 34px; }
    .hero-actions { flex-direction: row; max-width: none; }
    .footer-links-wrap { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .word-history-columns { grid-template-columns: 1fr 1fr; }
    .archive-stats-grid { grid-template-columns: repeat(4, 1fr); }
    .result-share { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
    .desktop-nav { display: flex; align-items: center; gap: 6px; }
    .menu-icon, .mobile-menu { display: none; }
    .puzzle-shell { gap: 28px; }
    .game-layout { grid-template-columns: minmax(0, 540px) minmax(0, 1fr); align-items: start; }
    .game-main-column { position: sticky; top: calc(var(--header-h) + 18px); }
    .game-side-column { gap: 22px; }
    .clues-container { grid-template-columns: 1fr 1fr; }
    .archive-scroll { gap: 16px; padding-bottom: 6px; }
    .site-footer-inner { grid-template-columns: 1.35fr 1fr; align-items: start; }
    .footer-links-wrap { justify-content: end; }
    #activeClueText { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

@media (min-width: 1280px) {
    .header-inner { width: min(100% - 40px, 1240px); }
}


/* --- 2. MOBİL (TELEFON) KUSURSUZ TAM EKRAN DENEYİMİ --- */
@media (max-width: 768px) {
    body, html { overflow-y: auto; height: auto; position: relative; }
    
    
    
        .home-guide {
        padding: 20px 16px;
    }

    .home-guide-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home-guide-card {
        padding: 16px;
        border-radius: 18px;
    }

    .home-guide-visual {
        min-height: 150px;
        padding: 14px;
        border-radius: 16px;
    }

    .home-guide-copy h3 {
        font-size: 1rem;
    }

    .home-guide-copy p,
    .home-guide-intro p {
        font-size: 0.93rem;
        line-height: 1.65;
    }

    .guide-demo-grid-4 {
        width: 156px;
    }

    .guide-check-row {
        grid-template-columns: repeat(5, 28px);
    }

    .guide-mini-keyboard {
        width: 100%;
    }

    .guide-key {
        min-width: 24px;
        height: 32px;
        font-size: 0.72rem;
        padding: 0 6px;
    }

    .guide-key-action,
    .guide-key-solve {
        min-width: 54px;
    }
    
   /* Temel Sayfa Çerçevesini Sıfırla */
 .page-shell { width: 100%; padding: 0; }
 .archive-page { width: 100%; }
 .puzzle-shell { padding-bottom: 32px; }

    /* Breadcrumb (Sayfa Yolu) Nefes Alma Boşlukları */
    .breadcrumb-wrap { margin-top: 16px; border-top: none; }
    .breadcrumb { padding: 0 16px 16px 16px; font-size: 0.85rem; }

    /* TÜM KARTLARI TAM EKRAN YAP (Oyun, Footer, Skor, Profil, Arşiv vb.) */
    .hero-card, .score-page-card, .archive-block, .archive-grid-wrapper, 
    .archive-stats-card, .archive-clues-box, .seo-content, .profile-card, 
    .not-found-card, .leaderboard-card, .clues-box, .game-play-area, .site-footer-inner {
        border-radius: 0; border-left: none; border-right: none; box-shadow: none;
        width: 100%; margin-bottom: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    }

    /* Skor Sayfası (Kart İçinde Kart Görüntüsünü Yok Etme) */
    .score-page-card { background: transparent; border: none; padding: 0; }
    .score-page-card .section-head, .score-page-card .score-tabs { padding: 0 16px; margin: 0 0 12px 0; }
    .score-page-card .leaderboard-card { padding: 20px 16px; border-top: 1px solid var(--line); margin-bottom: 0; }

    /* Footer Özel Tam Ekran Ayarı */
    .site-footer { padding: 0; margin-top: 0; }
    .site-footer-inner { padding: 24px 16px; }

    /* Oyun Alanı ve Durum Çubuğu */
    .game-top-meta { padding: 0 16px; }
    .status-pill { display: flex; justify-content: center; margin-bottom: 24px; }
 .archive-head { flex-direction: column; align-items: flex-start; }
 .archive-filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
 .archive-filters select { width: 100%; }
    .game-area { padding: 4px 0; }

    /* Izgara (Grid) Ekrana Oturtma */
.grid-stack { width: 100%; max-width: 100%; padding: 0 12px; } /* Kenarlardan ekrana yapışmasın, azıcık daha nefes alsın */
.grid-container { border-width: 2px; border-radius: 10px; } /* Mobilde de o yuvarlak köşeli premium hissiyatı koru */

    /* Konsol ve İpucu Alanı */
    .mini-clue-panel { padding: 10px 12px; background: var(--bg-body); border-bottom: 1px solid var(--line); }
    .mini-clue-box.compact { background: #ffffff; border: 2px solid var(--brand-primary); min-height: 65px; padding: 8px; box-shadow: var(--shadow-xs); }
    .mini-clue-top { min-width: 60px; padding: 4px; }
    .mini-clue-text { font-size: 0.9rem; line-height: 1.2; }

/* Klavye ve Alt Boşluk */
.keyboard { border-radius: 0; padding: 10px 6px calc(14px + env(safe-area-inset-bottom)); gap: 6px; background: var(--kb-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.key { height: 42px; font-size: 0.95rem; }
.game-layout { gap: 0; }
.game-play-area { margin-bottom: 16px !important; }
.game-side-column { margin-top: 0; display: flex; flex-direction: column; gap: 12px; }
.game-ad-banner { border-width: 1px; margin-bottom: 0 !important; margin-top: 0; }
.status-pill { margin-bottom: 20px !important; }
}
@media (max-width: 400px) { .key { height: 38px; } }


/* =========================================================
   YENİ NESİL KOMPAKT VE PREMIUM MODALLAR (Giriş & Sonuç)
   ========================================================= */
.auth-modal, .result-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.72); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 2000; }

/* Modal Ana Kasa (Taşmayı Engeller, Boyutu Sınırlar) */
.auth-dialog, .compact-modal { background: #ffffff; width: 100%; max-width: 350px; max-height: 85vh; border-radius: 28px; padding: 24px 20px; display: flex; flex-direction: column; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,0.4); gap: 16px; text-align: left; }

/* Kimlik Formları Düzeni */
.auth-tabs { display: flex; gap: 8px; background: var(--surface-soft); padding: 6px; border-radius: 18px; border: 1px solid var(--line); margin-bottom: 0; }
.auth-tab { flex: 1; min-height: 42px; background: transparent; border: none; color: var(--text-muted); font-weight: 900; font-size: 0.9rem; border-radius: 14px; }
.auth-tab.active { background: #fff; color: var(--brand-primary); box-shadow: var(--shadow-xs); }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 6px; font-weight: 800; font-size: 0.9rem; }
.auth-form input { width: 100%; height: 48px; padding: 0 14px; border: 2px solid #e2e8f0; border-radius: 14px; font-size: 1rem; font-weight: 700; background: #f8fafc; transition: all .2s; }
.auth-form input:focus { border-color: var(--brand-primary); background: #fff; }
.auth-form button, .danger-btn { min-height: 48px; border: none; border-radius: 14px; font-size: 1rem; font-weight: 900; background: var(--brand-primary); color: #fff; }
.auth-message { font-weight: 800; color: var(--brand-accent); text-align: center; min-height: 18px; }
.auth-message.success { color: var(--cell-correct); }
#logoutForm { text-align: center; }
.logout-text { color: var(--text-dark); font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; line-height: 1.4; }

/* Sonuç Modalı Premium Tasarım */
.modal-header { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #f1f5f9; padding-bottom: 14px; }
.modal-header .result-icon { width: 48px; height: 48px; background: #eef4ff; border-radius: 14px; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; flex-shrink: 0; }
.modal-titles h3 { font-size: 1.35rem; margin-bottom: 2px; color: #0f172a; line-height: 1.1; font-weight: 900; }
.modal-titles p { font-size: 0.85rem; margin: 0; color: #64748b; font-weight: 700; }

/* Kutucuklu İstatistikler (Grid 2x2) */
.result-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 12px 6px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.stat-lbl { font-size: 0.72rem; color: #64748b; text-transform: uppercase; font-weight: 800; letter-spacing: 0.5px; }
.stat-val { font-size: 1.25rem; color: #4f46e5; font-weight: 900; line-height: 1; }

/* Estetik Butonlar */
.modal-buttons { display: flex; flex-direction: column; gap: 10px; }
.share-group { display: flex; gap: 10px; }
.action-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btn-share, .btn-action { padding: 12px 6px; border-radius: 12px; font-size: 0.82rem; font-weight: 800; text-align: center; display: flex; align-items: center; justify-content: center; text-decoration: none; border: none; cursor: pointer; }
.btn-share { background: #eef4ff; color: #4f46e5; flex: 1; }
.btn-share.wp { background: #ecfdf5; color: #047857; }
.btn-action.outline { background: transparent; border: 1px solid #cbd5e1; color: #475569; }
.btn-action.primary { background: #4f46e5; color: #fff; }


/* Modal İstatistik Grid Düzeltmesi (Eğer eleman sayısı tek ise sonuncuyu tam genişlik yapar) */
        #resultStats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        #resultStats > div:last-child:nth-child(odd) {
            grid-column: 1 / -1;
        }

.archive-page .leaderboard-username,
.archive-list-page .leaderboard-username {
    max-width: none;
    white-space: normal;
}

.archive-clues-box a.ans {
    text-decoration: none;
}

.archive-clues-box a.ans:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* =========================================================
   SİHİRLİ KARE & HARF AÇMA ANİMASYONLARI
   ========================================================= */
.cell.magic-square {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    cursor: pointer;
    box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.3);
    animation: magicPulse 2.5s infinite alternate;
    z-index: 5;
}

@keyframes magicPulse {
    0% { box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.3); }
    100% { box-shadow: inset 0 0 0 4px rgba(139, 92, 246, 0.8), 0 0 12px rgba(139, 92, 246, 0.5); }
}

.magic-icon {
    font-size: 1.2rem;
    opacity: 0.9;
}

.magic-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 8px;
    border: 2px solid var(--grid-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 2;
}

.magic-badge.ad-ready {
    background: #f59e0b; /* Reklam izleme ikonu için turuncu/sarı renk */
    padding: 2px 5px;
}

/* Açılan harfin tasarımı ve efekti */
.cell.hint-locked {
    background-color: #ede9fe !important;
    color: #7c3aed !important;
    animation: hintPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes hintPop {
    0% { transform: scale(1); background-color: #ffffff; }
    50% { transform: scale(1.15); background-color: #fde047; color: #fff; z-index: 10; border-radius: 8px; }
    100% { transform: scale(1); background-color: #ede9fe; color: #7c3aed; border-radius: 0; }
}



.seo-content {
    padding: 22px;
}

.seo-content h1,
.seo-content h2,
.seo-content h3 {
    margin: 0;
    color: var(--text-dark);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.seo-content h1 {
    font-size: clamp(1.75rem, 3vw, 2.2rem);
    margin-bottom: 12px;
}

.seo-content h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.seo-content h3 {
    font-size: 1.08rem;
    margin-bottom: 10px;
}

.seo-content p,
.seo-content ul,
.seo-content ol {
    margin: 0;
}

.seo-content p {
    line-height: 1.72;
    color: var(--text-dark);
}

.seo-content p + p {
    margin-top: 14px;
}

.seo-content p + h2,
.seo-content ul + h2,
.seo-content ol + h2 {
    margin-top: 30px;
}

.seo-content p + h3,
.seo-content ul + h3,
.seo-content ol + h3 {
    margin-top: 24px;
}

.seo-content h2 + p,
.seo-content h2 + ul,
.seo-content h2 + ol,
.seo-content h3 + p,
.seo-content h3 + ul,
.seo-content h3 + ol {
    margin-top: 0;
}

.seo-content ul,
.seo-content ol {
    padding-left: 20px;
}

.seo-content li + li {
    margin-top: 8px;
}

.seo-content a {
    color: var(--brand-primary);
    font-weight: 800;
}

.guide-body > *:first-child {
    margin-top: 0 !important;
}