@import "theme.css";

header.hero {
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--bg-2), var(--panel));
    border-bottom: var(--border);
    text-align: center;
    width: 100%;
    margin-bottom: 60px;
}

#titlelogo {
    font-size: clamp(48px, 10vw, 96px);
    font-weight: 800;
    line-height: 0.9;
    margin: 20px 0;
    letter-spacing: -0.05em;
    color: var(--text);
}

#greeting {
    font-family: var(--font-main);
    color: var(--accent);
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.theme-picker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 24px auto 0;
    padding: 10px 20px;
    background: var(--panel);
    border: var(--border);
    border-radius: 99px;
    box-shadow: var(--shadow);
}

.theme-picker select {
    width: auto;
    border: none;
    background: transparent;
    font-weight: bold;
    padding: 0;
    cursor: pointer;
}

/* Updated Cards Grid - Fixed Alignment */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: min(1000px, 90%);
    margin: 0 auto 80px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;
    aspect-ratio: 1/1; /* Square cards */
    gap: 16px;
}

.card img {
    width: 64px; /* Smaller images */
    height: 64px;
    object-fit: contain;
}

.card .title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

/* Games Grid - Fixed Alignment & Small Squares */
.games,
#games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    width: min(1100px, 95%);
    margin: 40px auto 80px;
}

.games a,
#games a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--panel);
    border: var(--border);
    transition: var(--transition);
}

.games .game-ad-row,
#games .game-ad-row {
    grid-column: 1 / -1;
    border-radius: var(--radius);
    background: var(--panel);
    border: var(--border);
    overflow: hidden;
    padding: 0;
}

.games .game-ad-row ins,
#games .game-ad-row ins {
    display: block;
    width: 100%;
    height: 100%;
}

.games a:hover,
#games a:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: var(--panel-2);
}

.games img,
#games img {
    width: 80px; /* Small square images */
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-2);
}

.games .title,
#games .title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

@media (max-width: 640px) {
    .games,
    #games {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .games img,
    #games img {
        width: 64px;
        height: 64px;
    }
}

/* About Section Alignment */
.about-section {
    width: min(800px, 90%);
    margin: 0 auto 100px;
    text-align: center;
}

.about-section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    color: var(--accent);
}

.about-section p {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 1.1rem;
}

/* Footer Layout */
.footer {
    border-top: var(--border);
    padding: 60px 24px;
    margin-bottom: 0px;
    text-align: center;
    background: var(--bg-2);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 24px;
}

.footer-links a {
    font-weight: 600;
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--accent);
}

@media (max-width: 640px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .card {
        padding: 20px;
    }
    .card img {
        width: 48px;
        height: 48px;
    }
}
