/* Базовые состояния */
.not-auth {
    color: #ccc;
    font-size: 1.2rem;
    text-align: center;
}

/* Верх профиля (аватар, имя, UUID, статус) */
.profile-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.avatar {
    width: 140px;
    height: 140px;
    border: 4px solid orange;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 140, 0, .4);
}

.username {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: orange;
    text-shadow: 0 0 8px rgba(255, 140, 0, .5);
}

/* UUID и копирование */
.profile-uuid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
    color: #ccc;
    font-size: 1rem;
}

.copy-uuid {
    padding: 0.4rem 0.9rem;
    background: rgba(34, 34, 34, .85);
    border: 2px solid orange;
    border-radius: 8px;
    color: orange;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .3s ease, color .3s ease, transform .2s ease;
}

.copy-uuid:hover,
.copy-uuid:focus {
    background-color: orange;
    color: black;
    transform: translateY(-2px);
    outline: none;
}

.copy-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 0.7rem 1.4rem;
    background: rgba(34, 34, 34, .9);
    border: 2px solid orange;
    border-radius: 10px;
    color: orange;
    font-weight: 600;
    font-size: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
    z-index: 9999;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Статусы Discord / Steam */
.discord-status,
.steam-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin: 1.2rem auto;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    background: rgba(34, 34, 34, .8);
    border: 1px solid rgba(255, 165, 0, .25);
    border-radius: 12px;
}

.discord-status img,
.steam-status img {
    width: 26px;
    height: 26px;
}

.steam-status.connected span {
    color: #7cfc00;
    font-weight: 600;
}

.steam-status.not-connected span {
    color: #ff6961;
    font-weight: 600;
}

.connect-discord,
.connect-steam {
    color: #ff6961;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #ff6961;
    border-radius: 8px;
    padding: 0.3rem 0.7rem;
    transition: background-color .3s ease, color .3s ease;
}

.connect-discord:hover,
.connect-discord:focus,
.connect-steam:hover,
.connect-steam:focus {
    background-color: #ff6961;
    color: black;
    outline: none;
}

/* Сетка навигационных кнопок */
.profile-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.profile-link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: rgba(34, 34, 34, .85);
    color: orange;
    border: 2px solid orange;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background-color .3s ease, color .3s ease, transform .2s ease;
}

.profile-link:hover,
.profile-link:focus {
    background-color: orange;
    color: black;
    transform: translateY(-2px);
    outline: none;
}

/* Декоративные значки и поп-апы */
.profile-decor {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 97%;
    display: flex;
    justify-content: space-between;
    z-index: 5;
}

.decor-box {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0, 0, 0, .4);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.decor-box.star {
    background: gold;
    color: black;
}

.decor-box.warn {
    background: #ff4d4d;
    color: white;
}

.decor-popups {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 60vh;
    padding-right: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transform-origin: top center;
    transition: opacity .3s ease, transform .3s ease;
}

.decor-box:hover .decor-popups {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(4px);
}

.decor-popup {
    position: relative;
    min-width: 260px;
    max-width: 320px;
    padding: 1rem 1.2rem;
    background: rgba(20, 20, 20, .95);
    border: 2px solid orange;
    border-radius: 14px;
    color: #f5f5f5;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: 0 0 25px rgba(255, 140, 0, .4), 0 0 12px rgba(0, 0, 0, .6);
}

.decor-popup h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: orange;
    text-shadow: 0 0 8px rgba(255, 140, 0, .4);
}

.decor-popup:first-child::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: rgba(20, 20, 20, .95);
    filter: drop-shadow(0 -1px 1px rgba(255, 140, 0, .4));
}

.decor-box.warn .decor-popup {
    border-color: #ff4d4d;
    box-shadow: 0 0 25px rgba(255, 77, 77, .4), 0 0 12px rgba(0, 0, 0, .6);
}

.decor-box.warn .decor-popup h3 {
    color: #ff4d4d;
}

/* Заголовки и общие элементы */
.welcome-title {
    margin-top: 1rem;
    text-align: center;
    font-size: 2rem;
    color: orange;
}

.muted {
    color: #bdbdbd;
}

/* Круговые индикаторы */
.circles-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.circle-card {
    position: relative;
    width: 220px;
    height: 220px;
    flex-shrink: 0;
}

.circle-bg {
    stroke: rgba(255, 255, 255, 0.12);
}

.circle-fg {
    stroke: orange;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s ease;
}

.circle-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.circle-center .value {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: normal;
}

.circle-center .label {
    font-size: 0.9rem;
    opacity: .8;
}

/* Персонажи */
.chars-section {
    max-width: 900px;
    margin: 4rem auto 2rem;
}

