:root {
    --ctp-rosewater: #f5e0dc;
    --ctp-flamingo: #f2cdcd;
    --ctp-pink: #f5c2e7;
    --ctp-mauve: #cba6f7;
    --ctp-lavender: #b4befe;
    --ctp-red: #f38ba8;
    --ctp-maroon: #eba0ac;
    --ctp-peach: #fab387;
    --ctp-yellow: #f9e2af;
    --ctp-green: #a6e3a1;
    --ctp-teal: #94e2d5;
    --ctp-sky: #89dceb;
    --ctp-sapphire: #74c7ec;
    --ctp-blue: #89b4fa;
    --ctp-text: #cdd6f4;
    --ctp-subtext1: #bac2de;
    --ctp-subtext0: #a6adc8;
    --ctp-overlay2: #9399b2;
    --ctp-overlay1: #7f849c;
    --ctp-overlay0: #6c7086;
    --ctp-surface2: #585b70;
    --ctp-surface1: #45475a;
    --ctp-surface0: #313244;
    --ctp-base: #1e1e2e;
    --ctp-mantle: #181825;
    --ctp-crust: #11111b;
}

@font-face {
    font-family: Onest;
    src: url(../fonts/main.ttf);
}

@font-face {
    font-family: OnestBold;
    src: url(../fonts/bold.ttf);
}

header {
    padding-bottom: 10px;
}

h1 {
    color: var(--ctp-lavender);
    font-size: 48px;
    margin-bottom: 10px;
    margin-top: 0;
}

p {
    color: var(--ctp-subtext1);
}


#game-count {
    font-size: 24px;
    margin: 10px 0;
}

hr {
    border-color: var(--ctp-surface2);
    opacity: 0.5;
}

#gsearchbar {
    outline: none;
    width: 355px;
    font-size: 16px;
    border: 2px solid var(--ctp-surface2);
    background-color: var(--ctp-surface0);
    color: var(--ctp-text);
    padding: 12px;
    margin-bottom: 10px;
    transition: 0.2s ease;
}

#gsearchbar:focus {
    background-color: var(--ctp-surface1);
    border-color: var(--ctp-mauve);
    box-shadow: 0 0 0 3px rgba(203, 166, 247, 0.2);
}

#gsearchbar::placeholder {
    color: var(--ctp-overlay0);
}

#gsearchtag {
    outline: none;
    font-size: 16px;
    border: 2px solid var(--ctp-surface2);
    background-color: var(--ctp-surface0);
    color: var(--ctp-text);
    padding: 12px;
    margin-left: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s ease;
}

#gsearchtag:hover,
#gsearchtag:focus {
    background-color: var(--ctp-surface1);
    border-color: var(--ctp-mauve);
}

.gradient-background {
    background: linear-gradient(300deg, var(--ctp-crust), var(--ctp-mantle), var(--ctp-base), var(--ctp-surface0), var(--ctp-surface1), var(--ctp-surface0), var(--ctp-base), var(--ctp-mantle));
    background-size: 480% 480%;
    animation: gradient-animation 80s ease infinite;
}

@keyframes gradient-animation {
    0% { background-position: 0 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

body {
    background-image: url(../img/bg.jpg);
    background-repeat: no-repeat;
    background-position: absolute;
    font-family: Onest;
    color: var(--ctp-text);
    text-align: center;
    cursor: url('../comic.cur'), auto;
}

.logo {
    height: 200px;
    width: 200px;
    margin-bottom: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ctp-lavender);
    text-align: center;
}

a {
    padding: 10px;
    font-size: 24px;
    text-decoration: none;
    color: var(--ctp-blue);
    transition: color 0.2s ease;
}

a:hover { color: var(--ctp-mauve); }

.dot {
    font-size: 24px;
    display: inline;
    color: var(--ctp-overlay0);
}

.visit {
    font-family: OnestBold;
    display: inline;
}

.visit a { color: var(--ctp-lavender); }

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.game-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--ctp-surface0);
    border: 2px solid var(--ctp-surface2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    font-size: 16px;
    color: var(--ctp-text);
    text-align: center;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--ctp-mauve);
    box-shadow: 0 8px 20px rgba(203, 166, 247, 0.3);
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    font-family: Onest;
    color: var(--ctp-text);
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.game-card img.img-broken {
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    padding: 20px 15px;
    box-sizing: border-box;
}

