/* ===== ОСНОВА ===== */

body {
    background: #070707;
    color: #e5e5e5;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.profile-dashboard {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== GRID ===== */

.dashboard-top {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-middle {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-bottom {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr;
    gap: 16px;
}

/* ===== КАРТОЧКИ ===== */

.dash-card {
    background: linear-gradient(145deg, #0b0b0b, #111);
    border: 1px solid rgba(255, 0, 0, 0.15);
    padding: 18px;
    position: relative;
    overflow: hidden;
}

/* лёгкое свечение */
.dash-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 0, 0, 0.08);
    pointer-events: none;
}

/* заголовки */
.card-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-head h3 {
    color: #ff2a2a;
}

/* ===== USER CARD ===== */

.user-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-main {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.user-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 135px;
    height: 135px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff0000;
    box-shadow: 0 0 24px rgba(255, 0, 0, 0.45);
}

.user-info {
    min-width: 0;
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.edit-link {
    color: #ff0000;
    text-decoration: none;
}

.user-info p {
    margin: 6px 0;
}

.user-quote {
    margin-top: 12px;
    font-size: 13px;
    color: #aaa;
    line-height: 1.4;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.user-stats div {
    min-width: 0;
    background: #0d0d0d;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid rgba(255, 0, 0, 0.14);
}

.user-stats span {
    display: block;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

.user-stats strong {
    display: block;
    margin-top: 7px;
    color: #ff2a2a;
    font-size: 18px;
}

/* ===== ПРОГРЕСС ===== */

.level-progress {
    margin-top: 10px;
}

.level-title {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 6px;
}

.progress-line {
    height: 6px;
    background: #1a0000;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff4444);
}

/* ===== STATUS ===== */

.status-card h2 {
    color: #ff2a2a;
    margin: 10px 0;
}

.status-subtitle {
    color: #888;
    margin-bottom: 10px;
}

/* ===== ACTIVITY ===== */

.activity-card {
    min-height: 215px;
}

.activity-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 140px;
}

.activity-empty {
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #777;
}

.activity-empty p {
    margin: 0 0 4px;
}

.activity-empty small {
    color: #555;
}

/* ===== SINS ===== */

.sins-card {
    min-height: 215px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.sins-count {
    font-size: 44px;
    color: #ff0000;
    margin: 12px 0;
    line-height: 1;
}

/* ===== LIST ===== */

.list-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,0,0,0.1);
}

.list-item p {
    font-size: 14px;
}

.list-item small {
    color: #777;
}

/* ===== BUTTON ===== */

.dash-button {
    display: block;
    margin-top: 10px;
    padding: 8px;
    text-align: center;
    background: #1a0000;
    border: 1px solid #ff0000;
    color: #fff;
    text-decoration: none;
}

.dash-button:hover {
    background: #ff0000;
}

/* ===== AWARDS ===== */

.awards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.award-item {
    text-align: center;
}

.award-item img {
    width: 40px;
}

/* ===== ONLINE ===== */

.online-user {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.online-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* ===== EMPTY ===== */

.empty-text {
    color: #666;
    font-size: 13px;
}

/* ===== AVATAR UPLOAD ===== */

.avatar-form {
    width: 170px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.avatar-form input[type="file"] {
    display: none;
}

.file-button,
.avatar-submit {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ff0000;
    background: #120000;
    color: #ff2a2a;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    line-height: 1.2;
}

.file-button:hover,
.avatar-submit:hover {
    background: #ff0000;
    color: #000;
}

.file-name {
    display: block;
    width: 100%;
    color: #888;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-bars {
    height: 150px;
}

.activity-empty {
    width: 100%;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #777;
}

.activity-empty-mark {
    color: #ff0000;
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.75;
}

.activity-empty p {
    margin: 0 0 4px;
    color: #999;
}

.activity-empty small {
    color: #555;
}



/* ===== ACTIVITY BARS ===== */

.activity-bars {
    height: 150px;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding-top: 10px;
}

.bar-item {
    height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 28px;
}

.bar {
    width: 100%;
    max-width: 28px;
    min-height: 4px;
    background: linear-gradient(180deg, #ff1a1a, #5a0000);
    border: 1px solid rgba(255, 0, 0, 0.35);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.25);
}

.bar-item span {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

.list-item a {
    color: #e5e5e5;
    text-decoration: none;
}

.list-item a:hover {
    color: #ff2a2a;
}

/* ===== NOTIFICATIONS PAGE ===== */

.notifications-page {
    width: 100%;
    max-width: 1600px; /* можно 1700 если хочется шире */
    margin: 0 auto;
    padding: 28px 20px;
}

.notifications-header {
    padding: 28px;
    border: 1px solid rgba(255, 0, 0, 0.2);
    background: linear-gradient(145deg, #0b0b0b, #111);
    margin-bottom: 14px;
}

.notifications-header h1 {
    margin: 0;
    color: #d8d8d8;
    font-size: 52px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.notifications-header p {
    margin-top: 10px;
    color: #777;
    text-transform: uppercase;
    font-size: 12px;
}

.notifications-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 0, 0, 0.18);
    border-bottom: none;
    padding: 10px 14px;
    background: #090909;
    color: #777;
    font-size: 12px;
}

.mark-read {
    background: transparent;
    border: 1px solid rgba(255, 0, 0, 0.35);
    color: #bbb;

    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;

    transition: 0.2s;
}

.mark-read:hover {
    background: #ff0000;
    color: #000;
    border-color: #ff0000;
}

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

.notifications-pages a {
    color: #aaa;
    text-decoration: none;
    border: 1px solid rgba(255, 0, 0, 0.35);
    padding: 4px 8px;
}

.notifications-pages a.active,
.notifications-pages a:hover {
    color: #fff;
    background: #a00000;
}

.notifications-list {
    border: 1px solid rgba(255, 0, 0, 0.2);
    background: #080808;
}

.notification-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 170px 18px;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 0, 0, 0.16);
    color: #d5d5d5;
    text-decoration: none;
}

.notification-row:hover {
    background: rgba(255, 0, 0, 0.06);
}

.notification-icon {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff1a1a;
    font-size: 22px;
}

.notification-body {
    min-width: 0;
}

.notification-body strong {
    display: block;
    color: #d8d8d8;
    margin-bottom: 4px;
}

.notification-body span {
    display: block;
    color: #777;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-time {
    color: #777;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

.notification-dot {
    width: 7px;
    height: 7px;
    background: #ff0000;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
}

.notifications-empty {
    padding: 28px;
    color: #777;
}

.notify-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    margin-left: 6px;

    border-radius: 999px;
    background: #ff0000;
    color: #000;

    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}

/* ===== SETTINGS PAGE REDESIGN ===== */

.settings-page {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    max-width: 1200px;
    margin: 0 auto;

}

.settings-hero {
    min-height: 180px;

    display: flex;
    align-items: center;

    padding: 32px 40px;
    margin-bottom: 24px;

    border: 1px solid rgba(255, 0, 0, 0.22);

    background:
        linear-gradient(90deg, rgba(10,10,10,0.98), rgba(20,0,0,0.45)),
        url("/static/img/settings-bg.png");

    background-size: cover;       /* РАСТЯГИВАЕТ */
    background-position: center right; /* сдвиг вправо */
    background-repeat: no-repeat;
}

.settings-hero h1 {
    margin: 0;
    color: #d8d8d8;
    font-size: 58px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.settings-hero p {
    margin-top: 10px;
    color: #888;
    text-transform: uppercase;
    font-size: 13px;
}

.settings-section {
    margin-bottom: 22px;
    border: 1px solid rgba(255, 0, 0, 0.18);
    background:
        linear-gradient(145deg, rgba(10,10,10,0.98), rgba(18,18,18,0.95));
}

.profile-section {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.settings-avatar-card {
    padding: 20px;
    border-right: 1px solid rgba(255, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.settings-avatar {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border: 1px solid #ff0000;
    box-shadow: 0 0 28px rgba(255, 0, 0, 0.35);
}

.settings-panel {
    padding: 22px 28px;
}

.settings-panel.full {
    width: 100%;
}

.settings-panel h2 {
    margin: 0 0 18px;
    color: #ff1a1a;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-form {
    display: grid;
    gap: 14px;
}

.settings-form label,
.settings-grid-2 label {
    display: grid;
    gap: 6px;
}

.settings-form span,
.settings-grid-2 span {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
}

.settings-form input,
.settings-grid-2 select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(255, 0, 0, 0.22);
    color: #d8d8d8;
    outline: none;
}

.settings-form input:focus,
.settings-grid-2 select:focus {
    border-color: #ff0000;
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.25);
}

.settings-form input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.settings-button {
    justify-self: end;
    min-width: 260px;
    padding: 11px 18px;
    background: transparent;
    border: 1px solid #ff0000;
    color: #ff2a2a;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
}

.settings-button:hover {
    background: #ff0000;
    color: #000;
}

.security-form {
    max-width: 900px;
    grid-template-columns: 1fr 1fr;
    align-items: end;
}

.security-form label:first-child {
    grid-column: 1;
}

.security-form label:nth-child(2) {
    grid-column: 1;
}

.security-form label:nth-child(3) {
    grid-column: 1;
}

.security-form .settings-button {
    grid-column: 2;
    grid-row: 3;
}

.settings-checks {
    display: grid;
    gap: 14px;
}

.settings-check {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    cursor: pointer;
}

.settings-check input {
    display: none;
}

.settings-check > span {
    width: 22px;
    height: 22px;
    border: 1px solid #ff0000;
    background: #080808;
    position: relative;
}

.settings-check input:checked + span::after {
    content: "✓";
    position: absolute;
    left: 4px;
    top: -3px;
    color: #ff0000;
    font-size: 22px;
}

.settings-check strong {
    display: block;
    color: #d8d8d8;
    text-transform: uppercase;
    font-size: 14px;
}

.settings-check small {
    display: block;
    margin-top: 3px;
    color: #777;
}

.settings-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.settings-avatar-card .avatar-form {
    width: 180px;
}

.settings-avatar-card .file-name {
    text-align: center;
}

.public-profile-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.public-profile-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
}

.public-profile-avatar {
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(255, 40, 40, 0.45);
    box-shadow: 0 0 28px rgba(160, 0, 0, 0.28);
}

.public-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #070707;
}

.public-profile-main h1 {
    margin: 4px 0 8px;
    color: #f4e7df;
    font-size: 34px;
}

.public-profile-main p {
    margin: 0;
    color: rgba(230, 210, 200, 0.68);
}

.public-profile-main strong {
    color: #ff5a5a;
}

.public-profile-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 14px;
}

.profile-stat-card {
    padding: 18px;
}

.profile-stat-card span {
    display: block;
    margin-bottom: 8px;
    color: rgba(220, 190, 180, 0.58);
    font-size: 13px;
}

.profile-stat-card b {
    color: #f4e7df;
    font-size: 24px;
}

.profile-stat-card b.good {
    color: #ff5a5a;
}

.profile-stat-card b.bad {
    color: #9b9b9b;
}

.public-profile-confessions {
    padding: 22px;
}

.profile-confession-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.profile-confession-card {
    display: block;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    background: rgba(5, 5, 5, 0.55);
    border: 1px solid rgba(160, 0, 0, 0.28);
    transition: 0.2s ease;
}

.profile-confession-card:hover {
    border-color: rgba(255, 40, 40, 0.55);
    background: rgba(25, 0, 0, 0.55);
    transform: translateY(-1px);
}

.profile-confession-text {
    color: rgba(245, 230, 220, 0.88);
    line-height: 1.5;
}

.profile-confession-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
    color: rgba(220, 190, 180, 0.52);
    font-size: 13px;
}

.profile-empty {
    margin-top: 14px;
    padding: 18px;
    color: rgba(230, 210, 200, 0.62);
    background: rgba(5, 5, 5, 0.45);
    border: 1px solid rgba(160, 0, 0, 0.22);
}

@media (max-width: 900px) {
    .public-profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .public-profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-profile-stats {
        grid-template-columns: 1fr;
    }

    .profile-confession-meta {
        flex-direction: column;
    }
}
