/* ===== START MENU (Windows-стиль) ===== */

/* Кнопка пуска в taskbar — только иконка */
.start-menu-btn {
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: #1a237e;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease;
    user-select: none;
}

.start-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.start-menu-btn .start-logo {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Start Menu Overlay — полноэкранный (стиль life-overlay) */
.start-menu-overlay {
    display: none;
}

/* ===== ПОЛНОЭКРАННЫЙ АККАУНТ (inline редактирование) ===== */

.acc-fullscreen {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Шапка профиля */
.acc-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    padding: 16px;
    background: #2a2a2a;
    border-radius: 12px;
}

.acc-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a237e, #283593);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}

.acc-nickname-area {
    flex: 1;
    min-width: 0;
}

.acc-nickname-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.acc-nickname-text {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.acc-privacy-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.acc-privacy-label {
    font-size: 11px;
    color: rgba(200, 210, 230, 0.5);
    white-space: nowrap;
}

/* Секции */
.acc-section {
    padding: 16px;
    background: #2a2a2a;
    border-radius: 12px;
}

.acc-section-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(200, 210, 230, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.acc-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.acc-field-value {
    font-size: 14px;
    color: #c8d4e8;
}

/* Статус */
.acc-status-area {
    width: 100%;
}

.acc-status-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 180, 255, 0.1);
    border-radius: 8px;
    color: #c8d4e8;
    font-size: 14px;
}

.acc-status-edit textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 180, 255, 0.15);
    border-radius: 8px;
    color: #c8d4e8;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.acc-status-edit textarea:focus {
    border-color: rgba(100, 180, 255, 0.4);
}

/* Inline формы */
.acc-inline-form {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.acc-inline-form input[type="text"],
.acc-inline-form input[type="email"],
.acc-inline-form input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 180, 255, 0.15);
    border-radius: 8px;
    color: #c8d4e8;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.acc-inline-form input:focus {
    border-color: rgba(100, 180, 255, 0.4);
}

/* Редактирование ника */
.acc-nickname-edit {
    margin-top: 8px;
}

.acc-nickname-edit input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 180, 255, 0.15);
    border-radius: 8px;
    color: #c8d4e8;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.acc-nickname-edit input:focus {
    border-color: rgba(100, 180, 255, 0.4);
}

/* Кнопки действий */
.acc-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.acc-btn {
    padding: 8px 20px;
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: #64b5f6;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.acc-btn:hover {
    background: rgba(100, 180, 255, 0.1);
    border-color: rgba(100, 180, 255, 0.4);
}

.acc-btn-primary {
    background: rgba(100, 180, 255, 0.15);
    border-color: rgba(100, 180, 255, 0.3);
    color: #64b5f6;
}

.acc-btn-primary:hover {
    background: rgba(100, 180, 255, 0.25);
}

.acc-btn-cancel {
    color: rgba(200, 210, 230, 0.6);
    border-color: rgba(200, 210, 230, 0.15);
}

.acc-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.acc-btn-danger {
    color: #ef5350;
    border-color: rgba(244, 67, 54, 0.3);
    background: rgba(244, 67, 54, 0.08);
}

.acc-btn-danger:hover {
    background: rgba(244, 67, 54, 0.15);
}

