:root {
    /* DTNT MEDIA Foundation */
    --color-primary: #222;
    --color-primary-hover: #767676;
    --color-primary-active: #767676;
    --color-secondary: #333;
    --white: #ffffff;
    --off-white: #fafafa;
    --warm-white: #fafafa;
    --warm-dark: #31302e;
    --warm-gray-500: #666;
    --warm-gray-300: #bbb;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #767676;
    --border-whisper: 1px solid #eee;
    --border-light: #ddd;
    --focus-ring: #222;
    --badge-bg: #f2f9ff;
    --badge-text: #222;
    --shadow-card: rgba(0,0,0,0.04) 0px 4px 18px, rgba(0,0,0,0.027) 0px 2.025px 7.84688px, rgba(0,0,0,0.02) 0px 0.8px 2.925px, rgba(0,0,0,0.01) 0px 0.175px 1.04062px;
    --shadow-deep: rgba(0,0,0,0.01) 0px 1px 3px, rgba(0,0,0,0.02) 0px 3px 7px, rgba(0,0,0,0.02) 0px 7px 15px, rgba(0,0,0,0.04) 0px 14px 28px, rgba(0,0,0,0.05) 0px 23px 52px;
    
    /* Gaming Accent Palette (from @img/sunriseforever-game-console.jpg) */
    --color-gaming-dark: #070F1F;
    --color-gaming-darker: #032359;
    --color-gaming-deep: #052498;
    --color-primary-accent: #065293; /* Console Cyan - Primary Gaming Accent */
    --color-secondary-accent: #164342; /* Retro Teal */
    --color-accent-hover: #074F5C; /* Aqua Blue */
    --color-accent-light: #4488A8; /* Muted Cyan */
    --color-tertiary-accent: #4D29AD; /* Gaming Purple */
    --color-tertiary-hover: #353CCD; /* Royal Blue */
    --color-accent-glow: rgba(6,82,147,0.15);
    --color-accent-glow-strong: rgba(6,82,147,0.25);
    
    --font-family: 'Libre Franklin', -apple-system, system-ui, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    --space-xs: 0.125rem;
    --space-sm: 0.25rem;
    --space-md: 0.5rem;
    --space-lg: 0.75rem;
    --space-xl: 1rem;
    --space-2xl: 1.5rem;
    --space-3xl: 2rem;
    --space-4xl: 3rem;
    --space-5xl: 4rem;
    --radius-micro: 2px;
    --radius-standard: 3px;
    --radius-card: 4px;
    --radius-pill: 9999px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    font-size: 100%;
}
body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--white);
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}
.nav {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: var(--border-whisper);
    z-index: 100;
}
.nav-inner {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}
.nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.nav-logo:hover {
    color: var(--color-primary);
}
.nav-logo img {
    height: 40px;
}
.nav-logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.nav-links {
    display: flex;
    gap: var(--space-2xl);
    align-items: center;
}
.nav-link {
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.nav-link:hover {
    color: var(--color-primary-accent);
}
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}
.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
}
@media (max-width: 768px) {
    .nav-inner {
        position: relative;
    }
    .nav-hamburger {
        display: block;
        z-index: 101;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-xl);
        border-bottom: var(--border-whisper);
        gap: var(--space-md);
    }
    .nav-links.open {
        display: flex;
    }
}
.hero {
    padding: var(--space-5xl) var(--space-xl);
    text-align: center;
    background-color: var(--color-gaming-dark);
    background-image: url("../img/sunriseforever-game-console.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(7,15,31,0.85) 0%, rgba(6,81,147,0.6) 100%);
    z-index: 1;
}
.hero .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-icon {
    width: 64px;
    height: 64px;
    background: var(--off-white);
    border-radius: var(--radius-standard);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-xl);
    color: var(--text-primary);
}
.hero h1 {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -2px;
    color: var(--white);
    margin-bottom: var(--space-xl);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.hero p {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--off-white);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5625rem;
        letter-spacing: -0.5px;
    }
    .hero p {
        font-size: 1rem;
    }
}
.games-section {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--off-white);
}

.search-box {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto var(--space-2xl);
}

.search-box input {
    width: 100%;
    padding: var(--space-lg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-micro);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(34,34,34,0.1);
}

