/* Steam Games - Стиль в едином стиле с мессенджером */
:root {
    --steam-primary: var(--primary);
    --steam-primary-dark: var(--primary-dark);
    --steam-secondary: var(--secondary);
    --steam-danger: var(--danger);
    --steam-warning: var(--warning);
    --steam-bg-primary: var(--bg-primary);
    --steam-bg-secondary: var(--bg-secondary);
    --steam-bg-tertiary: var(--bg-tertiary);
    --steam-text-primary: var(--text-primary);
    --steam-text-secondary: var(--text-secondary);
    --steam-text-muted: var(--text-muted);
    --steam-border: var(--border);
    --steam-shadow: var(--shadow);
    --steam-transition: var(--transition);
    --steam-online: #57F287;
    --steam-ingame: #FEE75C;
    --steam-offline: #72767D;
}

/* Контейнер Steam */
.steam-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--steam-bg-primary);
    color: var(--steam-text-primary);
    font-family: inherit;
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.steam-container.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

/* Заголовок Steam */
.steam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--steam-bg-secondary);
    border-bottom: 1px solid var(--steam-border);
    height: 60px;
    backdrop-filter: blur(10px);
}

.steam-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.steam-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--steam-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    transition: var(--steam-transition);
}

.steam-logo:hover .steam-logo-icon {
    transform: rotate(15deg) scale(1.1);
    animation: glow 2s infinite;
}

.steam-logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--steam-primary);
    position: relative;
}

.steam-logo-text::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--steam-primary);
    transition: width 0.3s ease;
}

.steam-logo:hover .steam-logo-text::after {
    width: 100%;
}

.steam-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--steam-bg-tertiary);
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--steam-transition);
    position: relative;
    overflow: hidden;
}

.steam-user-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.steam-user-info:hover {
    border-color: var(--steam-primary);
    transform: translateY(-2px);
}

.steam-user-info:hover::before {
    left: 100%;
}

.steam-user-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.steam-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    transition: var(--steam-transition);
}

.steam-user-info:hover .steam-user-avatar img {
    transform: scale(1.1);
}

.steam-user-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: var(--steam-offline);
    border: 2px solid var(--steam-bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steam-user-status i {
    font-size: 6px;
    color: white;
}

.steam-user-status.online {
    background: var(--steam-online);
    animation: blink 2s infinite;
}

.steam-user-status.ingame {
    background: var(--steam-ingame);
    animation: pulse 2s infinite;
}

.steam-user-details h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.steam-user-details p {
    font-size: 11px;
    color: var(--steam-text-secondary);
}

/* Кнопки управления */
.steam-controls {
    display: flex;
    gap: 8px;
}

.steam-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--steam-transition);
    position: relative;
    overflow: hidden;
}

.steam-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.steam-btn:hover {
    background: var(--steam-border);
    color: var(--steam-text-primary);
    transform: translateY(-2px);
}

.steam-btn:hover::before {
    left: 100%;
}

.steam-btn.refresh-btn:hover {
    background: var(--steam-primary);
    color: white;
}

.steam-btn.close-btn:hover {
    background: var(--steam-danger);
    color: white;
}

/* Основная область */
.steam-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Боковая панель */
.steam-sidebar {
    width: 240px;
    background: var(--steam-bg-secondary);
    border-right: 1px solid var(--steam-border);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.steam-nav {
    padding: 0 12px;
    margin-bottom: 20px;
}

.steam-nav-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--steam-text-secondary);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: var(--steam-transition);
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.steam-nav-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--steam-primary);
    border-radius: 0 2px 2px 0;
    transition: height 0.3s ease;
}

.steam-nav-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--steam-text-primary);
    padding-left: 20px;
}

.steam-nav-btn:hover::before {
    height: 60%;
}

.steam-nav-btn.active {
    background: rgba(255,255,255,0.1);
    color: var(--steam-text-primary);
    padding-left: 20px;
}

.steam-nav-btn.active::before {
    height: 60%;
}