.acc-btn-full {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

/* Иконка-кнопка */
.acc-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
    color: rgba(200, 210, 230, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.acc-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #64b5f6;
}

/* Подсказки */
.acc-hint {
    font-size: 11px;
    color: rgba(200, 210, 230, 0.4);
    margin-top: 6px;
}

/* Сообщения */
.acc-msg {
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    display: none;
}

.acc-msg-success {
    display: block;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.acc-msg-error {
    display: block;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
    color: #ef5350;
}

/* Зона выхода */
.acc-logout-area {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Элемент поиска (кликабельный) */
.acc-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.acc-search-item:hover {
    background: #333;
}

/* ===== ПРОФИЛЬ (вкладка) ===== */

.profile-section {
    margin-bottom: 24px;
}

.profile-section-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(200, 210, 230, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.profile-field {
    margin-bottom: 16px;
}

.profile-field label {
    display: block;
    font-size: 12px;
    color: rgba(200, 210, 230, 0.5);
    margin-bottom: 6px;
}

.profile-field .field-value {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 180, 255, 0.1);
    border-radius: 8px;
    color: #c8d4e8;
    font-size: 14px;
}

.profile-field .field-value .edit-btn {
    margin-left: auto;
    padding: 4px 12px;
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 6px;
    background: transparent;
    color: #64b5f6;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.profile-field .field-value .edit-btn:hover {
    background: rgba(100, 180, 255, 0.1);
    border-color: rgba(100, 180, 255, 0.4);
}

/* ===== ПОИСК ИГРОКОВ ===== */

.search-section {
    margin-bottom: 20px;
}

.search-input-wrapper {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 180, 255, 0.15);
    border-radius: 8px;
    color: #c8d4e8;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.search-input:focus {
    border-color: rgba(100, 180, 255, 0.4);
}

.search-btn {
    padding: 10px 20px;
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: #64b5f6;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.search-btn:hover {
    background: rgba(100, 180, 255, 0.1);
    border-color: rgba(100, 180, 255, 0.4);
}

.search-results {
    margin-top: 16px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(100, 180, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 6px;
}

.search-result-item:hover {
    background: rgba(100, 180, 255, 0.06);
}

.result-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90d9, #357abd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-nickname {
    font-size: 14px;
    font-weight: 500;
    color: #e0e8f0;
}

.result-status {
    font-size: 12px;
    color: rgba(200, 210, 230, 0.5);
    margin-top: 2px;
}

.search-no-results {
    text-align: center;
    padding: 30px;
    color: rgba(200, 210, 230, 0.3);
    font-size: 13px;
}

/* ===== ДРУЗЬЯ ===== */

.friends-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.friends-subsection {
    margin-bottom: 8px;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(100, 180, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 6px;
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90d9, #357abd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.friend-nickname {
    font-size: 14px;
    color: #c8d4e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-status {
    font-size: 12px;
    color: rgba(200, 210, 230, 0.4);
}

.friend-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.friend-action-btn {
    padding: 4px 10px;
    border: 1px solid rgba(100, 180, 255, 0.15);
    border-radius: 6px;
    background: transparent;
    color: #64b5f6;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.friend-action-btn:hover {
    background: rgba(100, 180, 255, 0.1);
}

.friend-action-btn.accept-btn {
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

.friend-action-btn.accept-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.friend-action-btn.reject-btn {
    color: #ef5350;
    border-color: rgba(244, 67, 54, 0.3);
}

.friend-action-btn.reject-btn:hover {
    background: rgba(244, 67, 54, 0.1);
}

.friend-action-btn.remove-btn {
    color: #ef5350;
    border-color: rgba(244, 67, 54, 0.2);
    padding: 4px 8px;
}

.friend-action-btn.remove-btn:hover {
    background: rgba(244, 67, 54, 0.1);
}

/* ===== ПРОСМОТР ПРОФИЛЯ ИГРОКА ===== */

.player-profile-view {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 10001;
    width: 480px;
    max-width: 90vw;
    max-height: 80vh;
    background: linear-gradient(160deg, rgba(22, 27, 45, 0.98), rgba(16, 20, 36, 0.98));
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 14px;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: windowAppear 0.25s ease-out;
}

.player-profile-view.visible {
    display: flex;
}

.player-profile-header {
    padding: 20px;
    border-bottom: 1px solid rgba(100, 180, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.pp-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: rgba(200, 210, 230, 0.5);
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pp-close:hover {
    background: rgba(244, 67, 54, 0.15);
    color: #ef5350;
}

.pp-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90d9, #357abd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.pp-nickname {
    font-size: 18px;
    font-weight: 600;
    color: #e0e8f0;
}

.pp-status {
    font-size: 13px;
    color: rgba(200, 210, 230, 0.5);
    margin-top: 2px;
}

.player-profile-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.pp-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(100, 180, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 8px;
}

.pp-stat-row .stat-label {
    font-size: 13px;
    color: rgba(200, 210, 230, 0.6);
}

.pp-stat-row .stat-value {
    font-size: 14px;
    color: #c8d4e8;
    font-weight: 600;
}

.player-profile-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(100, 180, 255, 0.1);
    display: flex;
    gap: 8px;
}

.pp-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: #64b5f6;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: center;
}

.pp-btn:hover {
    background: rgba(100, 180, 255, 0.1);
}

.pp-btn.primary {
    background: rgba(100, 180, 255, 0.1);
    border-color: rgba(100, 180, 255, 0.3);
}

.pp-btn.primary:hover {
    background: rgba(100, 180, 255, 0.2);
}

.pp-btn.danger {
    color: #ef5350;
    border-color: rgba(244, 67, 54, 0.3);
}

.pp-btn.danger:hover {
    background: rgba(244, 67, 54, 0.1);
}

.pp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== ПРИВАТНОСТЬ (Switch) ===== */

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(200, 210, 230, 0.15);
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: #4caf50;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ===== УВЕДОМЛЕНИЯ ===== */

.friend-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10003;
    padding: 14px 20px;
    background: linear-gradient(160deg, rgba(25, 30, 48, 0.98), rgba(18, 22, 38, 0.98));
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: notifSlideIn 0.3s ease-out;
    max-width: 360px;
    cursor: pointer;
}

.friend-notification .notif-title {
    font-size: 14px;
    font-weight: 600;
    color: #e0e8f0;
}

.friend-notification .notif-text {
    font-size: 13px;
    color: #c8d4e8;
}

@keyframes notifSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== PM ЧАТ (внутри player-profile-view) ===== */

.pp-chat {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.pp-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(100, 180, 255, 0.1);
    font-size: 14px;
    color: #c8d4e8;
    font-weight: 600;
}

.pp-chat-back {
    background: none;
    border: 1px solid rgba(100, 180, 255, 0.15);
    color: #64b5f6;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: background 0.2s ease;
}

.pp-chat-back:hover {
    background: rgba(100, 180, 255, 0.1);
}

.pp-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pp-chat-loading,
.pp-chat-empty {
    text-align: center;
    padding: 30px;
    color: rgba(200, 210, 230, 0.4);
    font-size: 13px;
}

.pp-chat-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.pp-chat-msg-mine {
    align-self: flex-end;
    background: rgba(100, 180, 255, 0.15);
    border: 1px solid rgba(100, 180, 255, 0.2);
    color: #e0e8f0;
    border-bottom-right-radius: 4px;
}

.pp-chat-msg-theirs {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 180, 255, 0.08);
    color: #c8d4e8;
    border-bottom-left-radius: 4px;
}

.pp-chat-msg-text {
    font-size: 13px;
}

.pp-chat-msg-time {
    font-size: 10px;
    color: rgba(200, 210, 230, 0.4);
    margin-top: 4px;
    text-align: right;
}

.pp-chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid rgba(100, 180, 255, 0.1);
}

.pp-chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 180, 255, 0.15);
    border-radius: 8px;
    color: #c8d4e8;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.pp-chat-input-area input:focus {
    border-color: rgba(100, 180, 255, 0.4);
}

.pp-chat-send {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 8px;
    background: rgba(100, 180, 255, 0.1);
    color: #64b5f6;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pp-chat-send:hover {
    background: rgba(100, 180, 255, 0.2);
}

/* ===== АДАПТИВНОСТЬ ===== */

@media (max-width: 768px) {
    .start-menu-btn {
        padding: 0 8px;
    }

    .player-profile-view {
        width: calc(100vw - 20px);
    }

    .acc-profile-header {
        flex-wrap: wrap;
    }

    .acc-privacy-toggle {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
}