.search-box input::placeholder {
    color: var(--text-muted);
}
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
}
.tool-card {
    background: var(--white);
    border: var(--border-whisper);
    border-radius: var(--radius-card);
    padding: var(--space-2xl);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.tool-card:hover {
    border-color: var(--color-primary-accent);
    box-shadow: 0 4px 12px rgba(6,82,147,0.1);
    transform: translateY(-2px);
}
.tool-card:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}
.tool-card-icon {
    width: 48px;
    height: 48px;
    background: var(--off-white);
    border-radius: var(--radius-standard);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.tool-card:hover .tool-card-icon {
    border-color: var(--color-primary-accent);
}
.tool-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}
.tool-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
}
.generator-section {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--white);
}
.generator-card {
    background: var(--white);
    border: var(--border-whisper);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: var(--space-2xl);
    max-width: 720px;
    margin: 0 auto;
}
.password-display,
.pin-display {
    background: var(--warm-white);
    border-radius: var(--radius-standard);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    text-align: center;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border: var(--border-whisper);
}
.password-display {
    word-break: break-all;
    white-space: pre-wrap;
}
.pin-display {
    flex-wrap: wrap;
    gap: 0.5em;
    font-size: 1.5rem;
}
.pin-digit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0.25em 0.5em;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-micro);
}
.password-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}
.btn {
    padding: 8px 16px;
    border-radius: var(--radius-micro);
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn:hover {
    transform: scale(1.02);
}
.btn:active {
    transform: scale(0.9);
}
.btn:focus {
    outline: 2px solid var(--focus-ring);
    box-shadow: var(--shadow-card);
}
.btn-primary {
    background: var(--color-primary-accent);
    color: var(--white);
    border-color: var(--color-primary-accent);
    box-shadow: 0 2px 4px rgba(6,82,147,0.2);
}
.btn-primary:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 4px 12px rgba(6,82,147,0.3);
}
.btn-primary:active {
    background: var(--color-gaming-deep);
    transform: scale(0.98);
}
.btn-secondary {
    background: var(--color-primary);
    color: var(--white);
    border-color: var(--color-primary);
}
.btn-secondary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}
.btn-accent {
    background: var(--color-secondary-accent);
    color: var(--white);
    border-color: var(--color-secondary-accent);
    box-shadow: 0 2px 4px rgba(22,67,66,0.2);
}
.btn-accent:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    box-shadow: 0 4px 12px rgba(22,67,66,0.3);
}
.btn-tertiary {
    background: var(--color-tertiary-accent);
    color: var(--white);
    border-color: var(--color-tertiary-accent);
    box-shadow: 0 2px 4px rgba(77,41,173,0.2);
}
.btn-tertiary:hover {
    background: var(--color-tertiary-hover);
    border-color: var(--color-tertiary-hover);
    box-shadow: 0 4px 12px rgba(77,41,173,0.3);
}
.btn-ghost {
    background: transparent;
    color: var(--color-primary-accent);
    border: 1px solid var(--color-primary-accent);
}
.btn-ghost:hover {
    background: var(--color-primary-accent);
    color: var(--white);
}
.options-section {
    margin-bottom: var(--space-xl);
}
.options-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    border-bottom: var(--border-whisper);
    padding-bottom: var(--space-sm);
}
.tab-btn {
    background: none;
    border: none;
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-micro);
    transition: all 0.2s ease;
}
.tab-btn.active {
    background: var(--badge-bg);
    color: var(--badge-text);
}
.options-content {
    display: none;
}
.options-content.active {
    display: block;
}
.option-group {
    margin-bottom: var(--space-lg);
}
.option-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}
.option-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-micro);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    transition: border-color 0.2s ease;
    color: var(--text-primary);
    min-height: 40px;
}
.option-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}
.option-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(34,34,34,0.1);
}
.option-input::placeholder {
    color: var(--text-muted);
}
select.option-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75em center;
    padding-right: 2.5em;
}
.checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    cursor: pointer;
}
.checkbox-input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}
.checkbox-label {
    font-size: 0.94rem;
    color: var(--text-primary);
}
.checkbox-hint {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-left: 28px;
    display: block;
    margin-bottom: var(--space-sm);
}
.link-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: var(--border-whisper);
}
.link-output {
    display: flex;
    gap: var(--space-md);
}
.link-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-micro);
    font-size: 0.88rem;
    background: var(--warm-white);
    color: var(--text-secondary);
    font-family: monospace;
}
.alt-section {
    background: var(--warm-white);
    padding: var(--space-4xl) var(--space-xl);
}
.alt-section h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
    text-align: center;
}
.content-section {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--warm-white);
}
.content-section h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
    text-align: center;
}
@media (max-width: 768px) {
    .content-section h2 {
        font-size: 1.5625rem;
        letter-spacing: -0.5px;
    }
    .alt-section h2 {
        font-size: 1.5625rem;
        letter-spacing: -0.5px;
    }
}
.content-block {
    max-width: 720px;
    margin: 0 auto var(--space-xl);
    background: var(--white);
    border: var(--border-whisper);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: var(--space-xl);
}
.content-block h3 {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.27;
    letter-spacing: -0.25px;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}
