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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    color: #5a4fcf;
    line-height: 1.7;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --nav-height: clamp(64px, 9vh, 82px);
    --cell-size: clamp(46px, min(9vh, 11.5vw), 58px);
    --cell-gap: clamp(3px, 0.8vmin, 6px);
    --grid-padding: clamp(12px, 2vmin, 18px);
}

main {
    flex: 1 0 auto;
    width: 100%;
}

/* Navigation styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 154, 158, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    flex-wrap: nowrap;
    gap: 0.5rem 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 1 auto;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 154, 158, 0.35);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(255, 154, 158, 0.12);
}

.nav-toggle:focus-visible {
    outline: 2px solid rgba(255, 107, 157, 0.55);
    outline-offset: 3px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #5a4fcf;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-toggle-bar:nth-of-type(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-of-type(2) {
    opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-of-type(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b9d;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-logo:hover {
    transform: scale(1.02);
    text-decoration: none;
    color: #ff6b9d;
}

.logo-icon {
    font-size: 1.9rem;
    filter: drop-shadow(0 1px 2px rgba(255, 107, 157, 0.2));
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex: 1 1 auto;
}

.nav-menu {
    display: flex;
    gap: 0.15rem;
    background: rgba(248, 249, 255, 0.6);
    padding: 0.25rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 154, 158, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex: 1 1 auto;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: #5a4fcf;
    font-weight: 600;
    padding: 0.55rem 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    position: relative;
    white-space: nowrap;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
}

.nav-link:hover {
    color: #ff6b9d;
    background: rgba(255, 154, 158, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    color: #ff6b9d;
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.15) 0%, rgba(254, 207, 239, 0.15) 100%);
    box-shadow: 0 2px 8px rgba(255, 154, 158, 0.2);
    border: 1px solid rgba(255, 154, 158, 0.3);
}

.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.nav-dropdown-toggle:focus-visible {
    outline: 2px solid rgba(255, 107, 157, 0.6);
    outline-offset: 3px;
}

.nav-dropdown-toggle::after {
    content: '\25BE';
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    color: inherit;
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    border: 1px solid rgba(255, 154, 158, 0.25);
    box-shadow: 0 8px 20px rgba(90, 79, 207, 0.12);
    min-width: 190px;
    overflow: hidden;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: flex;
}

.nav-dropdown.open .dropdown-menu {
    display: flex;
}

.nav-dropdown.open .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-item {
    text-decoration: none;
    color: #5a4fcf;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: transparent;
    display: block;
    white-space: nowrap;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #ff6b9d;
    background: rgba(255, 154, 158, 0.12);
}

.dropdown-item.active {
    color: #ff6b9d;
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.15) 0%, rgba(254, 207, 239, 0.15) 100%);
}

.nav-dropdown.active .nav-dropdown-toggle {
    color: #ff6b9d;
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.15) 0%, rgba(254, 207, 239, 0.15) 100%);
    box-shadow: 0 2px 8px rgba(255, 154, 158, 0.2);
    border: 1px solid rgba(255, 154, 158, 0.3);
}

.nav-controls {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

/* Button styles */
.btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: white;
    border-color: #ff6b9d;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff9a9e 100%);
    box-shadow: 0 2px 6px rgba(255, 107, 157, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #5a4fcf;
    border-color: rgba(255, 154, 158, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 154, 158, 0.1);
    border-color: #ff9a9e;
    transform: translateY(-1px);
}

/* Main content area */
.main-content {
    width: 100%;
    min-height: calc(100vh - var(--nav-height));
    padding: clamp(0.75rem, 2vh, 1.25rem) clamp(0.75rem, 3vw, 1.5rem);
    display: grid;
    grid-template-rows: auto 1fr;
    justify-items: center;
    align-content: center;
    gap: clamp(0.75rem, 2vh, 1.25rem);
    overflow-x: auto;
}

.main-layout {
    width: min(100%, 1280px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(88px, 120px) minmax(0, 1fr) minmax(88px, 120px);
    gap: clamp(1.25rem, 4vw, 3rem);
    align-items: start;
    justify-items: center;
}

.main-primary {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 2vh, 1.25rem);
    align-items: center;
    max-width: min(100%, 960px);
}

.homepage-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.85rem, 2.4vh, 1.5rem);
    padding: clamp(0.5rem, 1.6vh, 1.15rem) 0;
    width: 100%;
    position: sticky;
    top: calc(var(--nav-height) + clamp(0.75rem, 2vh, 1.5rem));
}

