/* Evita overflow de palavras longas em outros idiomas */
body {
    overflow-wrap: break-word;
    word-break: break-word;
}

.gymbros-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #C98B1D;
    padding: 20px;
    transition: background-color 0.3s ease;
}

.gymbros-header.scrolled {
    background-color: rgba(201, 139, 29, 0.8);
    backdrop-filter: blur(8px);
}

.gymbros-header.scrolled:hover {
    background-color: rgba(201, 139, 29, 1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-icon {
    flex: 1;
    display: flex;
    align-items: center;
}

.menu-icon i,
.user-icon i {
    font-size: 32px;
    cursor: pointer;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transform: translateY(7px);
}

.logo span {
    font-weight: bold;
    font-size: 24px;
    color: #000;
    font-family: sans-serif;
}

i {
    color: #fff;
}

a {
    text-decoration: none;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background-color: #1a1a1a;
    z-index: 999;
    transition: left 0.3s ease;
    padding-top: 80px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}

.side-menu.open {
    left: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-items li {
    padding: 15px 25px;
    border-bottom: 1px solid #333;
    transition: all 0.3s ease;
}

.menu-items li:hover {
    background-color: #333;
    border-radius: 8px;
    margin: 0 10px;
}

.menu-items li a {
    color: #C98B1D;
    text-decoration: none;
    font-family: sans-serif;
    font-size: 18px;
    display: block;
    font-weight: 500;
}

.menu-items li a i {
    color: #C98B1D;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* HEADER RIGHT (lang selector + theme toggle + user icon) */
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* SELETOR DE IDIOMA */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    padding: 3px 5px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 12px;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.15s;
}

.lang-btn:hover    { opacity: 0.85; transform: scale(1.15); }
.lang-btn.active   { opacity: 1; background: rgba(255,255,255,0.2); }

@media (max-width: 480px) {
    .lang-selector { display: none; } /* esconde em telas muito pequenas */
}

.theme-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(20deg);
}

.theme-toggle i {
    font-size: 1rem;
    color: #fff;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* ── Animação do ícone de tema ────────────────────────────────────────── */
@keyframes theme-spin {
    0%   { transform: rotate(0deg) scale(1); opacity: 1; }
    40%  { transform: rotate(180deg) scale(0.5); opacity: 0; }
    60%  { transform: rotate(180deg) scale(0.5); opacity: 0; }
    100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

.theme-icon-spin {
    animation: theme-spin 0.45s ease-in-out forwards;
}

#themeIcon {
    transition: color 0.3s ease;
    font-size: 1rem;
    color: #fff;
}