.content-block p {
    color: var(--text-secondary);
    line-height: 1.6;
}
.content-block ul {
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: var(--space-xl);
}
.content-block li {
    margin-bottom: var(--space-sm);
}
.faq-section {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--white);
}
.faq-section h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
    text-align: center;
}
.faq-container {
    max-width: 720px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: var(--border-whisper);
    padding: var(--space-lg) 0;
}
.faq-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
}
.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}
.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}
.faq-answer {
    display: none;
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    line-height: 1.6;
}
.faq-item.open .faq-answer {
    display: block;
}
.footer {
    background: var(--color-gaming-dark);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    border-top: 1px solid var(--color-primary-accent);
}
.footer p {
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
}
.footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}
.footer a:hover {
    color: #ffffff;
}
.filter-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    padding: var(--space-lg);
    background: var(--warm-white);
    border-radius: var(--radius-standard);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.filter-status p {
    font-size: 0.94rem;
    color: var(--text-secondary);
    margin: 0;
}

.filter-status .btn {
    font-size: 0.875rem;
    padding: var(--space-sm) var(--space-md);
}

@media (max-width: 480px) {
    .filter-status {
        flex-direction: column;
        gap: var(--space-md);
    }
}
.copy-feedback {
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-md);
}
.copy-feedback.show {
    opacity: 1;
}
.hash-value {
    overflow-wrap: break-word;
}
.result-display {
    background: var(--warm-white);
    border-radius: var(--radius-standard);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-muted);
    border: var(--border-whisper);
    word-break: break-word;
}
/* Password Strength Checker specific styles */
.password-input-wrapper {
    position: relative;
    margin-bottom: var(--space-xl);
}
.password-input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 80px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-standard);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    background: var(--white);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
    min-height: 48px;
}
.password-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(34,34,34,0.1);
}
.password-input::placeholder {
    color: var(--text-muted);
}
.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    font-size: 0.88rem;
    flex-shrink: 0;
}
.toggle-password:hover {
    transform: translateY(-50%) scale(1.02);
}
.strength-result {
    margin-bottom: var(--space-xl);
}
.strength-label {
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-standard);
    transition: all 0.3s ease;
}
.strength-label.very-unsecure {
    color: #c53030;
    background: #fff5f5;
}
.strength-label.unsecure {
    color: #dd6b20;
    background: #fffaf0;
}
.strength-label.medium {
    color: #d69e2e;
    background: #fffff0;
}
.strength-label.secure {
    color: #38a169;
    background: #f0fff4;
}
.strength-label.very-secure {
    color: #2563eb;
    background: #ebf8ff;
}
.strength-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: var(--space-md);
}
.strength-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}
.strength-bar-fill.very-unsecure {
    background: #e53e3e;
}
.strength-bar-fill.unsecure {
    background: #ed8936;
}
.strength-bar-fill.medium {
    background: #ecc94b;
}
.strength-bar-fill.secure {
    background: #48bb78;
}
.strength-bar-fill.very-secure {
    background: #4299e1;
}
.strength-details {
    display: none;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--warm-white);
    border-radius: var(--radius-standard);
    border: var(--border-whisper);
}
.strength-details.visible {
    display: flex;
}
.detail-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.94rem;
    color: var(--text-primary);
}
.detail-icon {
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
}
.detail-icon.passed {
    color: #38a169;
}
.detail-icon.failed {
    color: #e53e3e;
}
.detail-text {
    color: var(--text-secondary);
}
@media (max-width: 480px) {
    .password-actions {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
    .link-output {
        flex-direction: column;
    }
    .nav-logo-text {
        font-size: 0.85rem;
    }
    .hashes-output {
        margin-top: var(--space-xl);
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }
    .hash-item {
        display: flex;
        align-items: flex-start;
        gap: var(--space-md);
        padding: var(--space-md);
        background: var(--off-white);
        border-radius: var(--radius-standard);
        border: var(--border-whisper);
        flex-wrap: wrap;
    }
    .hash-label {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-secondary);
        min-width: 70px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
        padding-top: 4px;
    }
    .hash-value {
        flex: 1 1 100%;
        min-width: 0;
        font-family: 'Courier New', monospace;
        font-size: 0.875rem;
        color: var(--text-primary);
        word-break: break-all;
        white-space: pre-wrap;
        padding: 4px 8px;
        background: var(--white);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-micro);
        min-height: 24px;
        overflow-wrap: break-word;
    }
    .btn-copy-hash {
        flex-shrink: 0;
        padding: 4px 12px;
        font-size: 0.8rem;
        min-width: auto;
    }
}

