/* papertanks-index.css */
* {
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --accent-color: #60a5fa;
}

body {
    background-color: var(--bg-color);
    background-image: url('/images/papertanks/lobby-bg.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    width: 100%;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.back-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-color);
}

.menu-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.game-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-subtitle {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.game-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.game-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.primary-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.primary-button:hover {
    background: var(--accent-color);
}

.difficulty-select {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.difficulty-option {
    cursor: pointer;
}

.difficulty-option input {
    display: none;
}

.difficulty-option span {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.difficulty-option input:checked+span {
    background: var(--primary-color);
    color: white;
}

.rules-section {
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 1rem;
}

.rules-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.rules-section ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--secondary-color);
    line-height: 1.8;
}

/* Join Page Specifics */
.link-container {
    display: flex;
    gap: 0.5rem;
}

#invite-link {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-color);
    padding: 0 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
    .game-container {
        padding: 0.75rem;
        /* ~12px padding */
    }

    .game-title {
        font-size: 1.75rem;
        /* Smaller title */
    }

    .game-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }

    .modes-grid {
        grid-template-columns: 100%;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .game-card {
        padding: 1.25rem;
        /* Less padding inside cards */
    }

    .game-card h2 {
        font-size: 1.3rem;
    }

    .card-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
}