/* ═══════════════════════════════════════════════════════
   GARIX.IO — layout.css
   Main menu — matches reference image design
   ═══════════════════════════════════════════════════════ */

/* ── Overlays wrapper ── */
#overlays {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, var(--ov-a1, 0.5)) 0%,
        rgba(0, 0, 0, var(--ov-a1, 0.5)) 25%,
        rgba(0, 0, 0, var(--ov-a2, 0.8)) 60%,
        rgba(0, 0, 0, var(--ov-a3, 0.98)) 100%
    );
    transform-origin: center center;
        backdrop-filter: var(--blur-menu);
    -webkit-backdrop-filter: var(--blur-menu);
}
.overlay-logo {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 0 16px var(--accent-glow));
}

.overlay-logo-icon {
    height: 48px;
    width: auto;
    display: block;
}
@media (max-width: 900px) {
    .overlay-logo {
        top: 18px;
        left: 18px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 640px) {
    .overlay-logo {
        top: 14px;
        left: 14px;
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 420px) {
    .overlay-logo {
        top: 10px;
        left: 10px;
        width: 32px;
        height: 32px;
    }
}

#overlays.playing {
    background: transparent;
    pointer-events: none;
}

#overlays.playing .left-panel,
#overlays.playing .main-container {
    pointer-events: none;
    opacity: 0;
}

/* ── Logo top-left ── */
.main-title {
    position: fixed;
    top: 20px;
    left: 24px;
    z-index: 10;
}

.main-title h1 {
    font-family: var(--font-game);
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    /* gradient text matching image logo style */
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Settings button top-right ── */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 10;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    padding: 4px;
}

.settings-btn svg {
    width: 26px;
    height: 26px;
}

.settings-btn:hover {
    color: var(--text);
}

.icon-gear {
    width: 22px;
    height: 22px;
}

/* ── Main container ── */
.main-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

/* ── Three-column panel ── */
.left-panel {
    display: grid;
    grid-template-columns: 300px 380px 320px;  /* antes: 300px 1fr 320px */
    gap: 0px;
    width: 100%;
    max-width: 1100px;
    align-items: stretch;
    justify-content: center;  
}

/* ── Column base ── */
.menu-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-divider {
    display: none; /* replaced by grid gap */
}
.menu-column--play {
    background: rgba(var(--bg-card-rgb), var(--bg-card-alpha));
    border: 1px solid var(--border);
    padding: 18px;
    backdrop-filter: var(--blur-menu);
    -webkit-backdrop-filter: var(--blur-menu);
}
/* ══════════════════════════════════════════
   COLUMN 1 — PROFILE
   ══════════════════════════════════════════ */
.menu-column--profile {
    gap: 8px;
}

.profile-card {
    background: rgba(var(--bg-card-rgb), var(--bg-card-alpha));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    flex: 1;
    position: relative; /* necesario para posicionar el logout-btn dentro */
    backdrop-filter: var(--blur-menu);
    -webkit-backdrop-filter: var(--blur-menu);
}

/* Guest state */
.profile-guest {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--bg-row);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.profile-avatar--guest {
    color: var(--accent);
}

.profile-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.profile-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-name--muted {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Perk list (guest) */
.perk-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perk-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-row);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    position: relative;
}

.perk-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.perk-label {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
    font-family: var(--font);
}

.perk-hint {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-card-inner);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    flex-shrink: 0;
}

/* Login button */
.login-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    background: #fff;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    transition: var(--transition);
    font-family: var(--font);
}

.login-google-btn:hover {
    background: #f0f0f0;
    color: #000;
    text-decoration: none;
}

.google-logo {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Discord login button */
.login-discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    margin-top: -6px;
    background: #5865F2;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    font-family: var(--font);
}

.login-discord-btn:hover {
    background: #4752C4;
    color: #fff;
    text-decoration: none;
}

.discord-logo {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.discord-logo path {
    fill: #fff;
}
/* ── Logged state ── */
.profile-logged {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: var(--bg-row);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.profile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-level {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.xp-bar-wrap {
    height: 5px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 2px;
}

.xp-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 6px var(--accent-glow);
}

.xp-text {
    align-self: flex-end;
    font-size: 11px;
    color: var(--text-muted);
}

/* Rows list */
.profile-rows {
    display: flex;
    flex-direction: column;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 2px;
    border-bottom: 1px solid var(--border);
}

.profile-rows .profile-row:last-child {
    border-bottom: none;
}

.profile-row--clickable {
    cursor: pointer;
    transition: var(--transition);
}

.profile-row--clickable:hover {
    background: var(--bg-row);
    margin: 0 -8px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: var(--radius-sm);
}

.profile-row__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-row);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    overflow: hidden;
}

.profile-row__icon--filled {
    background: transparent;
    color: #FFFFFF;
    border-color: transparent;
}
.profile-row__icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-row__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.profile-row__value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.profile-row__add {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--accent-border);
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.profile-row__add:hover {
    background: var(--accent-dim);
}

.profile-row__chevron {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1;
}

/* Logout + id, now understated at the bottom */
.logout-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    padding: 0;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-row);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
 
.logout-btn:hover {
    background: rgba(255, 60, 60, 0.1);
    border-color: rgba(255, 60, 60, 0.4);
    color: #ff5050;
}
 
.logout-btn svg {
    display: block;
}

.profile-id {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font);
    letter-spacing: 0.05em;
    margin-top: 6px;
    text-align: center;
}


