* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #e0e5ec;
    --bg-secondary: #f0f5fa;
    --text-primary: #2d4059;
    --text-secondary: #4a5c6e;
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    --accent: #5a8fec;
    --accent-dark: #4a7ad4;
    --error: #ff6b6b;
    --success: #51cf66;
    --warning: #ffd43b;
    --border-radius: 20px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    transition: var(--transition);
}

/* ===== УТИЛИТЫ ===== */
.neomorph {
    background: var(--bg-primary);
    box-shadow: 
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
    border-radius: var(--border-radius);
}

.neomorph-inset {
    background: var(--bg-primary);
    box-shadow: 
        inset 5px 5px 10px var(--shadow-dark),
        inset -5px -5px 10px var(--shadow-light);
    border-radius: var(--border-radius);
}

/* ===== НАВИГАЦИЯ ===== */
.nav-wrapper {
    background: var(--bg-primary);
    padding: 1rem 2rem;
    margin: 1rem;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 2px;
    transition: var(--transition);
}

.brand-logo:hover {
    color: var(--accent);
}

.user-info {
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.user-info:hover {
    color: var(--accent);
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.row {
    margin: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== КНОПКИ ===== */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 30px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
}

.btn:active {
    box-shadow: 
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    transform: translateY(0);
}

.btn-danger {
    color: var(--error);
}

.btn-danger:hover {
    color: #ff5252;
}

.reconnect-btn {
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    color: white;
    animation: pulse 2s infinite;
}

.reconnect-btn:hover {
    background: linear-gradient(145deg, var(--accent-dark), var(--accent));
}

.reconnect-btn i {
    margin-right: 8px;
}

.reconnect-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: none;
}

/* ===== СООБЩЕНИЯ ===== */
.msg {
    position: relative;
    background: var(--bg-primary);
    margin: 1rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-20px);
}

.msg.msg-appear {
    opacity: 1;
    transform: translateY(0);
}

.msg:hover {
    transform: translateY(-2px);
    box-shadow: 
        8px 8px 15px var(--shadow-dark),
        -8px -8px 15px var(--shadow-light);
}

.msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(163, 177, 198, 0.3);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.msg-module {
    font-weight: 600;
    color: var(--accent);
    background: rgba(90, 143, 236, 0.15);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.msg-time {
    opacity: 0.7;
    font-size: 0.8rem;
}

/* ===== ЗАКРЕПЛЕННЫЕ СООБЩЕНИЯ ===== */
.msg.pinned-message {
    border-left: 4px solid var(--accent);
    background: linear-gradient(145deg, var(--bg-primary), rgba(90, 143, 236, 0.05));
}

.pin-indicator {
    position: absolute;
    bottom: 15px;
    right: 24px;
    font-size: 1rem;
    color: var(--accent);
    opacity: 0.5;
    pointer-events: none;
    z-index: 5;
    animation: pinGlow 2s ease-in-out infinite;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msg.pinned-message .pin-indicator {
    opacity: 0.8;
}

.pinned-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pinned-divider::before,
.pinned-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.pinned-divider::before {
    left: 0;
}

.pinned-divider::after {
    right: 0;
}

.pinned-count {
    position: fixed;
    top: 100px;
    left: 20px;
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    box-shadow: 0 5px 15px rgba(90, 143, 236, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== БЛОК КОДА ===== */
.code-container {
    position: relative;
    margin: 0.5rem 0;
}

.code {
    background: #1e1e1e;
    padding: 1.2rem;
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #d4d4d4;
    overflow-x: auto;
    border: 1px solid #2d2d2d;
    transition: all 0.3s ease;
}

.code:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(90, 143, 236, 0.2);
}

.code pre {
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== КНОПКИ УПРАВЛЕНИЯ СООБЩЕНИЯМИ ===== */
.msg-controls {
    position: absolute;
    bottom: 15px;
    right: 24px;
    display: flex;
    gap: 5px;
    z-index: 20;
}

.pin-btn,
.copy-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        2px 2px 4px var(--shadow-dark),
        -2px -2px 4px var(--shadow-light);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(5px);
    z-index: 10;
}

.copy-btn {
    top: 15px;
}

.code-container:hover .copy-btn,
.msg:hover .pin-btn,
.msg:hover .copy-btn {
    opacity: 1;
    transform: translateY(0);
}

.pin-btn:hover,
.copy-btn:hover {
    box-shadow: 
        1px 1px 3px var(--shadow-dark),
        -1px -1px 3px var(--shadow-light);
    color: var(--accent);
    transform: translateY(-2px) scale(1.1);
}

.pin-btn:active,
.copy-btn:active {
    box-shadow: 
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light);
    transform: translateY(0) scale(0.95);
}

.pin-btn.pinned {
    color: var(--accent);
    background: linear-gradient(145deg, #fff, var(--shadow-light));
    box-shadow: 
        0 0 10px rgba(90, 143, 236, 0.3),
        2px 2px 4px var(--shadow-dark),
        -2px -2px 4px var(--shadow-light);
}

.pin-btn.pinned i {
    transform: rotate(45deg);
}

.copy-btn.copy-success {
    background: linear-gradient(145deg, var(--success), #40c057);
    color: white;
    box-shadow: 
        0 0 15px rgba(81, 207, 102, 0.5),
        2px 2px 4px var(--shadow-dark),
        -2px -2px 4px var(--shadow-light);
    animation: copyPulse 0.5s ease;
}

.copy-btn.copy-error {
    background: linear-gradient(145deg, var(--error), #ff5252);
    color: white;
    box-shadow: 
        0 0 15px rgba(255, 107, 107, 0.5),
        2px 2px 4px var(--shadow-dark),
        -2px -2px 4px var(--shadow-light);
}

/* Подсказки для кнопок */
.pin-btn[data-tooltip],
.copy-btn[data-tooltip] {
    position: relative;
}

.pin-btn[data-tooltip]:hover::before,
.copy-btn[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    right: 0;
    background: var(--text-primary);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 100;
    pointer-events: none;
    animation: tooltipFade 0.2s ease;
}

.pin-btn[data-tooltip]:hover::after,
.copy-btn[data-tooltip]:hover::after {
    content: '';
    position: absolute;
    bottom: 110%;
    right: 15px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

/* ===== ПОДСВЕТКА JSON ===== */
.json-container {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #d4d4d4;
}

.json-key {
    color: #9cdcfe !important;
    font-weight: 500;
}

.json-string {
    color: #ce9178 !important;
}

.json-number {
    color: #b5cea8 !important;
}

.json-boolean {
    color: #569cd6 !important;
}

.json-null {
    color: #569cd6 !important;
}

/* ===== АУТЕНТИФИКАЦИЯ ===== */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.auth-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    box-shadow: 
        15px 15px 30px var(--shadow-dark),
        -15px -15px 30px var(--shadow-light);
}

.auth-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.input-field {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    border-radius: 30px;
    box-shadow: 
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    box-shadow: 
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
}

.input-field::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.auth-toggle {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.toggle-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toggle-link {
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.toggle-link:hover {
    color: var(--accent-dark);
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: linear-gradient(145deg, #e0e5ec, #f0f5fa);
    padding: 2.5rem;
    border-radius: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.4s ease;
    border: 1px solid rgba(255,255,255,0.5);
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    pointer-events: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title i {
    color: var(--accent);
    font-size: 1.8rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--error);
    transform: rotate(90deg);
}

.modal-close:active {
    box-shadow: 
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
}

.modal-content {
    background: var(--bg-primary);
    padding: 1.8rem;
    border-radius: 20px;
    font-family: 'Fira Code', monospace;
    word-break: break-all;
    margin: 1.5rem 0;
    position: relative;
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    max-height: 200px;
    overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
    box-shadow: inset 2px 2px 5px var(--shadow-dark);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 2rem;
}

.modal-btn {
    padding: 0.8rem 2rem;
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
}

.modal-btn:active {
    box-shadow: 
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
}

.modal-btn-primary {
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    color: white;
}

.modal-btn-secondary {
    color: var(--text-secondary);
}

.modal-btn-fullwidth {
    width: 100%;
    margin-top: 18px;
    color: white;
    background-color: darkred;
    display: flex;
    justify-content: center;
    align-items: center;
}

.key-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 
        10px 10px 20px var(--shadow-dark),
        -10px -10px 20px var(--shadow-light),
        0 0 30px rgba(90, 143, 236, 0.3);
    animation: pulse 2s infinite;
}

.key-icon i {
    font-size: 2rem;
    color: white;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.copy-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    box-shadow: 
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.modal-content:hover .copy-hint {
    opacity: 1;
}

.modal-info {
    background: rgba(90, 143, 236, 0.1);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid rgba(90, 143, 236, 0.2);
}

.modal-info i {
    color: var(--accent);
    font-size: 1rem;
}

/* ===== ТОСТЫ ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    border-radius: 30px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
    background: linear-gradient(145deg, #fff3bf, #ffe69c);
    color: #2d4059;
}

/* ===== ДИАЛОГ ПОДТВЕРЖДЕНИЯ ===== */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease;
}

.confirm-dialog {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 
        25px 25px 50px var(--shadow-dark),
        -25px -25px 50px var(--shadow-light);
    text-align: center;
    animation: slideUp 0.4s ease;
}

.confirm-dialog i {
    font-size: 3.5rem;
    color: var(--error);
    margin-bottom: 1.5rem;
}

.confirm-dialog h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.confirm-dialog p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.confirm-dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-dialog-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    height: 44px;
}

.confirm-dialog-btn-yes {
    background: linear-gradient(145deg, var(--error), #ff5252);
    color: white;
}

.confirm-dialog-btn-yes:hover {
    background: linear-gradient(145deg, #ff5252, var(--error));
}

.confirm-dialog-btn-no {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
}

.confirm-dialog-btn-no:hover {
    background: var(--shadow-light);
}

/* ===== ИНДИКАТОРЫ ===== */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 
        10px 10px 20px var(--shadow-dark),
        -10px -10px 20px var(--shadow-light);
    text-align: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--shadow-dark);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.offline-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--error);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    box-shadow: 0 5px 15px rgba(255,107,107,0.3);
    z-index: 1000;
    animation: pulse 2s infinite;
}

.messages-count {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    box-shadow: 
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
    z-index: 100;
}

/* ===== ОШИБКИ ===== */
.socketio-error {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    z-index: 10000;
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

.socketio-error i {
    font-size: 3rem;
    color: var(--error);
    margin-bottom: 1rem;
}

.socketio-error h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.socketio-error p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.socketio-error button {
    margin: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.socketio-error button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* ===== СКРОЛЛБАР ===== */
.code::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.code::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

.code::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

.code::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
    box-shadow: inset 2px 2px 5px var(--shadow-dark);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(90, 143, 236, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(90, 143, 236, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(90, 143, 236, 0);
    }
}

@keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes tooltipFade {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pinGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        gap: 1rem;
        border-radius: 20px;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .row {
        margin: 1rem;
        flex-direction: column;
    }
    
    .msg-controls {
        bottom: 8px;
        right: 8px;
    }
    
    .pin-btn, .copy-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        opacity: 1;
        transform: translateY(0);
    }

    .copy-btn{
        left: 5px;
        bottom: 5px;
    }
    
    .pin-indicator {
        bottom: 12px;
        right: 12px;
        font-size: 0.9rem;
    }
    
    .pin-btn[data-tooltip]:hover::before,
    .pin-btn[data-tooltip]:hover::after,
    .copy-btn[data-tooltip]:hover::before,
    .copy-btn[data-tooltip]:hover::after {
        display: none;
    }
    
    .modal {
        padding: 1.5rem;
        width: 95%;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .modal-title i {
        font-size: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
    }
    
    .key-icon {
        width: 50px;
        height: 50px;
    }
    
    .key-icon i {
        font-size: 1.5rem;
    }
    
    .pinned-count {
        display: none;
    }
    
    .confirm-dialog {
        padding: 1.5rem;
    }
    
    .confirm-dialog-buttons {
        flex-direction: column;
    }
    
    .confirm-dialog-btn {
        width: 100%;
    }
}