.game-card:has(img.img-broken) .game-title,
.game-card.img-broken .game-title {
    opacity: 1;
}

.game-card.fit-contain img {
    object-fit: contain;
    background-color: var(--ctp-surface0);
}

#quotes{
	color:white;
}
.game-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(4, 13, 9, 0.95), transparent);
    color: var(--ctp-text);
    padding: 40px 15px 15px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
}

.game-card:hover .game-title { opacity: 1; }

.section-divider,
div.polaroid {
    display: none;
}

.game {
    border-radius: 12px;
    height: 100%;
    width: 100%;
    object-fit: cover;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ctp-text);
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

@keyframes smooth-appear {
    to {
        bottom: 20px;
        opacity: 1;
    }
}

.container {
    background-color: var(--ctp-surface0);
    border: 2px solid var(--ctp-surface2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    color: var(--ctp-text);
    padding: 10px;
    position: fixed;
    bottom: -100%;
    opacity: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    animation: smooth-appear 1s ease forwards;
    font-size: 16px;
}

.alphabet-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: var(--ctp-mantle);
    border: 2px solid var(--ctp-surface0);
    padding: 15px 10px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: var(--ctp-mauve) transparent;
}

.alphabet-nav::-webkit-scrollbar { width: 6px; }
.alphabet-nav::-webkit-scrollbar-track { background: transparent; }
.alphabet-nav::-webkit-scrollbar-thumb {
    background-color: var(--ctp-mauve);
    border-radius: 3px;
}

.alphabet-nav a {
    color: var(--ctp-text);
    text-decoration: none;
    padding: 8px 12px;
    font-size: 18px;
    font-family: OnestBold;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-width: 35px;
}

.alphabet-nav a:hover {
    background-color: var(--ctp-mauve);
    transform: scale(1.1);
    color: var(--ctp-crust);
}

html { scroll-behavior: smooth; }

@media (max-width: 768px) {
    .alphabet-nav {
        right: 5px;
        padding: 10px 6px;
        gap: 5px;
    }

    .alphabet-nav a {
        padding: 6px 8px;
        font-size: 14px;
        min-width: 28px;
    }
}

.request-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: var(--ctp-surface0);
    border: 2px solid var(--ctp-surface2);
    border-radius: 12px;
    text-align: left;
}

body.modal-open {
    overflow: hidden;
}

.request-form label {
    display: block;
    color: var(--ctp-text);
    font-size: 16px;
    margin-bottom: 8px;
    margin-top: 20px;
}

.request-form label:first-child { margin-top: 0; }

.request-form input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-family: Onest;
    border: 2px solid var(--ctp-surface2);
    background-color: var(--ctp-mantle);
    color: var(--ctp-text);
    border-radius: 8px;
    outline: none;
    transition: 0.2s ease;
    box-sizing: border-box;
}

.request-form input:focus {
    background-color: var(--ctp-surface1);
    border-color: var(--ctp-mauve);
    box-shadow: 0 8px 20px rgba(203, 166, 247, 0.3);
}

.request-form input::placeholder { color: var(--ctp-overlay0); }