.homepage-gallery-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.85rem, 2.6vh, 1.6rem);
    width: 100%;
}

.homepage-gallery-item {
    margin: 0;
}

.homepage-gallery-item img {
    width: clamp(64px, 8vh, 88px);
    aspect-ratio: 1 / 1;
    display: block;
    border-radius: 22px;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    object-fit: cover;
    background: rgba(0, 0, 0, 0.15);
}

@media (max-width: 1100px) {
    .main-layout {
        grid-template-columns: minmax(72px, 100px) minmax(0, 1fr) minmax(72px, 100px);
        gap: clamp(1rem, 3vw, 2.25rem);
    }
}

@media (max-width: 980px) {
    .main-layout {
        grid-template-columns: minmax(72px, 100px) minmax(0, 1fr);
    }

    .homepage-gallery--right {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .homepage-gallery {
        display: none;
    }
}

/* Top control panel */
.top-controls {
    width: min(100%, 1040px);
    display: flex;
    justify-content: center;
}

.top-controls .game-controls {
    max-width: none;
    padding: clamp(0.45rem, 1.4vh, 0.75rem) clamp(0.85rem, 2.5vw, 1.25rem);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 255, 0.8) 100%);
    border-radius: 12px;
    border: 2px solid #fecfef;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    flex-wrap: wrap;
}

/* Game container */
.game-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 255, 0.95) 100%);
    border-radius: 14px;
    padding: clamp(0.75rem, 2vh, 1.25rem);
    box-shadow: 0 12px 32px rgba(255, 154, 158, 0.14);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-items: center;
    gap: clamp(0.75rem, 2vh, 1.25rem);
    border: 3px solid #fecfef;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    width: min(100%, 1040px);
}

.game-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 154, 158, 0.05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Game control panel */
.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 255, 0.8) 100%);
    padding: clamp(0.45rem, 1.4vh, 0.75rem) clamp(0.75rem, 2vw, 1.25rem);
    border-radius: 6px;
    border: 2px solid #fecfef;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.1);
    backdrop-filter: blur(5px);
    gap: clamp(0.65rem, 2vw, 1.25rem);
    flex-wrap: wrap;
}

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.difficulty-selector label {
    font-weight: 600;
    color: #5a4fcf;
    font-size: 1rem;
}

.difficulty-selector select {
    padding: 0.5rem 0.8rem;
    border: 2px solid #fecfef;
    border-radius: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    font-size: 0.9rem;
    cursor: pointer;
    color: #5a4fcf;
    font-weight: 600;
}

.difficulty-selector select:focus {
    outline: none;
    border-color: #ff9a9e;
    box-shadow: 0 0 0 3px rgba(255, 154, 158, 0.2);
}

.game-stats {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    align-items: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 255, 0.9) 100%);
    border-radius: 4px;
    border: 2px solid #fecfef;
    box-shadow: 0 2px 8px rgba(255, 154, 158, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 80px;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.stat:hover::before {
    left: 100%;
}

.stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 154, 158, 0.2);
}

.stat-label {
    font-size: 0.9rem;
    color: #5a4fcf;
    font-weight: 600;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff6b9d;
}


/* Sudoku grid container - highlight focus */
.sudoku-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    position: relative;
}

/* Bottom control panel - simplified design to keep focus on grid */
.bottom-controls {
    display: grid;
    gap: clamp(0.75rem, 2vh, 1rem);
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.55);
    padding: clamp(0.75rem, 2vh, 1rem);
    border-radius: 14px;
    border: 1px solid rgba(255, 154, 158, 0.2);
    backdrop-filter: blur(4px);
    opacity: 0.95;
    align-content: start;
}