/* Length Unit Converter Styles */
.conversion-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.conversion-input {
    flex: 1;
    min-width: 150px;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-micro);
    font-size: 1.1rem;
    font-family: inherit;
    background: var(--white);
    transition: border-color 0.2s ease;
    color: var(--text-primary);
}

.conversion-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(34,34,34,0.1);
}

.conversion-select {
    padding: 10px 32px 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-micro);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-primary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75em center;
    cursor: pointer;
    min-width: 160px;
}

.conversion-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(34,34,34,0.1);
}

.swap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.swap-btn:hover {
    background: var(--bg-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.swap-btn svg {
    width: 20px;
    height: 20px;
}

.conversion-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.conversion-result {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: var(--space-lg);
    background: var(--bg-light);
    border-radius: var(--radius-small);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
    .conversion-input-group {
        flex-direction: column;
    }

    .conversion-input,
    .conversion-select {
        width: 100%;
        min-width: unset;
    }

    .swap-btn {
        transform: rotate(90deg);
    }
}

/* QR Code Generator Styles */
.qr-type-selector {
    margin-bottom: var(--space-xl);
}

.qr-inputs {
    margin-bottom: var(--space-xl);
}

.qr-input-group {
    display: none;
    margin-bottom: var(--space-lg);
}

.qr-input-group.active {
    display: block;
}

.qr-input-group .option-textarea {
    min-height: 120px;
    resize: vertical;
}

.vcard-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.vcard-row {
    display: flex;
    gap: var(--space-md);
}

.vcard-field {
    flex: 1;
    min-width: 0;
}

.vcard-field-full {
    flex: 1 1 100%;
}

@media (max-width: 640px) {
    .vcard-row {
        flex-direction: column;
    }
}

.qr-settings {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.qr-settings .option-group {
    flex: 1;
    min-width: 150px;
}

.qr-result {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: var(--border-whisper);
}

.qr-display {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 260px;
    background: var(--warm-white);
    border: var(--border-whisper);
    border-radius: var(--radius-standard);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.qr-display img {
    max-width: 100%;
    height: auto;
}

.qr-display canvas {
    max-width: 100%;
    height: auto;
}

.qr-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-lg);
}

@media (max-width: 480px) {
    .qr-settings {
        flex-direction: column;
    }

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

    .qr-actions .btn {
        width: 100%;
    }
}

.error-message {
    color: #c53030;
    font-size: 0.94rem;
    text-align: center;
    margin-bottom: var(--space-md);
    min-height: 1.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.error-message.visible {
    opacity: 1;
}

/* Related games Section */
.related-games {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--off-white);
}

.related-games .section-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
    text-align: center;
}

@media (max-width: 768px) {
    .related-games .section-title {
        font-size: 1.5625rem;
        letter-spacing: -0.5px;
    }
}

.filter-container {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    position: relative;
}

.filter-container .search-input {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-micro);
    font-size: 0.94rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-container .search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(34,34,34,0.1);
}

.filter-container .search-input::placeholder {
    color: var(--text-muted);
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-micro);
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--off-white);
    border-color: var(--color-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--white);
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-xs);
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-card);
    min-width: 160px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.filter-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.filter-option:hover {
    background: var(--off-white);
}

.filter-option.active {
    background: var(--badge-bg);
    color: var(--badge-text);
    font-weight: 600;
}

.filter-option + .filter-option {
    border-top: 1px solid #eee;
}

.tool-type-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid #eee;
}

.tool-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.tool-type-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Gaming Components */

