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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    color: #fff;
    padding: 30px 20px 50px;
}

/* Header */
.site-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.lang-switcher {
    display: flex;
    gap: 6px;
}

.lang-flag-btn {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 5px;
    padding: 2px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s, opacity 0.2s, box-shadow 0.2s;
    min-width: 44px;
    min-height: 44px;
    opacity: 0.4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lang-flag-btn svg {
    display: block;
    width: 34px;
    height: 23px;
    border-radius: 3px;
}

.lang-flag-btn:hover, .lang-flag-btn:focus {
    border-color: rgba(255,255,255,0.45);
    outline: none;
    opacity: 0.75;
}

.lang-flag-btn.active {
    border-color: transparent;
    opacity: 1;
    transform: scale(1.1);
}

/* Legacy single-button for game pages */
.lang-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    min-width: 44px;
    min-height: 44px;
}
.lang-btn:hover, .lang-btn:focus {
    background: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.7);
    outline: none;
}

.site-header h1 {
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.85;
}

/* Sections */
main {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Category heading */
.category-heading {
    font-size: 2rem;
    font-weight: bold;
    padding-bottom: 12px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-icon {
    font-size: 2rem;
}

/* Games grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Game card */
.game-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 24px 20px;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    min-height: 110px;
}

.game-card:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: #f39c12;
    transform: scale(1.02);
}

.game-card:focus {
    outline: 4px solid #f39c12;
    outline-offset: 3px;
}

/* Icon */
.game-icon {
    font-size: 3rem;
    flex-shrink: 0;
    width: 90px;
    text-align: center;
}

/* Info */
.game-info {
    flex: 1;
}

.game-info h3 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.game-info p {
    font-size: 1.05rem;
    opacity: 0.85;
    line-height: 1.4;
}

/* Profile + Join side-by-side row */
.profile-join-row {
    display: flex;
    gap: 24px;
    align-items: stretch;
    flex-wrap: wrap;
}

.join-half,
.profile-half {
    flex: 1;
    min-width: 260px;
}

.card-half-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Profile card */
.profile-card {
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 20px 24px;
}

.profile-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-field label {
    font-size: 1.05rem;
    opacity: 0.85;
    font-weight: 600;
}

.profile-age-input {
    flex: none;
    width: 100px;
    min-width: unset;
}

/* Join-from-menu card */
.join-card {
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 680px;
}

.join-card-text {
    font-size: 1.15rem;
    opacity: 0.9;
    line-height: 1.5;
}

.join-card-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.join-card-input {
    flex: 1;
    min-width: 200px;
    font-size: 1.2rem;
    padding: 14px 18px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.join-card-input::placeholder { opacity: 0.6; }

.join-card-input:focus {
    border-color: #f39c12;
}

.join-card-btn {
    font-size: 1.2rem;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    background: #f39c12;
    color: #fff;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    min-height: 52px;
}

.join-card-btn:hover { background: #e67e22; transform: scale(1.03); }
.join-card-btn:focus { outline: 4px solid #f39c12; outline-offset: 3px; }

.join-card-btn-full { width: 100%; }

.join-card-input--error { border-color: #e74c3c !important; }

.join-card-error {
    font-size: 1rem;
    color: #e74c3c;
    margin: 0;
}