.request-form button {
    margin-top: 30px;
    width: 100%;
    padding: 14px;
    font-size: 18px;
    font-family: OnestBold;
    background-color: var(--ctp-mauve);
    color: var(--ctp-crust);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.request-form button:hover {
    background-color: var(--ctp-lavender);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(203, 166, 247, 0.4);
}

.request-form button:disabled {
    background-color: var(--ctp-overlay0);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.optional-hint {
    color: var(--ctp-overlay1);
    font-size: 14px;
}

/* Indie homepage theme */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #ffffff;
    background-image: none;
    color: #2b2b2b;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    text-align: left;
}

header {
	text-align:center;
	background-color:#3D3F51;
}
.site-header-logo {
    display: block;
    height: 72px;
    margin: 0 auto 8px;
    object-fit: contain;
    width: 72px;
}

.site-header h1 {
    color: #ffffff;
    font-size: 2.8rem;
    margin: 0;
}

.site-header .tagline {
    color: #ffffff;
    font-size: 1.2rem;
    margin-top: 5px;
	font-weight:bold;
}

.site-header .sub-header {
    background-color: #6a7a51;
    color: #f3f3f3;
    font-size: 0.95rem;
    margin: 15px -10px -20px;
    padding: 8px;
}

.container {
    background: transparent;
    display: flex;
    gap: 0;
    margin: 30px auto;
    max-width: 1100px;
    padding: 0 15px;
    position: static;
    transform: none;
    opacity: 1;
    animation: none;
}

.homepage-layout {
    display: block;
    margin: 30px 0;
    max-width: none;
    padding: 0 12px;
}

.content-container {
    min-width: 0;
}

.site-nav {
    align-items: center;
    background: #ede3cb;
    border-bottom: 2px solid #8c826b;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    padding: 12px 15px;
}

.site-nav a {
    color: #1b4b72;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
}

.site-nav a:hover {
    color: #c05238;
}

.card,
.welcome-banner,
.game-card {
    background: #fdfaf1;
    border: 2px solid #8c826b;
    border-radius: 6px;
}

.card {
    background: #ede3cb;
    padding: 15px;
}

.profile,
.webring-box {
    text-align: center;
}

.avatar {
    border: 3px solid #8c826b;
    border-radius: 50%;
    height: 80px;
    margin-bottom: 10px;
    width: 80px;
}

.card h3,
.card h4 {
    border-bottom: 1px dashed #8c826b;
    margin-bottom: 10px;
    padding-bottom: 4px;
}

.side-nav ul,
.activity-feed {
    list-style: none;
}

.side-nav li,
.activity-feed li {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

a {
    color: #1b4b72;
    font-size: inherit;
    padding: 0;
    text-decoration: underline;
}

.webring-box {
    font-size: 0.85rem;
}

.content {
    display: flex;
    flex: 3;
    flex-direction: column;
    gap: 0;
}

.card p {
    color: #2b2b2b;
}

.welcome-modal[hidden] {
    display: none;
}

.welcome-modal {
    align-items: center;
    background: rgba(43, 43, 43, 0.55);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 10;
}

.welcome-modal-content {
    background: #fdfaf1;
    border: 2px solid #8c826b;
    box-shadow: 5px 5px 0 #6a7a51;
    max-width: 480px;
    padding: 28px;
    position: relative;
    width: 100%;
}

.welcome-modal-content h2 {
    color: #2b2b2b;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.welcome-modal-content p {
    color: #2b2b2b;
}

.welcome-modal-close {
    background: #8e3924;
    border: 1px solid #8e3924;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    line-height: 1;
    padding: 7px 10px;
    position: absolute;
    right: 12px;
    top: 12px;
}

.welcome-modal-close:hover {
    background: #6f2718;
}

.catalog-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#game-count {
    color: #2b2b2b;
    flex: 1;
    font-size: 1.3rem;
    margin: 0;
    min-width: 220px;
}

#gsearchbar,
#gsearchtag {
    background: #ffffff;
    border: 2px solid #8c826b;
    border-radius: 4px;
    color: #2b2b2b;
    font-family: inherit;
    font-size: 0.9rem;
    margin: 0;
    padding: 9px 10px;
}

#gsearchbar {
    max-width: 260px;
    width: 100%;
}

#gsearchbar:focus,
#gsearchtag:hover,
#gsearchtag:focus {
    background: #fdfaf1;
    color: #2b2b2b;
}

#gsearchbar::placeholder {
    color: #6f6a5e;
}

.games-container {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0;
    margin-top: 20px;
}

.game-card {
    align-items: stretch;
    aspect-ratio: 1 / 1.15;
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    text-decoration: none;
}