/* Game Category Badge */
.category-badge {
    background: var(--color-primary-accent);
    color: var(--white);
    padding: 0.25em 0.75em;
    border-radius: var(--radius-micro);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    margin-top: var(--space-md);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}
.category-badge:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.category-icon {
    font-size: 0.875rem;
    line-height: 1;
}

/* Game Rating */
.game-rating {
    color: var(--color-tertiary-accent);
    font-weight: 600;
}

/* Play Button (Hero) */
.play-button {
    background: var(--color-tertiary-accent);
    color: var(--white);
    border-radius: var(--radius-standard);
    padding: var(--space-lg) var(--space-xl);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(77,41,173,0.3);
    margin-top: var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
}
.play-button:hover {
    background: var(--color-tertiary-hover);
    transform: translateY(-2px);
}

/* Featured Game Card */
.featured-game-card {
    background: linear-gradient(135deg, var(--color-gaming-dark) 0%, var(--color-gaming-darker) 100%);
    color: var(--white);
    border: 1px solid var(--color-primary-accent);
    border-radius: var(--radius-card);
    padding: var(--space-2xl);
    text-align: center;
}
.featured-game-card:hover {
    border-color: var(--color-accent-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(6,82,147,0.2);
}
.featured-game-card h3 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: var(--space-md);
}
.featured-game-card p {
    color: var(--off-white);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
}

/* Color Picker Styles */
.upload-wrapper {
    margin-bottom: var(--space-xl);
}

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-secondary);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-standard);
    padding: var(--space-3xl);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.upload-prompt:hover,
.upload-prompt.dragover {
    border-color: var(--color-primary);
    background-color: var(--off-white);
}

.upload-prompt svg {
    color: var(--text-muted);
}

.upload-prompt p {
    font-size: 1rem;
    margin: 0;
}

.upload-hint {
    font-size: 0.875rem !important;
    color: var(--text-muted) !important;
}

.image-container {
    position: relative;
    display: block;
    max-width: 100%;
    text-align: center;
}

#uploadedImage {
    max-width: 100%;
    max-height: 500px;
    display: inline-block;
    border-radius: var(--radius-standard);
    cursor: crosshair;
}

.magnifier-canvas {
    position: absolute;
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    box-shadow: var(--shadow-card);
    image-rendering: pixelated;
}

.palette-section {
    margin-bottom: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: var(--border-whisper);
}

.palette-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.palette-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
}

.palette-color {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-standard);
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-card);
}

.palette-color:hover {
    transform: scale(1.1);
    border-color: var(--color-primary);
}

.history-section {
    margin-bottom: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: var(--border-whisper);
}

.history-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.history-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
}

.history-color {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-standard);
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-card);
}

.history-color:hover {
    transform: scale(1.1);
    border-color: var(--color-primary);
}

.color-result {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: var(--border-whisper);
}

.color-preview {
    width: 100%;
    height: 80px;
    border-radius: var(--radius-standard);
    margin-bottom: var(--space-lg);
    border: var(--border-whisper);
    transition: background-color 0.2s ease;
}

.color-values {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.color-value-item {
    flex: 1;
    min-width: 150px;
}

.color-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.color-code-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--warm-white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-standard);
    border: var(--border-whisper);
}

.color-code-row code {
    font-family: 'Courier New', monospace;
    font-size: 0.94rem;
    color: var(--text-primary);
    flex: 1;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--space-xs);
    border-radius: var(--radius-micro);
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    color: var(--color-primary);
    background-color: rgba(0,0,0,0.05);
}

.color-css {
    background: var(--warm-white);
    padding: var(--space-lg);
    border-radius: var(--radius-standard);
    border: var(--border-whisper);
}

.color-css h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.css-code-block {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--white);
    border-radius: var(--radius-micro);
    border: var(--border-whisper);
    margin-bottom: var(--space-sm);
}

.css-code-block:last-child {
    margin-bottom: 0;
}

.css-code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    color: var(--text-primary);
    flex: 1;
    word-break: break-all;
}

.copy-feedback {
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-md);
}

.copy-feedback.visible {
    opacity: 1;
}

/* Memory Card Game Styles */
.game-section {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--white);
}

.game-stats {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.game-stats p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.game-stats span {
    color: var(--text-secondary);
    font-weight: 400;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    max-width: 500px;
    margin: 0 auto;
}

.card {
    aspect-ratio: 3/4;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-standard);
    font-size: 2.5rem;
    top: 0;
    left: 0;
    z-index: 1;
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #fff;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.15);
    position: absolute;
    overflow: hidden;
}