.steam-nav-btn.active i {
    color: var(--steam-primary);
}

.steam-nav-btn i {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.steam-badge {
    position: absolute;
    right: 12px;
    background: var(--steam-primary);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

/* Панель входа */
.steam-login-panel {
    background: var(--steam-bg-tertiary);
    margin: 20px 12px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--steam-border);
    text-align: center;
    animation: slideUp 0.3s ease;
}

.steam-login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.steam-login-header i {
    font-size: 20px;
    color: var(--steam-primary);
}

.steam-login-header h4 {
    font-size: 14px;
    color: var(--steam-text-primary);
}

.steam-login-text {
    font-size: 12px;
    color: var(--steam-text-secondary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.steam-login-btn {
    width: 100%;
    padding: 12px;
    background: var(--steam-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--steam-transition);
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.steam-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.steam-login-btn:hover {
    background: var(--steam-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--steam-shadow);
}

.steam-login-btn:hover::before {
    left: 100%;
}

.steam-login-alternative {
    border-top: 1px solid var(--steam-border);
    padding-top: 12px;
}

.steam-login-alternative p {
    font-size: 11px;
    color: var(--steam-text-muted);
    margin-bottom: 8px;
}

.steam-input-group {
    display: flex;
    gap: 8px;
}

.steam-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--steam-bg-primary);
    border: 1px solid var(--steam-border);
    border-radius: 6px;
    color: var(--steam-text-primary);
    font-size: 12px;
    transition: var(--steam-transition);
}

.steam-input:focus {
    outline: none;
    border-color: var(--steam-primary);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

/* Статистика */
.steam-stats {
    padding: 16px 12px;
    background: var(--steam-bg-tertiary);
    margin: 12px;
    border-radius: 8px;
    border: 1px solid var(--steam-border);
    animation: slideUp 0.3s ease 0.1s both;
}

.steam-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--steam-border);
}

.steam-stat:last-child {
    border-bottom: none;
}

.steam-stat i {
    color: var(--steam-primary);
    font-size: 11px;
    width: 20px;
}

.steam-stat span {
    font-size: 12px;
    color: var(--steam-text-secondary);
}

.steam-stat-value {
    color: var(--steam-text-primary) !important;
    font-weight: 600;
}

/* Основное содержимое */
.steam-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.steam-tab {
    display: none;
    animation: fadeIn 0.3s ease;
}

.steam-tab.active {
    display: block;
}

.steam-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--steam-border);
}

.steam-tab-header h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--steam-primary);
}

.steam-search {
    position: relative;
    width: 200px;
}

.steam-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--steam-text-muted);
    font-size: 12px;
}

.steam-search input {
    width: 100%;
    padding: 10px 10px 10px 32px;
    background: var(--steam-bg-tertiary);
    border: 1px solid var(--steam-border);
    border-radius: 6px;
    color: var(--steam-text-primary);
    font-size: 13px;
    transition: var(--steam-transition);
}

.steam-search input:focus {
    outline: none;
    border-color: var(--steam-primary);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

/* Список друзей */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.friend-card {
    background: var(--steam-bg-secondary);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--steam-transition);
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.3s ease both;
}

.friend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.5s ease;
}

.friend-card:hover {
    border-color: var(--steam-primary);
    transform: translateY(-2px);
    box-shadow: var(--steam-shadow);
}

.friend-card:hover::before {
    left: 100%;
}

.friend-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    transition: var(--steam-transition);
}

.friend-card:hover .friend-avatar img {
    transform: scale(1.05);
}

.friend-status {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--steam-bg-secondary);
    border-radius: 50%;
}

.friend-status.online {
    background: var(--steam-online);
    animation: blink 2s infinite;
}

.friend-status.ingame {
    background: var(--steam-ingame);
    animation: pulse 2s infinite;
}

