/* =============================================================
   Gl1tchWorld — страница «Настройки»
   ============================================================= */

body {
    font-family: "Mazzard M", "Mazzard L", Arial, sans-serif;
    background: #f6f6f6;
    color: #1b1712;
    margin: 0;
}

* {
    box-sizing: border-box;
}

/* Шапка и её меню — как на остальных страницах (content-box),
   чтобы квадраты-иконки и пункты не схлопывались из-за border-box. */
header,
header * {
    box-sizing: content-box;
}

/* Кнопка «Войти»/ник в шапке — как на остальных страницах.
   Глобальный border-box ниже схлопывал иконку и текст. */
.gg-header-actions .gg-auth-btn i,
.gg-header-actions .gg-auth-btn span {
    box-sizing: content-box;
}

.gg-settings-head {
    background: #fff;
    border-bottom: 1px solid #ececec;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.gg-settings-head .logotype {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.gg-settings-head .logotype .pic {
    width: 40px;
    height: 40px;
    background-image: url(images/server-icon.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.gg-settings-head .logotype .logo_text {
    font-weight: 800;
    font-size: 16px;
    color: #1b1712;
}

.gg-settings-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gg-settings-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 12px;
    background: #fff;
    border-bottom: 4px solid #e0e0e0;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.15);
    color: #1b1712;
    font-family: "Mazzard M", Arial, sans-serif;
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.gg-settings-link i {
    color: var(--accent);
}

.gg-settings-link:hover {
    transform: translateY(-1px);
    filter: brightness(0.97);
}

.gg-wrap {
    max-width: 720px;
    margin: 24px auto;
    padding: 0 20px 60px;
}

.gg-panel {
    background: #fff;
    border-radius: 14px;
    border-bottom: 4px solid #e0e0e0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    padding: 22px 24px;
    margin-bottom: 20px;
}

.gg-panel h2 {
    font-size: 17px;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gg-panel h2 i {
    color: var(--accent);
}

.gg-panel-sub {
    margin: 0 0 18px;
    line-height: 1.45;
}

.gg-msg {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
}

.gg-msg.err {
    background: #fde3e0;
    color: #c01f1f;
}

.gg-msg.ok {
    background: #e2f5e4;
    color: #1c7c2e;
}

.gg-block-msg {
    margin-top: 12px;
    font-family: "Mazzard M", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 0;
    line-height: 1.35;
}

.gg-block-msg.ok {
    color: #1c7c2e;
}

.gg-block-msg.err {
    color: #c01f1f;
}

/* ---------- Палитры ---------- */
.gg-palettes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 12px;
}

.gg-swatch {
    border: 2px solid #e3e3e3;
    border-radius: 12px;
    background: #fff;
    padding: 12px 10px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: "Mazzard M", Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #1b1712;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.gg-swatch:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.gg-swatch.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

.gg-swatch .gg-swatch-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

/* ---------- Тема ---------- */
.gg-theme-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.gg-theme-card {
    flex: 1;
    min-width: 140px;
    padding: 16px;
    border: 2px solid #e3e3e3;
    border-radius: 12px;
    background: #fff;
    font-family: "Mazzard M", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1b1712;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: border-color 0.15s ease;
}

.gg-theme-card i {
    color: var(--accent);
    font-size: 18px;
}

.gg-theme-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

/* ---------- Аккаунт ---------- */
.gg-avatar-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.gg-avatar {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    background: #2a2420;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    overflow: hidden;
    flex: none;
    border-bottom: 4px solid #3a322c;
}

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

.gg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media only screen and (max-width: 640px) {
    .gg-form-grid {
        grid-template-columns: 1fr;
    }
}

.gg-panel label {
    display: block;
    font-family: "Mazzard M", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1b1712;
}

.gg-panel input[type="text"],
.gg-panel input[type="email"],
.gg-panel input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: #fff;
    font-family: "Mazzard M", Arial, sans-serif;
    font-size: 14px;
    color: #1b1712;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gg-panel input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

#gg_verify_status,
#gg_verify_status p,
#gg_verify_status b { color: var(--text, #1b1712); }

.gg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid var(--accent);
    border-radius: 10px;
    background: #fff;
    color: var(--accent);
    font-family: "Mazzard M", Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.gg-btn:hover {
    background: var(--accent);
    color: #fff;
}

.gg-btn.gg-primary {
    background: var(--accent);
    color: #fff;
    border-bottom: 4px solid var(--accent-dark);
}

.gg-btn.gg-primary:hover {
    filter: brightness(1.06);
}

.gg-btn.gg-danger {
    border-color: #c01f1f;
    color: #c01f1f;
}

.gg-btn.gg-danger:hover {
    background: #c01f1f;
    color: #fff;
}

.gg-divider {
    border-top: 1px solid #efefef;
    margin: 22px 0 18px;
}

.gg-block-title {
    font-size: 15px;
    margin: 0 0 14px;
    color: #1b1712;
}

/* ---------- Вход без редиректа ---------- */
.gg-login-err {
    display: block;
    color: #c01f1f;
    font-size: 13px;
    font-weight: 700;
    margin-top: 12px;
    min-height: 18px;
}

.gg-login-form .gg-btn {
    margin-top: 4px;
}

.gg-logout-row {
    margin-top: 22px;
}

/* ---------- Аккаунты ---------- */
.gg-acc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #efefef;
    border-radius: 12px;
    margin-bottom: 10px;
}

.gg-acc-item .gg-acc-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #2a2420;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    overflow: hidden;
    flex: none;
}

.gg-acc-item .gg-acc-ico img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gg-acc-item .gg-acc-info {
    flex: 1;
    min-width: 0;
}

.gg-acc-item .gg-acc-name {
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gg-acc-item .gg-acc-rank {
    font-size: 12px;
    color: #8a8f9c;
}

.gg-acc-item .gg-acc-actions {
    display: flex;
    gap: 8px;
    flex: none;
}

.gg-acc-current {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
}

.gg-acc-current .gg-acc-name:after {
    content: " (сейчас)";
    color: var(--accent);
    font-size: 12px;
}

/* ---------- Тёмная тема ---------- */
[data-theme="dark"] body {
    background: #14110e;
    color: #f2eee8;
}

[data-theme="dark"] .gg-settings-head {
    background: #1f1b18;
    border-bottom-color: #2a2420;
}

[data-theme="dark"] .gg-settings-head .logotype .logo_text,
[data-theme="dark"] .gg-settings-link,
[data-theme="dark"] .gg-panel label,
[data-theme="dark"] .gg-panel h2,
[data-theme="dark"] .gg-block-title,
[data-theme="dark"] .gg-swatch,
[data-theme="dark"] .gg-theme-card,
[data-theme="dark"] .gg-acc-item .gg-acc-name {
    color: #f2eee8;
}

[data-theme="dark"] .gg-settings-link {
    background: #2a2420;
    border-bottom-color: #3a322c;
}

[data-theme="dark"] .gg-panel {
    background: #1f1b18;
    border-bottom-color: #3a322c;
    box-shadow: none;
}

[data-theme="dark"] .gg-panel input[type="text"],
[data-theme="dark"] .gg-panel input[type="email"],
[data-theme="dark"] .gg-panel input[type="password"] {
    background: #14110e;
    border-color: #3a322c;
    color: #f2eee8;
}

[data-theme="dark"] .gg-swatch,
[data-theme="dark"] .gg-theme-card,
[data-theme="dark"] .gg-btn {
    background: #2a2420;
    border-color: #3a322c;
    color: #f2eee8;
}

[data-theme="dark"] .gg-btn:hover {
    background: var(--accent);
    color: #fff;
}

[data-theme="dark"] .gg-divider {
    border-top-color: #2a2420;
}

[data-theme="dark"] .gg-acc-item {
    border-color: #2a2420;
}

[data-theme="dark"] .gg-msg.err {
    background: #3a241f;
    color: #ff8a8a;
}

[data-theme="dark"] .gg-msg.ok {
    background: #1f3a26;
    color: #7ee08f;
}

[data-theme="dark"] .gg-block-msg.ok {
    color: #7ee08f;
}

[data-theme="dark"] .gg-block-msg.err {
    color: #ff8a8a;
}