.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, var(--cell-size)));
    grid-auto-rows: var(--cell-size);
    gap: var(--cell-gap);
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 182, 193, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(255, 192, 203, 0.2) 0%, transparent 60%),
        linear-gradient(135deg, #ffffff 0%, #fef7ff 50%, #fff0f5 100%);
    padding: var(--grid-padding);
    border-radius: 12px;
    border: 3px solid #ff9a9e;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.85),
        0 10px 30px rgba(255, 154, 158, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    width: auto;
    max-width: calc(var(--cell-size) * 6 + var(--grid-padding) * 2 + var(--cell-gap) * 5);
    position: relative;
}

.sudoku-cell {
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    border: 2px solid #e8e8e8;
    font-size: clamp(1.35rem, 4vh, 1.9rem);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #5a4fcf;
    width: var(--cell-size);
    height: var(--cell-size);
    border-radius: 6px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.sudoku-cell:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0e6ff 100%);
    border-color: #ff9a9e;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 4px 15px rgba(255, 154, 158, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sudoku-cell.selected {
    background: linear-gradient(135deg, #ff9a9e 0%, #ff6b9d 100%);
    color: white;
    border-color: #ff6b9d;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 
        0 6px 20px rgba(255, 107, 157, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sudoku-cell.given {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    color: #5a4fcf;
    font-weight: 700;
    border: 3px solid #d1c4e9;
    box-shadow: 
        0 3px 10px rgba(81, 79, 207, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.sudoku-cell.given:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    transform: translateY(-1px) scale(1.02);
}

.sudoku-cell.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #d32f2f;
    border: 3px solid #ffcdd2;
    animation: errorShake 0.5s ease;
    box-shadow: 
        0 3px 10px rgba(211, 47, 47, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.sudoku-cell.notes {
    font-size: 0.8rem;
    color: #9c27b0;
    line-height: 1;
}

.sudoku-cell.notes .note-number {
    position: absolute;
    font-size: 0.7rem;
    color: #ba68c8;
    font-weight: 500;
}

/* 6x6 grid 2x3 block borders - enhanced visuals */
/* Divider between columns 1-3 and 4-6 */
.sudoku-cell:nth-child(3n) {
    border-right: 4px solid #ff9a9e;
    box-shadow: inset -2px 0 0 rgba(255, 154, 158, 0.3);
}

/* Divider between rows 1-2 and 3-4 */
.sudoku-cell:nth-child(n+13):nth-child(-n+18) {
    border-bottom: 4px solid #ff9a9e;
    box-shadow: inset 0 -2px 0 rgba(255, 154, 158, 0.3);
}

/* Divider between rows 3-4 and 5-6 */
.sudoku-cell:nth-child(n+25):nth-child(-n+30) {
    border-bottom: 4px solid #ff9a9e;
    box-shadow: inset 0 -2px 0 rgba(255, 154, 158, 0.3);
}

/* Number selector */
.number-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: clamp(0.5rem, 1.5vh, 0.75rem);
    width: 100%;
    margin: 0;
}

.number-btn {
    aspect-ratio: 1;
    border: 2px solid #fecfef;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 6px;
    font-size: clamp(1.1rem, 2.4vh, 1.5rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a4fcf;
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.18);
}

.number-btn:hover {
    background: linear-gradient(135deg, #ffeef8 0%, #f0e6ff 100%);
    border-color: #ff9a9e;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 16px rgba(255, 154, 158, 0.2);
}

.number-btn.active {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: white;
    border-color: #ff6b9d;
    transform: scale(1.07);
    box-shadow: 0 6px 16px rgba(255, 107, 157, 0.3);
}

.number-btn.erase {
    aspect-ratio: 1;
    font-size: clamp(1rem, 2.2vh, 1.3rem);
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: white;
    border-color: #ff6b9d;
    font-weight: 600;
}

.number-btn.erase:hover {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff9a9e 100%);
    border-color: #ff6b9d;
    transform: translateY(-2px) scale(1.03);
}

/* Game action buttons */
.game-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: clamp(0.5rem, 1.5vh, 0.75rem);
    justify-content: center;
    width: 100%;
    margin: 0;
}

@media (min-width: 960px) {
    .game-container {
        grid-template-columns: minmax(0, auto) minmax(220px, 1fr);
        align-items: start;
    }

    .bottom-controls {
        max-width: 320px;
        height: 100%;
        align-self: stretch;
        justify-self: stretch;
        grid-template-rows: min-content 1fr;
        align-content: space-between;
    }

    .number-selector {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    }

    .game-actions {
        align-self: end;
    }
}

/* Game guide section */
.game-info-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Game information */
.game-info {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 255, 0.95) 100%);
    border-radius: 25px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(255, 154, 158, 0.2);
    height: fit-content;
    border: 2px solid #fecfef;
    max-width: 800px;
    margin: 0 auto;
}

.game-info h2 {
    color: #ff6b9d;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.game-info h3 {
    color: #5a4fcf;
    margin: 2rem 0 1rem 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.game-info p {
    margin-bottom: 1.2rem;
    color: #5a4fcf;
    font-size: 1.1rem;
    line-height: 1.8;
}

.game-info ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.game-info li {
    margin-bottom: 0.8rem;
    color: #5a4fcf;
    font-size: 1.1rem;
    line-height: 1.7;
}

.game-info strong {
    color: #ff6b9d;
    font-weight: 700;
}

/* Modal windows */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 25px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(255, 154, 158, 0.3);
    animation: modalSlideIn 0.4s ease;
    border: 3px solid #fecfef;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content h2 {
    color: #ff6b9d;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.modal-content p {
    margin-bottom: 2rem;
    color: #5a4fcf;
    font-size: 1.2rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.victory-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.1) 0%, rgba(254, 207, 239, 0.1) 100%);
    border-radius: 20px;
    border: 2px solid #fecfef;
}