.card-front::before {
    content: "🃏";
    font-size: 2rem;
    opacity: 0.25;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card-front::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 8px;
}

.card-back {
    background: var(--color-primary);
    transform: rotateY(180deg);
    color: var(--white);
}

.card.matched .card-inner {
    transform: rotateY(180deg);
}

.card.matched .card-back {
    background: #38a169;
}

.win-message {
    display: none;
    text-align: center;
    padding: var(--space-2xl);
    margin-top: var(--space-2xl);
    background: var(--warm-white);
    border: var(--border-whisper);
    border-radius: var(--radius-card);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.win-message.visible {
    display: block;
}

.win-message h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #38a169;
    margin-bottom: var(--space-md);
}

.win-message p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

@media (max-width: 480px) {
    .game-grid {
        gap: var(--space-sm);
    }
    
    .card-front,
    .card-back {
        font-size: 1.75rem;
    }
    
    .game-stats {
        gap: var(--space-md);
    }
}

/* Tic-Tac-Toe Styles */
.ttt-game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto var(--space-2xl);
}

.ttt-status {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: var(--space-sm);
    background: var(--border-light);
    padding: var(--space-sm);
    border-radius: var(--radius-standard);
}

.ttt-cell {
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--radius-micro);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ttt-cell:hover:not(.taken) {
    background: var(--warm-white);
}

.ttt-cell.taken {
    cursor: default;
}

.ttt-cell.x-mark {
    color: #3182ce;
}

.ttt-cell.o-mark {
    color: #e53e3e;
}

.ttt-cell.winner {
    background: #c6f6d5;
}

@media (max-width: 480px) {
    .ttt-board {
        grid-template-columns: repeat(3, 80px);
        grid-template-rows: repeat(3, 80px);
    }
    
    .ttt-cell {
        font-size: 2.5rem;
    }
}

/* Minesweeper Styles */
.minesweeper-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto var(--space-2xl);
}

.minesweeper-board {
    display: grid;
    grid-template-columns: repeat(10, 36px);
    grid-template-rows: repeat(10, 36px);
    gap: 2px;
    background: var(--border-light);
    padding: var(--space-sm);
    border-radius: var(--radius-standard);
}

.minesweeper-cell {
    width: 36px;
    height: 36px;
    background: #c0c0c0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--radius-micro);
    user-select: none;
    transition: background-color 0.15s ease;
    border: 2px outset #c0c0c0;
}

.minesweeper-cell:hover:not(.revealed):not(.flagged) {
    background: #d0d0d0;
}

.minesweeper-cell.revealed {
    background: #e8e8e8;
    border: 1px solid #bbb;
    cursor: default;
}

.minesweeper-cell.flagged {
    background: #c0c0c0;
}

.minesweeper-cell.mine {
    background: #e53e3e;
    border: 1px solid #c53030;
}

.minesweeper-cell[data-number="1"] {
    color: #3182ce;
}

.minesweeper-cell[data-number="2"] {
    color: #38a169;
}

.minesweeper-cell[data-number="3"] {
    color: #e53e3e;
}

.minesweeper-cell[data-number="4"] {
    color: #805ad5;
}

.minesweeper-cell[data-number="5"] {
    color: #d69e2e;
}

.minesweeper-cell[data-number="6"] {
    color: #00b5d8;
}

.minesweeper-cell[data-number="7"] {
    color: #1a202c;
}

.minesweeper-cell[data-number="8"] {
    color: #718096;
}

.game-message {
    display: none;
    text-align: center;
    padding: var(--space-2xl);
    margin-top: var(--space-2xl);
    background: var(--warm-white);
    border: var(--border-whisper);
    border-radius: var(--radius-card);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.game-message h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.game-message p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

@media (max-width: 480px) {
    .minesweeper-board {
        grid-template-columns: repeat(10, 30px);
        grid-template-rows: repeat(10, 30px);
        gap: 1px;
    }
    
    .minesweeper-cell {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
    }
}

/* Snake Game Styles */
.snake-game-container,
.pong-game-container,
.breakout-game-container,
.flappy-game-container,
.spaceinvaders-game-container,
.tetris-game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto var(--space-2xl);
}

#gameCanvas {
    background: var(--warm-white);
    border: var(--border-whisper);
    border-radius: var(--radius-standard);
    display: block;
}