.friend-status.offline {
    background: var(--steam-offline);
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.friend-status-text {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.friend-status-text.online {
    background: rgba(87, 242, 135, 0.2);
    color: var(--steam-online);
}

.friend-status-text.ingame {
    background: rgba(254, 231, 92, 0.2);
    color: var(--steam-ingame);
}

.friend-game {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.friend-game-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.friend-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-game-info {
    flex: 1;
    min-width: 0;
}

.friend-game-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--steam-text-primary);
}

.friend-game-time {
    font-size: 10px;
    color: var(--steam-text-muted);
}

.friend-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: var(--steam-transition);
}

.friend-card:hover .friend-actions {
    opacity: 1;
}

.friend-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--steam-transition);
    position: relative;
    overflow: hidden;
}

.friend-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.friend-action-btn:hover {
    background: var(--steam-primary);
    color: white;
    transform: translateY(-1px);
}

.friend-action-btn:hover::before {
    left: 100%;
}

/* Сетка игр */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.game-card {
    background: var(--steam-bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--steam-transition);
    border: 1px solid transparent;
    cursor: pointer;
    animation: slideUp 0.3s ease both;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.5s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--steam-primary);
    box-shadow: var(--steam-shadow);
}

.game-card:hover::before {
    left: 100%;
}

.game-cover {
    width: 100%;
    height: 100px;
    position: relative;
    overflow: hidden;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-cover img {
    transform: scale(1.05);
}

.game-playtime {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.game-info {
    padding: 12px;
}

.game-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: var(--steam-transition);
}

.game-card:hover .game-actions {
    opacity: 1;
}

.game-action-btn {
    flex: 1;
    padding: 6px;
    background: var(--steam-bg-tertiary);
    border: none;
    border-radius: 4px;
    color: var(--steam-text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: var(--steam-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.game-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.game-action-btn:hover {
    background: var(--steam-primary);
    color: white;
}

.game-action-btn:hover::before {
    left: 100%;
}

/* Панель голосового чата */
.steam-voice-panel {
    width: 240px;
    background: var(--steam-bg-secondary);
    border-left: 1px solid var(--steam-border);
    padding: 16px;
    animation: slideInRight 0.3s ease;
}

.steam-voice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--steam-border);
}

.steam-voice-header h4 {
    flex: 1;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--steam-primary);
}

.steam-voice-toggle {
    background: none;
    border: none;
    color: var(--steam-text-secondary);
    cursor: pointer;
    font-size: 11px;
    transition: var(--steam-transition);
}

.steam-voice-toggle:hover {
    color: var(--steam-text-primary);
    transform: translateY(-1px);
}

.steam-voice-content {
    transition: var(--steam-transition);
}

.steam-voice-users {
    margin-bottom: 12px;
}

.steam-voice-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: var(--steam-transition);
    position: relative;
    overflow: hidden;
}

.steam-voice-user::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.5s ease;
}

.steam-voice-user:hover {
    background: rgba(255,255,255,0.05);
}

.steam-voice-user:hover::before {
    left: 100%;
}

.steam-voice-user.you {
    background: rgba(88, 101, 242, 0.1);
}

.steam-voice-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
}

.steam-voice-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.steam-voice-name {
    flex: 1;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.steam-voice-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--steam-offline);
}

.steam-voice-status.speaking {
    background: var(--steam-online);
    animation: pulse 1s infinite;
}

.steam-voice-controls {
    display: flex;
    gap: 6px;
}

.steam-voice-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--steam-transition);
    font-size: 12px;
    position: relative;
    overflow: hidden;
}

.steam-voice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.steam-voice-btn.mute-toggle {
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-secondary);
}

.steam-voice-btn.mute-toggle:hover {
    background: var(--steam-online);
    color: white;
}

.steam-voice-btn.disconnect {
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-secondary);
}

.steam-voice-btn.disconnect:hover {
    background: var(--steam-danger);
    color: white;
}

.steam-voice-btn.invite {
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-secondary);
}

.steam-voice-btn.invite:hover {
    background: var(--steam-primary);
    color: white;
}

.steam-voice-btn:hover::before {
    left: 100%;
}

