/* Homepage styles */
#app {
    width: 100%;
    max-width: 800px;
    padding: 40px 20px;
    text-align: center;
}

/* --- Room Join Section --- */
.room-join-section {
    margin: 24px 0 16px;
}

.join-label {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 16px;
}

.room-join {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

#room-code-input {
    font-size: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    width: 180px;
    padding: 14px 12px;
    border: 3px solid #d4a017;
    border-radius: 12px;
    background: #16213e;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#room-code-input:focus {
    border-color: #f0c040;
    box-shadow: 0 0 16px rgba(212, 160, 23, 0.3);
}
#room-code-input::placeholder {
    color: #555;
    font-weight: 400;
}

#room-join-btn {
    font-size: 1.3rem;
    padding: 14px 28px;
    background: #d4a017;
    color: #1a1a2e;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}
#room-join-btn:hover {
    background: #f0c040;
}
#room-join-btn:active {
    transform: scale(0.97);
}

.room-error {
    color: #e74c3c;
    font-size: 0.95rem;
    min-height: 1.4em;
    margin-top: 8px;
}

/* --- Divider --- */
.section-divider {
    color: #555;
    font-size: 0.95rem;
    margin: 32px 0 8px;
    position: relative;
}
.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: #333;
}
.section-divider::before { right: calc(50% + 120px); }
.section-divider::after { left: calc(50% + 120px); }

/* --- Game Grid --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.game-card {
    display: block;
    background: #16213e;
    border: 2px solid #d4a017;
    border-radius: 12px;
    padding: 30px 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(212, 160, 23, 0.2);
}

.game-card h2 {
    margin-bottom: 10px;
}

.game-tagline {
    color: #aaa;
    font-size: 1rem;
    margin-bottom: 12px;
}

.game-players {
    color: #d4a017;
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- Misc --- */
.room-code-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d4a017;
    letter-spacing: 0.3em;
    margin: 1rem 0;
}

.back-link {
    display: inline-block;
    color: #d4a017;
    text-decoration: none;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* --- Mobile tweaks --- */
@media (max-width: 480px) {
    #room-code-input {
        font-size: 1.6rem;
        width: 140px;
        padding: 12px 10px;
    }
    #room-join-btn {
        font-size: 1.1rem;
        padding: 12px 20px;
    }
}
