:root {
    --bg-color: #fcf9f2; /* Rice paper color */
    --ink-black: #2b2b2b;
    --ink-light: #5a5a5a;
    --ink-wash: rgba(43, 43, 43, 0.1);
    --accent-red: #c4342d; /* Seal red */
    --font-primary: "Noto Serif TC", "Songti TC", "SimSun", "Times New Roman", serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--ink-black);
    font-family: var(--font-primary);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0,0,0,0.02) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0,0,0,0.02) 0%, transparent 20%);
}

/* Typography */
h1, h2, h3 {
    font-weight: normal;
    letter-spacing: 0.2em;
}

/* Header */
header {
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    margin-bottom: 2rem;
}

.site-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.site-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    background-color: var(--accent-red);
    border-radius: 4px;
    position: absolute;
    top: -10px;
    right: -30px;
    z-index: -1;
    opacity: 0.8;
    filter: blur(1px);
    transform: rotate(15deg);
}

.site-desc {
    font-size: 1.2rem;
    color: var(--ink-light);
    font-style: italic;
}

/* Ink Wash Background Effect */
.ink-stain {
    position: absolute;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    filter: blur(20px);
    z-index: -1;
    pointer-events: none;
}

/* Game Grid */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

/* Game Card - Scroll/Painting Style */
.game-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 1.5rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxmaWx0ZXIgaWQ9Im4iPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjUiIG51bU9jdGF2ZXM9IjEiIHN0aXRjaFRpbGVzPSJzdGl0Y2giLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ0cmFuc3BhcmVudCIvPjwvc3ZnPg==');
    opacity: 0.05;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.game-thumb {
    width: 100%;
    height: 200px;
    background-color: #eee;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    filter: grayscale(80%) contrast(1.2);
    transition: filter 0.5s ease;
}

.game-card:hover .game-thumb {
    filter: grayscale(0%) contrast(1);
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--ink-black);
    padding-bottom: 0.5rem;
    display: inline-block;
    width: 100%;
}

.game-desc {
    color: var(--ink-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    flex-grow: 1;
}

.play-btn {
    align-self: flex-end;
    text-decoration: none;
    color: var(--ink-black);
    border: 1px solid var(--ink-black);
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.play-btn:hover {
    color: #fff;
    background: var(--ink-black);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    margin-top: 4rem;
    color: var(--ink-light);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Loading Animation */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

.ink-drop {
    width: 20px;
    height: 20px;
    background: var(--ink-black);
    border-radius: 50%;
    animation: ink-spread 1.5s infinite ease-out;
}

@keyframes ink-spread {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(5); opacity: 0; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 3rem;
    }
    
    .game-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}