.game-card:hover {
    box-shadow: 3px 3px 0 #8c826b;
    transform: translate(-2px, -2px);
}

.game-card img {
    display: block;
    flex: 1;
    height: auto;
    object-fit: cover;
    width: 100%;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.4;
    color: #2b2b2b;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.game-card img.img-broken {
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    padding: 20px 15px;
    box-sizing: border-box;
}

.game-title {
    background: #fdfaf1;
    color: #2b2b2b;
    flex: 0 0 auto;
    font-size: 0.9rem;
    font-weight: bold;
    min-height: 42px;
    opacity: 1;
    padding: 9px 8px;
    position: static;
    text-align: center;
}

.site-footer {
    background-color: #ede3cb;
    border-top: 3px solid #8c826b;
    font-size: 0.85rem;
    margin-top: 40px;
    padding: 20px;
    text-align: center;
}

.footer-links {
    margin-bottom: 10px;
}

.indieweb-badge {
    font-weight: bold;
}

@media (max-width: 1200px) {
    .games-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .games-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .game-card {
        text-align: center;
    }

    .game-card img {
        min-height: 0;
    }

    .games-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Subpage layout shared by credits.html, changelog.html, request.html,
   about.html and 404.html (moved out of per-page <style> blocks). */
.page-main {
    margin: 30px auto;
    max-width: 760px;
    padding: 0 15px;
}

.page-main.narrow {
    max-width: 680px;
}

.content-panel {
    background: #fdfaf1;
    border: 2px solid #8c826b;
    padding: 24px;
}

.content-panel h2 {
    border-bottom: 1px dashed #8c826b;
    margin-bottom: 14px;
    padding-bottom: 8px;
}

.content-panel h2:not(:first-child) {
    margin-top: 28px;
}

.content-panel p {
    margin-bottom: 8px;
}

.changelog-panel {
    background: #fdfaf1;
    border: 2px solid #8c826b;
    padding: 24px;
}

.changelog-panel h2 {
    border-bottom: 1px dashed #8c826b;
    margin-bottom: 20px;
    padding-bottom: 8px;
}

.changelog-list {
    list-style: none;
    padding-left: 0;
}

.changelog-list > li {
    border-bottom: 1px solid #c8bda5;
    padding: 14px 0;
}

.changelog-list > li:first-child {
    padding-top: 0;
}

.changelog-list > li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.changelog-list ul {
    color: #2b2b2b;
    list-style: disc;
    margin: 10px 0 0;
    max-width: fit-content;
    padding-left: 1.5rem;
    text-align: left;
}

.changelog-list ul li {
    display: list-item;
    list-style-type: disc;
    text-align: left;
}

.changelog-panel time {
    color: #6a7a51;
    display: block;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 3px;
}

/* Light request form theme (overrides the legacy dark .request-form above). */
.request-form {
    background: #fdfaf1;
    border: 2px solid #8c826b;
    border-radius: 0;
    color: #2b2b2b;
    max-width: none;
    padding: 24px;
}

.request-form h2 {
    border-bottom: 1px dashed #8c826b;
    margin-bottom: 18px;
    padding-bottom: 8px;
}

.request-form label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin: 16px 0 6px;
}

.request-form label:first-of-type {
    margin-top: 0;
}

.request-form input {
    background: #ffffff;
    border: 2px solid #8c826b;
    border-radius: 4px;
    color: #2b2b2b;
    font: inherit;
    padding: 10px;
    width: 100%;
}

.request-form input:focus {
    outline: 2px solid rgba(192, 82, 56, .2);
}

.request-form button {
    background: #244158;
    border: 1px solid #102130;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    font: 600 .9rem 'Poppins', sans-serif;
    margin-top: 20px;
    padding: 10px 16px;
    width: auto;
}

.request-form button:hover {
    background: #c05238;
}

/* Footer button that opens a modal looks like the footer links. */
.footer-links .footer-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #1b4b72;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}

.footer-links .footer-btn:hover {
    color: #c05238;
}