.chars-section h2 {
    margin-bottom: 2.5rem;
    text-align: center;
    font-size: 1.8rem;
    color: orange;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.char-card {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(145deg, rgba(20, 20, 20, .95), rgba(30, 30, 30, .9));
    border: 1px solid rgba(255, 165, 0, .25);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
    transition: transform .25s ease, box-shadow .25s ease;
}

.char-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(255, 140, 0, .35);
}

.char-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.char-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .5px;
}

.char-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.char-buttons a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem 1.2rem;
    background: rgba(255, 165, 0, .08);
    border: 1px solid rgba(255, 165, 0, .3);
    border-radius: 10px;
    color: orange;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, transform .2s;
}

.char-buttons a img {
    width: 20px;
    height: 20px;
}

.char-buttons a:hover {
    background: rgba(255, 165, 0, .2);
    transform: translateY(-2px);
}

/* Админ-панель: список игроков */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.player-card {
    padding: 1rem;
    background: rgba(17, 17, 17, .92);
    border: 1px solid rgba(255, 165, 0, .35);
    border-radius: 14px;
    box-shadow: 0 0 14px rgba(255, 140, 0, .18);
}

.player-header {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: .6rem;
}

.player-header img {
    width: 52px;
    height: 52px;
    border: 2px solid #7289da;
    border-radius: 50%;
    object-fit: cover;
    background: #000;
}

.player-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: orange;
}

.player-meta {
    font-size: .95rem;
    color: #ddd;
    line-height: 1.45;
    word-break: normal;
}

.mono {
    display: inline-block;
    max-width: 100%;
    padding: .12rem .35rem;
    background: #0b0b0b;
    border: 1px solid #333;
    border-radius: 6px;
    color: #eee;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kv {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: .25rem .6rem;
    align-items: start;
}

.kv .k {
    color: #bbb;
}

.kv .v {
    color: #e6e6e6;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}

.badge {
    font-size: .8rem;
    padding: .15rem .5rem;
    background: #111;
    border: 1px solid #555;
    border-radius: 6px;
}

.badge.admin {
    border-color: #ffd54f;
}

.badge.blacklist {
    border-color: #ff6e6e;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .8rem;
}

.btn {
    padding: .45rem .75rem;
    background: #222;
    border: 1px solid #666;
    border-radius: 8px;
    color: #eee;
    cursor: pointer;
    text-decoration: none;
    transition: background .3s ease;
}

.btn:hover {
    background: #2b2b2b;
}

.btn.danger {
    border-color: #a33;
    color: #f55;
}

/* Модальное окно */
.modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .82);
    z-index: 1000;
}

.modal {
    width: min(900px, 96vw);
    max-height: 92vh;
    padding: 24px 24px 18px;
    background: #101010;
    border: 1px solid rgba(255, 165, 0, .35);
    border-radius: 16px;
    box-shadow: 0 0 28px rgba(255, 140, 0, .45);
    overflow-y: auto;
}

.modal h2 {
    margin: 0 0 1rem;
    text-align: center;
    font-size: 1.7rem;
    color: orange;
}

.id-block {
    margin: 0 0 18px;
    padding: 12px 14px;
    background: #161616;
    border: 1px solid rgba(255, 165, 0, .28);
    border-radius: 12px;
}

.id-row {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: .4rem .6rem;
    align-items: center;
}

.copy-btn {
    margin-left: .4rem;
    padding: .25rem .45rem;
    font-size: .85rem;
}

.fieldset {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: rgba(40, 40, 40, .9);
    border: 1px solid rgba(255, 165, 0, .4);
    border-radius: 12px;
}

.fieldset legend {
    padding: 0 .4rem;
    font-weight: 700;
    color: orange;
}

.fieldset label {
    color: #eee;
    font-weight: 500;
}

.checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem 1rem;
    margin-top: .35rem;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: .28rem;
    font-size: 1rem;
    color: #ddd;
}

.form-grid input[type="number"],
.form-grid input[type="text"],
.form-grid select,
.form-grid textarea {
    padding: .55rem .6rem;
    background: #0e0e0e;
    border: 1px solid #444;
    border-radius: 8px;
    color: #f1f1f1;
}

.form-grid textarea {
    min-height: 90px;
    resize: vertical;
}

.read-list {
    list-style: none;
    margin: .4rem 0 0;
    padding: 0;
}

.read-list li {
    padding: .45rem 0;
    color: #d0d0d0;
    line-height: 1.45;
    border-bottom: 1px solid rgba(255, 165, 0, .16);
}

.read-list a {
    color: #bfbfbf;
    text-decoration: none;
}

.read-list a:hover {
    color: orange;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: .8rem;
}

/* Создание игрока */
.create-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: .75rem;
}

.create-form input[type="text"] {
    min-width: 260px;
    padding: .55rem .6rem;
    background: #111;
    border: 1px solid #666;
    border-radius: 8px;
    color: #eee;
}