/* Карточка приглашения */
.steam-invite-card {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 280px;
    background: var(--steam-bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--steam-primary);
    box-shadow: var(--steam-shadow);
    overflow: hidden;
    z-index: 100;
    animation: slideUp 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.steam-invite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(88, 101, 242, 0.1);
    border-bottom: 1px solid var(--steam-border);
}

.steam-invite-header h4 {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--steam-primary);
}

.steam-btn-close {
    background: none;
    border: none;
    color: var(--steam-text-secondary);
    cursor: pointer;
    font-size: 11px;
    transition: var(--steam-transition);
}

.steam-btn-close:hover {
    color: var(--steam-text-primary);
    transform: rotate(90deg);
}

.steam-invite-content {
    padding: 12px;
}

.steam-invite-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.steam-invite-user img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.steam-invite-details h5 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.steam-invite-details p {
    font-size: 11px;
    color: var(--steam-text-secondary);
}

.steam-invite-game {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--steam-bg-tertiary);
    border-radius: 6px;
    margin-bottom: 12px;
}

.steam-invite-game img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.steam-invite-game-info p {
    font-size: 10px;
    color: var(--steam-text-muted);
    margin-bottom: 2px;
}

.steam-invite-game-info h6 {
    font-size: 11px;
    font-weight: 600;
}

.steam-invite-actions {
    display: flex;
    gap: 8px;
}

.steam-btn-accept, .steam-btn-decline {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--steam-transition);
    position: relative;
    overflow: hidden;
}

.steam-btn-accept::before,
.steam-btn-decline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.steam-btn-accept {
    background: var(--steam-online);
    color: white;
}

.steam-btn-accept:hover {
    background: #46d171;
    transform: translateY(-1px);
}

.steam-btn-accept:hover::before {
    left: 100%;
}

.steam-btn-decline {
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-secondary);
}

.steam-btn-decline:hover {
    background: var(--steam-danger);
    color: white;
    transform: translateY(-1px);
}

.steam-btn-decline:hover::before {
    left: 100%;
}

/* Загрузка */
.steam-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--steam-bg-primary);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10005;
    animation: fadeIn 0.3s ease;
}

.steam-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--steam-border);
    border-top-color: var(--steam-primary);
    border-radius: 50%;
    animation: steam-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes steam-spin {
    to {
        transform: rotate(360deg);
    }
}

.steam-loading-text {
    color: var(--steam-text-primary);
    font-size: 14px;
    font-weight: 500;
}

/* Модальное окно */
.steam-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10020;
    backdrop-filter: blur(5px);
}

.steam-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.steam-modal-content {
    background: var(--steam-bg-primary);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--steam-border);
    overflow: hidden;
    animation: scaleIn 0.3s ease;
}

.steam-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--steam-bg-secondary);
    border-bottom: 1px solid var(--steam-border);
}

.steam-modal-header h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--steam-primary);
}

.steam-modal-close {
    background: none;
    border: none;
    color: var(--steam-text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: var(--steam-transition);
}

.steam-modal-close:hover {
    color: var(--steam-text-primary);
    transform: rotate(90deg);
}

.steam-modal-body {
    padding: 20px;
}

.steam-login-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.steam-login-option {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--steam-bg-secondary);
    border: 1px solid var(--steam-border);
    border-radius: 8px;
    transition: var(--steam-transition);
    animation: slideUp 0.3s ease both;
}

.steam-login-option:nth-child(1) { animation-delay: 0.1s; }
.steam-login-option:nth-child(2) { animation-delay: 0.2s; }
.steam-login-option:nth-child(3) { animation-delay: 0.3s; }

.steam-login-option:hover {
    border-color: var(--steam-primary);
    transform: translateY(-2px);
}

.steam-option-icon {
    width: 48px;
    height: 48px;
    background: var(--steam-bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--steam-primary);
    flex-shrink: 0;
    transition: var(--steam-transition);
}

.steam-login-option:hover .steam-option-icon {
    background: var(--steam-primary);
    color: white;
    transform: rotate(15deg);
}

.steam-option-content {
    flex: 1;
}