.victory-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.victory-stat .stat-label {
    font-size: 1rem;
    color: #5a4fcf;
    font-weight: 600;
}

.victory-stat .stat-value {
    font-size: 1.5rem;
    color: #ff6b9d;
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        padding: clamp(0.5rem, 2vh, 0.75rem) clamp(0.5rem, 4vw, 1rem);
        gap: clamp(0.5rem, 2vh, 1rem);
    }

    .nav-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.85rem;
    }

    .nav-left {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-quick-actions {
        margin-left: auto;
    }

    .nav-content {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.75rem;
        background: rgba(248, 249, 255, 0.9);
        border-radius: 12px;
        border: 1px solid rgba(255, 154, 158, 0.2);
        padding: 0.85rem;
        box-shadow: 0 10px 24px rgba(90, 79, 207, 0.12);
    }

    .nav-content.is-open {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .nav-link {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
    }

    .nav-dropdown {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        margin-top: 0.35rem;
        min-width: 0;
        width: 100%;
        box-shadow: none;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.95);
    }

    .nav-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .nav-controls .btn {
        width: 100%;
    }

    .top-controls .game-controls {
        gap: clamp(0.5rem, 2vw, 1rem);
    }

    .sudoku-container {
        width: 100%;
    }

    .game-container {
        padding: clamp(0.75rem, 2vh, 1rem);
        gap: clamp(0.75rem, 2vh, 1rem);
    }

    .bottom-controls {
        max-width: 100%;
    }

    .number-selector {
        grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    }

    .game-actions {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.35rem clamp(0.4rem, 4vw, 0.75rem);
        gap: 0.6rem;
    }

    .nav-container {
        padding: 0.75rem;
    }

    .nav-left {
        gap: 0.5rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .nav-content {
        padding: 0.75rem;
    }

    .top-controls .game-controls {
        flex-direction: column;
        gap: 0.6rem;
        text-align: center;
    }

    .game-container {
        padding: clamp(0.6rem, 2vh, 0.85rem);
        gap: clamp(0.6rem, 2vh, 0.85rem);
    }

    .bottom-controls {
        padding: clamp(0.6rem, 2vh, 0.85rem);
    }

    .number-selector {
        grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
        gap: 0.6rem;
    }

    .game-actions {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 0.6rem;
    }

    .number-btn {
        font-size: clamp(1rem, 2.8vh, 1.35rem);
    }

    .number-btn.erase {
        grid-column: auto;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.sudoku-cell.success {
    animation: successPulse 0.4s ease;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 2px solid #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Error animation */
@keyframes errorShake {
    0%, 100% { transform: translateX(0) scale(1); }
    25% { transform: translateX(-8px) scale(1.05); }
    75% { transform: translateX(8px) scale(1.05); }
}

.sudoku-cell.error {
    animation: errorShake 0.4s ease;
}

/* Additional page styles */
.coming-soon {
    text-align: center;
    padding: 3rem 2rem;
}

.coming-soon h1 {
    font-size: 2.8rem;
    color: #ff6b9d;
    margin-bottom: 1rem;
    font-weight: 700;
}

.coming-soon p {
    font-size: 1.3rem;
    color: #5a4fcf;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.feature-preview {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 255, 0.9) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem 0;
    text-align: left;
    border: 2px solid #fecfef;
    box-shadow: 0 10px 25px rgba(255, 154, 158, 0.1);
}

.feature-preview h3 {
    color: #ff6b9d;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.feature-preview ul {
    list-style: none;
    padding: 0;
}

.feature-preview li {
    padding: 0.8rem 0;
    color: #5a4fcf;
    position: relative;
    padding-left: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.feature-preview li::before {
    content: '✅';
    position: absolute;
    left: 0;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Daily challenge styles */
.daily-challenge {
    text-align: center;
    padding: 2rem;
}

.challenge-header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.challenge-date {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.challenge-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    text-align: left;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.challenge-difficulty {
    margin: 2rem 0;
}

.difficulty-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.challenge-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.challenge-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    text-align: left;
    margin-top: 2rem;
}

.challenge-info h3 {
    color: #333;
    margin-bottom: 1rem;
}

.challenge-info ul {
    list-style: none;
    padding: 0;
}

.challenge-info li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.challenge-info li::before {
    content: '•';
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Footer styles */
.site-footer {
    background: linear-gradient(135deg, rgba(90, 79, 207, 0.95) 0%, rgba(255, 107, 157, 0.92) 100%);
    color: #ffffff;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -12px 40px rgba(90, 79, 207, 0.25);
}

.site-footer::before,
.site-footer::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.25;
}

.site-footer::before {
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.3);
    top: -120px;
    right: -80px;
}

.site-footer::after {
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.25);
    bottom: -100px;
    left: -60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 2rem 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.footer-title {
    font-size: 1.6rem;
    letter-spacing: 0.03em;
}

.footer-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.8;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.footer-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ffffff;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-column h3::after {
    content: '';
    display: block;
    width: 14px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 999px;
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 0.65rem;
    padding: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.footer-links a::before {
    content: '›';
    font-size: 1rem;
    opacity: 0.65;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer-contact a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.footer-contact a:hover {
    color: #ffe8f4;
    transform: translateX(4px);
}

.footer-highlight {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    color: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(6px);
}

.footer-highlight span {
    font-size: 0.9rem;
    opacity: 0.85;
}

.footer-highlight strong {
    font-size: 1.1rem;
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 2rem 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .footer-inner {
        padding: 3rem 1.5rem 2rem;
        gap: 2rem;
    }

    .footer-bottom {
        padding: 1.2rem 1.5rem 1.8rem;
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.2rem 1.8rem;
    }

    .footer-logo {
        font-size: 1.6rem;
    }

    .footer-tags {
        gap: 0.4rem;
    }
}

/* Tournament styles */
.tournament-section {
    padding: 2rem;
}

.tournament-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tournament-header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.tournament-status {
    margin: 2rem 0;
}

.status-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.tournament-info {
    margin: 1rem 0;
}

.tournament-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.tournament-time,
.tournament-participants {
    color: #666;
    margin: 0.25rem 0;
}

.tournament-leaderboard {
    margin: 2rem 0;
}

.tournament-leaderboard h3 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.leaderboard {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    gap: 1rem;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
}

.leaderboard-item.silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
}

.leaderboard-item.bronze {
    background: linear-gradient(135deg, #cd7f32, #daa520);
}

.rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    min-width: 2rem;
}

.player-info {
    flex: 1;
    text-align: left;
}

.player-name {
    font-weight: bold;
    color: #333;
}

.player-score {
    color: #666;
    font-size: 0.9rem;
}

.medal {
    font-size: 1.5rem;
}

.tournament-schedule {
    margin: 2rem 0;
}

.tournament-schedule h3 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.schedule-list {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-date {
    font-weight: bold;
    color: #333;
}

.schedule-name {
    color: #666;
}

.schedule-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.schedule-status.active {
    background: #e8f5e8;
    color: #2e7d32;
}

.schedule-status.upcoming {
    background: #fff3e0;
    color: #f57c00;
}

/* Rules page styles */
.rules-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.rules-header {
    text-align: center;
    margin-bottom: 3rem;
}

.rules-header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.rule-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.rule-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.rule-example {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.example-grid {
    display: inline-block;
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
}

.grid-row {
    display: flex;
}

.grid-cell {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: white;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.rule-icon {
    font-size: 2rem;
    min-width: 3rem;
}

.rule-text h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.rule-text p {
    color: #666;
    margin: 0;
}

.play-instructions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.step-number {
    background: #667eea;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    min-width: 2rem;
}

.step-content h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #666;
    margin: 0;
}

.error-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.error-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #ffebee;
    border-radius: 8px;
}

.error-icon {
    font-size: 2rem;
    min-width: 3rem;
}

.error-text h3 {
    color: #d32f2f;
    margin-bottom: 0.5rem;
}

.error-text p {
    color: #666;
    margin: 0;
}

.difficulty-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.difficulty-card {
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
}

.difficulty-card.easy {
    background: #e8f5e8;
    border-color: #4caf50;
}

.difficulty-card.medium {
    background: #fff3e0;
    border-color: #ff9800;
}

.difficulty-card.hard {
    background: #ffebee;
    border-color: #f44336;
}

.difficulty-card.expert {
    background: #f3e5f5;
    border-color: #9c27b0;
}

.difficulty-card.master {
    background: #e1f5fe;
    border-color: #2196f3;
}

.difficulty-card.extreme {
    background: #fce4ec;
    border-color: #e91e63;
}

.difficulty-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.difficulty-card p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Site map styles */
.sitemap-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.sitemap-header {
    text-align: center;
    margin-bottom: 3rem;
}

.sitemap-header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.sitemap-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.sitemap-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sitemap-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.sitemap-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.sitemap-item {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sitemap-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.sitemap-link {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    gap: 1rem;
}

.sitemap-link:hover {
    text-decoration: none;
    color: inherit;
}

.link-icon {
    font-size: 2rem;
    min-width: 3rem;
    text-align: center;
}

.link-content h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.link-content p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Page summary styles */
.page-summary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 255, 0.95) 100%);
    border-radius: 25px;
    padding: 2.5rem;
    margin: 3rem auto;
    max-width: 1000px;
    box-shadow: 0 15px 40px rgba(255, 154, 158, 0.2);
    border: 2px solid #fecfef;
}

.page-summary h2 {
    color: #ff6b9d;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.page-summary p {
    color: #5a4fcf;
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

/* Bookmark and share button styles */
.btn-bookmark, .btn-share {
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(255, 154, 158, 0.3);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.9);
    color: #5a4fcf;
    margin-left: 0.25rem;
    min-width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-bookmark:hover, .btn-share:hover {
    background: rgba(255, 154, 158, 0.1);
    border-color: #ff9a9e;
    transform: translateY(-1px);
}

/* Share modal styles */
.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 1rem;
    border: 2px solid #fecfef;
    border-radius: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.share-btn:hover {
    background: linear-gradient(135deg, #ffeef8 0%, #f0e6ff 100%);
    border-color: #ff9a9e;
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.share-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.share-text {
    font-weight: 600;
    color: #5a4fcf;
}

.share-url {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.share-url input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #fecfef;
    border-radius: 4px;
    background: #f8f9ff;
    color: #5a4fcf;
    font-size: 0.9rem;
}

.victory-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Tips page styles */
.tips-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.tips-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tips-header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.tips-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.tip-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tip-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.tip-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.tip-icon {
    font-size: 2rem;
    min-width: 3rem;
}

.tip-content h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.tip-content p {
    color: #666;
    margin-bottom: 1rem;
}

.tip-example {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    font-size: 0.9rem;
    color: #555;
}

.toggle-example-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.tip-example:not(.expanded) {
    display: none;
}

.practice-tips {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.practice-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.practice-icon {
    font-size: 2rem;
    min-width: 3rem;
}

.practice-text h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.practice-text p {
    color: #666;
    margin: 0;
}

.strategy-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.strategy-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.strategy-item h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.strategy-item p {
    color: #666;
    margin: 0;
}

/* Crossword Clue mini-game styles */
.crossword-game {
    width: 100%;
    max-width: 780px;
    align-items: stretch;
    gap: 1.5rem;
}

.crossword-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crossword-header h1 {
    font-size: 2rem;
    color: #ff6b9d;
}

.crossword-header p {
    color: #5a4fcf;
    font-size: 1.1rem;
}

.clue-card {
    background: white;
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 10px 30px rgba(90, 79, 207, 0.12);
    border: 2px solid rgba(255, 154, 158, 0.2);
}

.clue-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: #5a4fcf;
    font-weight: 600;
}

.clue-label {
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(90, 79, 207, 0.8);
}

.clue-difficulty {
    background: rgba(255, 154, 158, 0.15);
    color: #ff6b9d;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.clue-text {
    font-size: 1.4rem;
    color: #2f2a8c;
    font-weight: 600;
}

.answer-panel {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.answer-panel label {
    font-weight: 600;
    color: #5a4fcf;
}

.answer-panel input {
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 2px solid rgba(90, 79, 207, 0.2);
    font-size: 1.2rem;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.25em;
    background: rgba(255, 255, 255, 0.9);
    color: #2f2a8c;
}

.answer-panel input:focus {
    outline: none;
    border-color: #ff9a9e;
    box-shadow: 0 0 0 4px rgba(255, 154, 158, 0.2);
}

.answer-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.crossword-stats {
    justify-content: center;
    gap: 2.5rem;
}

.hint-banner {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.18) 0%, rgba(254, 207, 239, 0.25) 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 154, 158, 0.4);
    box-shadow: 0 8px 20px rgba(255, 154, 158, 0.15);
    color: #5a4fcf;
}

.hint-banner h3 {
    margin-bottom: 0.4rem;
    color: #ff6b9d;
}

.history-panel {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid rgba(90, 79, 207, 0.1);
    box-shadow: 0 8px 25px rgba(90, 79, 207, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-panel h2 {
    color: #5a4fcf;
    font-size: 1.4rem;
}

.history-panel ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.history-item {
    display: flex;
    gap: 0.8rem;
    background: white;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    align-items: flex-start;
    border: 1px solid rgba(90, 79, 207, 0.1);
}

.history-item.correct {
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.history-item.incorrect {
    border-color: rgba(255, 107, 107, 0.3);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
}

.history-item span {
    font-size: 1.4rem;
    line-height: 1;
}

.history-item strong {
    color: #2f2a8c;
}

.history-item p {
    margin-top: 0.2rem;
    color: #5a4fcf;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .crossword-game {
        padding: 1.2rem;
    }

    .answer-actions {
        flex-direction: column;
    }

    .crossword-stats {
        gap: 1.5rem;
    }
}

/* Extreme Pamplona page styles */
.arcade-hero {
    max-width: 900px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 249, 255, 0.85) 100%);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 154, 158, 0.25);
    box-shadow: 0 18px 40px rgba(90, 79, 207, 0.12);
}

.arcade-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #ff6b9d;
}

.arcade-hero .hero-tagline {
    font-size: 1.2rem;
    color: #5a4fcf;
}

.tip-landscape {
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed rgba(255, 154, 158, 0.6);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: #ff6b9d;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(255, 154, 158, 0.15);
}

.stage {
    display: flex;
    justify-content: center;
    width: 100%;
}

.frame-wrap {
    position: relative;
    max-width: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 3px solid rgba(255, 154, 158, 0.3);
    background: #000;
    box-shadow: 0 25px 45px rgba(90, 79, 207, 0.2);
}

.frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.arcade-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 16, 29, 0.65);
    backdrop-filter: blur(6px);
    transition: opacity 0.4s ease;
}

.arcade-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.arcade-spinner {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ff6b9d;
    animation: spin 1s linear infinite;
}

.content-section {
    max-width: 960px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 249, 255, 0.92) 100%);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    border: 2px solid rgba(255, 154, 158, 0.2);
    box-shadow: 0 12px 32px rgba(90, 79, 207, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.content-section h2 {
    font-size: 1.8rem;
    color: #ff6b9d;
}

.content-grid,
.tips-grid,
.related-grid {
    display: grid;
    gap: 1.5rem;
}

.content-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tips-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-card,
.related-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    border: 1px solid rgba(255, 154, 158, 0.25);
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(90, 79, 207, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover,
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(90, 79, 207, 0.18);
}

.info-card h3 {
    margin-bottom: 0.75rem;
    color: #5a4fcf;
}

.info-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.info-card ul li::before {
    content: '•';
    color: #ff6b9d;
    margin-right: 0.5rem;
}

.faq details {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 154, 158, 0.25);
    box-shadow: 0 6px 16px rgba(90, 79, 207, 0.12);
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: #5a4fcf;
}

.faq p {
    margin-top: 0.75rem;
}

.feature-list,
.compatibility-list,
.update-log {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-list li::before {
    content: '★';
    color: #ff6b9d;
    margin-right: 0.6rem;
}

.compatibility-list li::before {
    content: '✔';
    color: #5a4fcf;
    margin-right: 0.6rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 35px rgba(90, 79, 207, 0.18);
}

.video-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.screenshot-grid figure {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 154, 158, 0.25);
    box-shadow: 0 12px 28px rgba(90, 79, 207, 0.14);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding-bottom: 1rem;
}

.screenshot-grid img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-grid figcaption {
    padding: 0 1rem;
    color: #5a4fcf;
}

.rating-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    border: 1px solid rgba(255, 154, 158, 0.3);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 12px 32px rgba(90, 79, 207, 0.15);
}

.rating-score {
    font-size: 3rem;
    font-weight: 700;
    color: #ff6b9d;
}

.rating-score span {
    font-size: 1.5rem;
    color: #5a4fcf;
    margin-left: 0.25rem;
}

.rating-stars {
    font-size: 1.8rem;
    color: #ffcf48;
    margin-top: 0.5rem;
}

.update-log li strong {
    color: #5a4fcf;
}

.reviews {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.reviews blockquote {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    border: 1px solid rgba(255, 154, 158, 0.25);
    padding: 1.5rem;
    box-shadow: 0 12px 28px rgba(90, 79, 207, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reviews cite {
    font-style: normal;
    font-weight: 600;
    color: #ff6b9d;
}

.review-cta {
    text-align: center;
    font-weight: 600;
}

.review-cta a {
    color: #ff6b9d;
}

.related-card {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 1024px) {
    .frame-wrap {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 10;
    }

    .frame {
        height: 100%;
    }
}

@media (max-width: 768px) {
    .arcade-hero {
        padding: 2rem 1.5rem;
    }

    .content-section {
        padding: 1.75rem;
    }

    .video-wrapper {
        padding-top: 62.5%;
    }
}
.gallery-main {
    background: linear-gradient(180deg, #f6f4ff 0%, #ffffff 60%);
    display: block;
    min-height: unset;
    padding: 0;
    overflow: visible;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.gallery-hero {
    background: linear-gradient(135deg, rgba(91, 79, 207, 0.18), rgba(255, 154, 158, 0.2));
    border-radius: 24px;
    padding: 2.75rem clamp(1.5rem, 4vw, 3rem);
    box-shadow: 0 24px 50px rgba(87, 71, 198, 0.15);
    text-align: left;
    color: #2f1f9a;
    margin-bottom: 2.75rem;
}

.gallery-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.85);
    color: #4b3ac6;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(74, 58, 198, 0.16);
}

.gallery-hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2.6rem, 4.5vw, 3.25rem);
    color: #20137f;
}

.gallery-hero p {
    margin: 0;
    max-width: 640px;
    font-size: 1.08rem;
    line-height: 1.6;
    color: rgba(32, 19, 127, 0.78);
}

.game-gallery {
    background: #ffffff;
    border-radius: 22px;
    padding: 2.5rem clamp(1.25rem, 3vw, 2.5rem) 2.75rem;
    box-shadow: 0 18px 45px rgba(94, 66, 187, 0.12);
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.gallery-section-title {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    color: #20137f;
}

.gallery-section-subtitle {
    margin: 0;
    font-size: 1rem;
    color: rgba(32, 19, 127, 0.65);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: #ffffff;
    border: 1px solid rgba(94, 66, 187, 0.12);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(94, 66, 187, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.game-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.game-card figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f0f2ff;
    border-bottom: 1px solid rgba(94, 66, 187, 0.12);
}

.game-card figcaption {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.95rem 0.75rem;
    font-size: 0.96rem;
    font-weight: 600;
    color: #2461d7;
    background: linear-gradient(180deg, #eff5ff 0%, #e1ecff 100%);
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px rgba(94, 66, 187, 0.18);
    border-color: rgba(36, 97, 215, 0.35);
}

@media (max-width: 1024px) {
    .gallery-container {
        padding: 2.5rem 1.5rem 3.5rem;
    }

    .game-gallery {
        padding: 2.25rem 1.5rem 2.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        padding: 2.25rem 1.25rem 3rem;
    }

    .gallery-hero {
        padding: 2.25rem 1.5rem;
        margin-bottom: 2.25rem;
    }

    .gallery-grid {
        gap: 1.25rem;
    }
}

@media (max-width: 520px) {
    .gallery-section-title {
        font-size: 1.6rem;
    }

    .gallery-section-subtitle {
        font-size: 0.95rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .game-card figcaption {
        font-size: 0.9rem;
        padding: 0.85rem 0.65rem;
    }
}