.profile-id {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font);
    letter-spacing: 0.05em;
    margin-top: 2px;
}


/* Social buttons */
.social-bottom {
    position: fixed;
    bottom: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 1px;
    z-index: 2000;
}

.social-icon-btn,
.social-icon-btn:link,
.social-icon-btn:visited,
.social-icon-btn:active {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    outline: none;
    opacity: 0.75
}

.social-icon-btn:hover {
    color: var(--text); /* No cambia a azul */
    text-decoration: none;
    transform: translateY(-2px);
}

.social-icon-btn:focus,
.social-icon-btn:focus-visible {
    outline: none;
    box-shadow: none;
}

.social-icon-btn img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.social-icon-btn svg {
    display: block;
    width: 32px;
    height: 32px;
}
@media (max-width: 640px) {
    .social-icon-btn img {
    width: 22px;
    height: 22px;
}
    .social-bottom {
        bottom: 14px;
        right: 14px;
    }
    .social-icon-btn {
        width: 34px;
        height: 34px;
    }
    .social-icon-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* ══════════════════════════════════════════
   COLUMN 2 — SKIN PICKER + NICK + PLAY
   ══════════════════════════════════════════ */
.menu-column--play {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
}


/* Profile nav arrows */
.profile-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-nav__btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-family: var(--font);
}

.profile-nav__btn:hover {
    border-color: var(--accent-border);
    background: var(--accent-dim);
    color: var(--accent);
}

/* Profile dots */
.profile-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.profile-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-light);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.profile-dot.active {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent-glow);
}

/* Nick inputs */
.tag-nick-container {
    display: flex;
    gap: 8px;
}

.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrap--tag {
    width: 90px;
    flex-shrink: 0;
}

.input-icon-wrap--nick {
    flex: 1;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.tag-input,
.nick-input {
    padding: 12px 14px 12px 36px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
    font-weight: 500;
    transition: var(--transition);
    height: 46px;
    width: 100%;
    letter-spacing: 0.05em;
}

.tag-input {
    text-align: left;
}

.tag-input:focus,
.nick-input:focus {
    outline: none;
    border-color: var(--accent-border);
    background: var(--bg-card-inner);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.tag-input::placeholder,
.nick-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}
/* Team color selector */
#teamColorSelector {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    background: var(--bg-card);
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
    font-family: var(--font);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    height: 46px;
    transition: var(--transition);
}

#teamColorSelector:focus {
    outline: none;
    border-color: var(--accent-border);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

#teamColorSelector option {
    background: var(--bg-card);
    color: var(--text);
}
#teamColorSelector {
    animation: none;
}

@keyframes teamColorAppear {
    from {
        opacity: 0;
        transform: translateY(-6px) scaleY(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

#teamColorSelector.team-color-animate {
    /* Pase de pulido UX/animaciones: ya usaba ease-out (sin rebote) — solo
       se acorta 250ms→150ms para alinear con --dur-modal (base.css) y que
       la duración sea consistente con el resto de las apariciones. */
    animation: teamColorAppear var(--dur-modal) var(--ease-out);
    transform-origin: top center;
}

.nick-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

/* Play / Spectate buttons */
.play-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
    font-family: var(--font-game);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    outline: none;
}

.btn:focus,
.btn:focus-visible {
    outline: none;
    box-shadow: none;
}

#play-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-light);
    width: 100%;
}

#play-btn:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

#spectate-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-light);
    width: 100%;
}

#spectate-btn:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

#play-btn .glyphicon,
#spectate-btn .glyphicon {
    font-size: 13px;
    opacity: 0.7;
}
/* ══════════════════════════════════════════
   COLUMN 3 — SERVER LIST
   ══════════════════════════════════════════ */
.menu-column--servers {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.server-panel {
    background: rgba(var(--bg-card-rgb), var(--bg-card-alpha));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: var(--blur-menu);
    -webkit-backdrop-filter: var(--blur-menu);
}
.server-panel__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-align: center;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* Region tabs */
.region-tabs {
    display: flex;
    gap: 6px;
}

.region-btn {
    flex: 1;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--bg-row);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.region-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent-border);
    color: var(--accent);
}

.region-btn:hover:not(.active) {
    background: var(--bg-row-hover);
    color: var(--text-secondary);
}

.region-flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
}

/* Server list */
.server-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.server-list--hidden {
    display: none;
}

.server-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.server-option:last-child {
    border-bottom: none;
}

.server-option:hover {
    background: var(--bg-row-hover);
}

/* No es <button> (es un <div onClick>) — no lo cubre la regla global de
   base.css. Mismo scale(0.97) que el resto de los clickables. */
.server-option:active {
    transform: scale(0.97);
}

.server-option.selected {
    background: var(--accent-dim);
    border-left: 2px solid var(--accent);
    padding-left: 12px;
}

.server-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    flex-shrink: 0;
    transition: var(--transition);
}

.server-option.selected .server-dot {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent-glow);
}

.server-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.server-status {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font);
    white-space: nowrap;
}

/* Social bottom-right */
.social-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    position: fixed;
    bottom: 20px;
    right: 24px;
    z-index: 10;
}

.social-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.5;
}

.social-icon-btn:hover {
    opacity: 1;
}
.game-version-tag {
    position: fixed;
    bottom: 8px;
    left: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    z-index: 5;
    user-select: none;
}