.steam-option-content h4 {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--steam-text-primary);
}

.steam-option-content p {
    font-size: 12px;
    color: var(--steam-text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.steam-btn-login {
    padding: 10px 20px;
    background: var(--steam-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--steam-transition);
    position: relative;
    overflow: hidden;
}

.steam-btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.steam-btn-login:hover {
    background: var(--steam-primary-dark);
    transform: translateY(-2px);
}

.steam-btn-login:hover::before {
    left: 100%;
}

.steam-input-container {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.steam-modal-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--steam-bg-tertiary);
    border: 1px solid var(--steam-border);
    border-radius: 6px;
    color: var(--steam-text-primary);
    font-size: 13px;
    transition: var(--steam-transition);
}

.steam-modal-input:focus {
    outline: none;
    border-color: var(--steam-primary);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

.steam-btn-submit {
    padding: 10px 16px;
    background: var(--steam-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--steam-transition);
    position: relative;
    overflow: hidden;
}

.steam-btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.steam-btn-submit:hover {
    background: var(--steam-primary-dark);
    transform: translateY(-1px);
}

.steam-btn-submit:hover::before {
    left: 100%;
}

.steam-help-text {
    font-size: 11px !important;
    color: var(--steam-text-muted) !important;
}

.steam-help-text a {
    color: var(--steam-primary);
    text-decoration: none;
    transition: var(--steam-transition);
}

.steam-help-text a:hover {
    color: var(--steam-text-primary);
    text-decoration: underline;
}

.steam-modal-footer {
    padding: 12px 20px;
    background: var(--steam-bg-tertiary);
    border-top: 1px solid var(--steam-border);
    text-align: center;
}

.steam-modal-note {
    font-size: 11px;
    color: var(--steam-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Пустые состояния */
.steam-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--steam-text-muted);
    animation: fadeIn 0.5s ease;
}

.steam-empty-icon {
    width: 60px;
    height: 60px;
    background: var(--steam-bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: var(--steam-primary);
}

.steam-empty-state h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--steam-text-secondary);
}

.steam-empty-state p {
    font-size: 13px;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Анимация масштабирования */
@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Анимации для модальных окон */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--steam-primary);
    }
    50% {
        box-shadow: 0 0 20px var(--steam-primary);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Fix для Steam overlay */
.steam-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    backdrop-filter: blur(5px);
}

.steam-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Исправление позиционирования модального окна */
.steam-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10020;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.steam-modal.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.steam-modal-content {
    background: var(--steam-bg-primary);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--steam-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

/* Исправление для z-index */
.steam-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--steam-bg-primary);
    color: var(--steam-text-primary);
    font-family: inherit;
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.steam-container.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

/* Убедимся, что Steam UI имеет более высокий z-index чем другие элементы */
.messenger-pc-container {
    position: relative;
    z-index: 1;
}

.steam-overlay.active .steam-container {
    z-index: 10001;
}

/* Заголовки оффлайн друзей */
.friends-offline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 12px 0;
    border-top: 1px solid var(--steam-border);
    animation: slideUp 0.3s ease;
}

.friends-offline-header h4 {
    font-size: 13px;
    color: var(--steam-text-muted);
}

.steam-btn-toggle {
    background: none;
    border: none;
    color: var(--steam-text-muted);
    cursor: pointer;
    font-size: 12px;
    transition: var(--steam-transition);
}

.steam-btn-toggle:hover {
    color: var(--steam-text-primary);
    transform: translateY(-1px);
}

.friends-offline-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideUp 0.3s ease;
}

/* Недавние игры */
.recent-games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-game-card {
    background: var(--steam-bg-secondary);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 12px;
    transition: var(--steam-transition);
    border: 1px solid transparent;
    cursor: pointer;
    animation: slideUp 0.3s ease both;
}

.recent-game-card:hover {
    border-color: var(--steam-primary);
    transform: translateY(-2px);
    box-shadow: var(--steam-shadow);
}