.game-over-message {
    display: none;
    text-align: center;
    padding: var(--space-2xl);
    margin-top: var(--space-2xl);
    background: var(--warm-white);
    border: var(--border-whisper);
    border-radius: var(--radius-card);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.game-over-message.visible {
    display: block;
}

.game-over-message h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #c53030;
    margin-bottom: var(--space-md);
}

.game-over-message p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

@media (max-width: 480px) {
    #gameCanvas {
        width: 320px;
        height: 320px;
    }
}

/* Hangman Game Styles */
.hangman-display {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.hangman-display pre {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--text-primary);
    display: inline-block;
    text-align: left;
    background: var(--warm-white);
    padding: var(--space-lg);
    border-radius: var(--radius-standard);
    border: var(--border-whisper);
}

.word-display {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
    padding: var(--space-lg);
    background: var(--warm-white);
    border-radius: var(--radius-standard);
    border: var(--border-whisper);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.letter-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-micro);
    background: var(--white);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.letter-btn:hover:not(.used) {
    background: var(--color-primary);
    color: var(--white);
    border-color: var(--color-primary);
}

.letter-btn:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.letter-btn.used {
    background: var(--off-white);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.letter-btn.used.correct {
    background: #38a169;
    color: var(--white);
    border-color: #38a169;
    opacity: 1;
}

.letter-btn.used.wrong {
    background: #c53030;
    color: var(--white);
    border-color: #c53030;
    opacity: 1;
}

@media (max-width: 480px) {
    .hangman-display pre {
        font-size: 0.75rem;
        padding: var(--space-md);
    }

    .word-display {
        font-size: 1.25rem;
        letter-spacing: 0.1em;
    }

    .letter-btn {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .keyboard {
        gap: 6px;
    }
}

/* Whack-a-Mole Styles */
.whackamole-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 500px;
    margin: 0 auto var(--space-2xl);
}

/* Mobile controls */
.mobile-controls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) auto;
    max-width: 300px;
}

.control-row {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    justify-content: center;
}

.control-btn {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    background: var(--white);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
    touch-action: manipulation;
}

.control-btn:hover {
    background: var(--warm-white);
    border-color: var(--color-primary);
}

.control-btn:active {
    background: var(--color-primary);
    color: var(--white);
    transform: scale(0.95);
}

.control-btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }
}

@media (max-width: 480px) {
    .control-btn {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
}

.hole {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #8B4513;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #654321;
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.5);
}

.hole::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom, #654321, #8B4513);
    border-radius: 50% 50% 0 0;
}

.mole {
    position: absolute;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 80%;
    background: linear-gradient(135deg, #D2691E 0%, #8B4513 100%);
    border-radius: 40% 40% 20% 20%;
    cursor: pointer;
    transition: bottom 0.1s ease-out;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.3);
}

.mole::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 30%;
    background: #F5DEB3;
    border-radius: 50%;
}

.mole::after {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 20%;
    height: 15%;
    background: #333;
    border-radius: 50%;
    box-shadow: -25px 0 0 #333, 25px 0 0 #333;
}

.hole.up .mole {
    bottom: 10%;
}

.hole.up .mole:active {
    transform: translateX(-50%) scale(0.95);
}

/* Mobile controls for snake game */
.mobile-controls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) auto;
    max-width: 300px;
}

.control-row {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    justify-content: center;
}

.control-btn {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    background: var(--white);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
    touch-action: manipulation;
}

.control-btn:hover {
    background: var(--warm-white);
    border-color: var(--color-primary);
}

.control-btn:active {
    background: var(--color-primary);
    color: var(--white);
    transform: scale(0.95);
}

.control-btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }
}

@media (max-width: 480px) {
    .control-btn {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .whackamole-grid {
        gap: var(--space-md);
        max-width: 320px;
    }
}

/* Word Scramble Game Styles */
.scramble-display {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--warm-white);
    border-radius: var(--radius-standard);
    border: var(--border-whisper);
}

.scramble-display h2 {
    font-family: 'Courier New', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-primary-accent);
    text-transform: uppercase;
    margin: 0;
    word-break: break-all;
}

.hint-display {
    text-align: center;
    margin-bottom: var(--space-xl);
    min-height: 3rem;
}

.hint-display #hintText {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.guess-section {
    max-width: 500px;
    margin: 0 auto var(--space-xl);
    text-align: center;
}

.guess-section .option-input {
    margin-bottom: var(--space-lg);
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 0.05em;
}

