:root {
    --primary-color: #2E8B57;
    --secondary-color: #3CB371;
    --accent-color: #4CAF50;
    --light-green: #E0EEE0;
    --text-dark: #1a2c38;
    --text-light: #ffffff;
    --border-color: #D1E0D5;
    --card-shadow: 0 8px 32px rgba(46, 139, 87, 0.15);
    --profile-modal-overlay: rgba(0, 0, 0, 0.7);
    --profile-tooltip-bg: rgba(46, 139, 87, 0.95);
    --profile-badge-bg: rgba(152, 251, 152, 0.2);
}

body {
    background: var(--bg-light, #F8F9FD);
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
}
.user-notification-container {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 24px 0;
}

.user-notification {
    border-bottom: 1px solid var(--border-color);
    padding: 18px 32px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    background-color: #ffffff4f;
}

.user-notification.viewed-true {
    filter: contrast(0.5) brightness(1.2);
}

.user-notification:last-child {
    border-bottom: none;
}

.user-notification:hover {
    background: #f0f7f3;
}

.user-notification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.user-notification-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
    flex: 1;
}

.user-notification-tag {
    font-size: 0.85rem;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--profile-badge-bg);
    color: var(--primary-color);
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.user-notification-tag.user-admin {
    background: var(--accent-color);
    color: #fff;
}
.user-notification-tag.user-system {
    background: var(--secondary-color);
    color: #fff;
}

.user-notification-content {
    font-size: 1rem;
    color: var(--text-dark);
    max-width: 100%;
    max-height: 3.6em; /* ~2 строки */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s;
}

.user-notification-time {
    font-size: 0.92em;
    color: var(--secondary-text-color);
    margin-top: 2px;
}

/* Popup styles */
.user-modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; right: 0; bottom: 0;
    background: var(--profile-modal-overlay);
    align-items: center;
    justify-content: center;
}
.user-modal-overlay.user-active {
    display: flex;
}
.user-modal {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 28px 32px;
    max-width: 420px;
    width: 90vw;
    position: relative;
    animation: user-modalIn 0.2s;
}
@keyframes user-modalIn {
    from { transform: translateY(40px) scale(0.98); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.user-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--primary-color);
    cursor: pointer;
    user-select: none;
}
.user-modal-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.15em;
}
.user-modal-content {
    color: var(--text-dark);
    font-size: 1em;
    margin-bottom: 12px;
}
.user-modal-meta {
    font-size: 0.93em;
    color: var(--secondary-text-color);
}


/* Кнопка открытия попапа */
.quest-btn {
    background-color: #1a81ff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px;
    transition: background-color 0.3s;
    position: fixed;
    bottom: 0px;
    right: 20px;
    z-index: 1001;
    /* border: 1px solid #fff; */
    box-shadow: 0 3px 13px 2px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.quest-btn:hover {
    background-color: #1158ae;
}

/* Затемняющий фон */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Стили попапа */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    width: 400px;
    max-width: 90%;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Заголовок попапа */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
}

.popup-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #777;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

/* Тело попапа */
.popup-body {
    padding: 20px;
}

#userInput {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    resize: none;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

#userInput:focus {
    outline: none;
    border-color: #3CB371;
}

/* Кнопки */
.popup-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.send-btn, .cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
}

.send-btn {
    background-color: #3CB371;
    color: white;
}

.send-btn:hover {
    background-color: #2E8B57;
}

.cancel-btn {
    background-color: #f2f2f2;
    color: #555;
}

.cancel-btn:hover {
    background-color: #e0e0e0;
}

#empty-notis {
    text-align: center;
    padding: 40px 0;
    color: var(--text-dark);
}
#empty-notis i {
    font-size: 48px;
    color: var(--secondary-text-color);
}
#empty-notis h4 {
    margin-top: 16px;
    font-size: 1.2em;
    color: var(--secondary-text-color);
}

.help-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.help-box a {
    margin-top: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
}
.help-box a:hover {
    background-color: var(--primary-color);
    color: white;
}