.recent-game-cover {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recent-game-card:hover .recent-game-cover img {
    transform: scale(1.05);
}

.recent-game-info {
    flex: 1;
}

.recent-game-info h5 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.recent-game-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.recent-game-stats span {
    font-size: 11px;
    color: var(--steam-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.steam-btn-small {
    padding: 6px 12px;
    background: var(--steam-bg-tertiary);
    border: none;
    border-radius: 4px;
    color: var(--steam-text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: var(--steam-transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.steam-btn-small:hover {
    background: var(--steam-primary);
    color: white;
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .steam-sidebar {
        width: 200px;
    }

    .steam-voice-panel {
        width: 200px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 1024px) {
    .steam-main {
        flex-direction: column;
    }

    .steam-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--steam-border);
        flex-direction: row;
        padding: 12px;
        flex-wrap: wrap;
    }

    .steam-nav {
        display: flex;
        flex: 1;
        gap: 8px;
        margin-bottom: 0;
        padding: 0;
    }

    .steam-nav-btn {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: 10px;
        font-size: 11px;
    }

    .steam-nav-btn span:not(.steam-badge) {
        display: none;
    }

    .steam-badge {
        top: 5px;
        right: 5px;
        font-size: 9px;
        padding: 1px 4px;
    }

    .steam-login-panel,
    .steam-stats {
        display: none !important;
    }

    .steam-voice-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--steam-border);
    }
}

@media (max-width: 768px) {
    .steam-header {
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 12px;
    }

    .steam-header-left {
        width: 100%;
        justify-content: space-between;
    }

    .steam-logo-text {
        display: none;
    }

    .steam-tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .steam-search {
        width: 100%;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .steam-invite-card {
        width: calc(100% - 40px);
    }

    .steam-modal-content {
        width: 95%;
        max-width: 400px;
    }

    .steam-login-option {
        flex-direction: column;
        text-align: center;
    }

    .steam-option-icon {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .steam-nav-btn i {
        font-size: 16px;
    }

    .friend-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .friend-info {
        text-align: center;
    }

    .friend-game {
        justify-content: center;
    }

    .friend-actions {
        width: 100%;
        justify-content: center;
        opacity: 1;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steam-content {
        padding: 12px;
    }
}

/* Прокрутка */
.steam-content::-webkit-scrollbar {
    width: 8px;
}

.steam-content::-webkit-scrollbar-track {
    background: var(--steam-bg-tertiary);
}

.steam-content::-webkit-scrollbar-thumb {
    background: var(--steam-border);
    border-radius: 4px;
    transition: var(--steam-transition);
}

.steam-content::-webkit-scrollbar-thumb:hover {
    background: var(--steam-text-muted);
}

/* Плавные переходы */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 300ms ease;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 300ms ease;
}
#steamOnlineBadge {
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.steam-notification.success {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
}

.steam-notification.error {
    background: linear-gradient(135deg, #f44336, #c62828);
}

.steam-notification.warning {
    background: linear-gradient(135deg, #ff9800, #ef6c00);
}

.steam-notification.info {
    background: linear-gradient(135deg, #2196f3, #1565c0);
}

.steam-notification-close:hover {
    opacity: 1 !important;
}
/* Модальное окно подтверждения отвязки */
.steam-confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--steam-warning);
}

.steam-confirm-header i {
    font-size: 24px;
}

.steam-confirm-header h4 {
    font-size: 16px;
    margin: 0;
}

.steam-confirm-body {
    margin-bottom: 24px;
}

.steam-confirm-body p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.steam-confirm-warning {
    color: var(--steam-danger);
    font-size: 13px !important;
    font-weight: 500;
}

.steam-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.steam-confirm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--steam-transition);
}

.steam-confirm-btn.cancel-btn {
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-secondary);
}

.steam-confirm-btn.cancel-btn:hover {
    background: var(--steam-border);
    color: var(--steam-text-primary);
}

.steam-confirm-btn.confirm-btn {
    background: #f44336;
    color: white;
}

.steam-confirm-btn.confirm-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}