.guess-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.input-display {
    text-align: center;
    margin-bottom: var(--space-lg);
    font-size: 1rem;
    color: var(--text-secondary);
}

.input-display span {
    font-weight: 600;
    color: var(--color-primary-accent);
    font-family: 'Courier New', monospace;
}

.game-stats {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.game-stats p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.game-stats span {
    color: var(--color-primary-accent);
    font-weight: 700;
}

.timer-display {
    position: relative;
}

.timer-display::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: var(--radius-micro);
    padding: 1px;
    background: linear-gradient(135deg, var(--color-primary-accent), var(--color-secondary-accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    display: none;
}

.timer-display.warning::before {
    display: block;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#timeValue {
    color: var(--color-primary-accent);
    font-weight: 700;
}

.timer-display.warning #timeValue {
    color: var(--text-muted);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@media (max-width: 480px) {
    .scramble-display h2 {
        font-size: 1.75rem;
        letter-spacing: 0.15em;
    }
    
    .game-stats {
        gap: var(--space-md);
    }
    
    .game-stats p {
        font-size: 0.94rem;
    }
    
    .guess-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .guess-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .hint-display {
        padding: 0 var(--space-md);
    }
}

/* Win message specific for Word Scramble */
.win-message {
    background: linear-gradient(135deg, var(--color-primary-accent) 0%, var(--color-secondary-accent) 100%);
    color: var(--white);
    border: none;
}

.win-message h2 {
    color: var(--white);
}

.win-message p {
    color: var(--off-white);
}

.feedback-correct {
    background: linear-gradient(135deg, var(--color-gaming-darker) 0%, var(--color-primary-accent) 100%) !important;
    color: var(--white) !important;
    border: 1px solid var(--color-primary-accent) !important;
}

.feedback-incorrect {
    background: linear-gradient(135deg, #c53030 0%, #e53e3e 100%) !important;
    color: var(--white) !important;
    border: 1px solid #c53030 !important;
}

/* Focus styles for game inputs */
#guessInput:focus {
    border-color: var(--color-primary-accent);
    box-shadow: 0 0 0 3px rgba(6,82,147,0.15);
    outline: none;
}

/* Sliding Puzzle (15-Puzzle) Styles */
.puzzle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--space-2xl) auto;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: var(--space-sm);
    width: 360px;
    height: 360px;
    background: #e0e0e0;
    padding: var(--space-sm);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

@media (max-width: 480px) {
    .puzzle-grid {
        width: 300px;
        height: 300px;
    }
}

.puzzle-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary-accent) 0%, var(--color-secondary-accent) 100%);
    color: var(--white);
    font-size: 1.75rem;
    font-weight: 700;
    border-radius: var(--radius-standard);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    touch-action: manipulation;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
    .puzzle-tile {
        font-size: 1.4rem;
    }
}

.puzzle-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.puzzle-tile:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.puzzle-tile:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.puzzle-tile.empty {
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.puzzle-tile.empty:hover {
    transform: none;
}

.puzzle-tile.empty:focus {
    outline: none;
}

/* Mobile controls hint for puzzle */
.control-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: var(--space-xl);
}

@media (max-width: 768px) {
    .control-hint {
        display: block;
    }
}

@media (min-width: 769px) {
    .control-hint {
        display: none;
    }
}

/* Win message for sliding puzzle */
.game-win-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: var(--space-4xl);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-deep);
    text-align: center;
    z-index: 1000;
    max-width: 90%;
    width: 400px;
}

.game-win-message.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.game-win-message h2 {
    color: var(--color-primary-accent);
    margin-bottom: var(--space-lg);
}

.game-win-message p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Lights Out Game Styles */
.lights-out-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.lights-out-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
    max-width: 400px;
    width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
}

.light-cell {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid var(--border-light);
    background-color: var(--warm-white);
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.light-cell:hover {
    border-color: var(--color-primary-accent);
    transform: scale(1.05);
}

.light-cell:active {
    transform: scale(0.95);
}

.light-cell.on {
    background-color: var(--color-primary-accent);
    border-color: var(--color-primary-accent);
    box-shadow: 0 0 15px var(--color-primary-accent), inset 0 0 10px rgba(255,255,255,0.3);
}

.light-cell:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .lights-out-grid {
        gap: var(--space-sm);
        max-width: 300px;
    }

    .light-cell {
        border-width: 2px;
    }
}
