*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Segoe UI',Tahoma,sans-serif;background:linear-gradient(135deg,#667eea,#764ba2);min-height:100vh;padding:20px}
.container{max-width:700px;margin:0 auto}
header{text-align:center;color:#fff;margin-bottom:30px}
header h1{font-size:2.2rem;text-shadow:2px 2px 4px rgba(0,0,0,.3);margin-bottom:6px}
.subtitle{font-size:1.1rem;opacity:.9}
.user-bar{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:8px}
#greeting{font-size:1.05rem;font-weight:600}
.btn-logout{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.4);color:#fff;padding:6px 16px;border-radius:8px;cursor:pointer;font-size:.9rem;transition:background .2s}
.btn-logout:hover{background:rgba(255,255,255,.35)}
.card{background:#fff;border-radius:16px;padding:24px;box-shadow:0 10px 30px rgba(0,0,0,.15);margin-bottom:30px}
.card h2{color:#333;margin-bottom:14px;font-size:1.3rem}
.row{display:flex;gap:16px}
.row .field{flex:1}
.field{margin-bottom:14px}
label{display:block;font-weight:600;color:#444;margin-bottom:6px;font-size:.95rem}
input[type="text"],input[type="password"],textarea{width:100%;padding:12px;border:2px solid #e0e0e0;border-radius:10px;font-size:1rem;font-family:inherit;resize:vertical;transition:border-color .2s}
input[type="text"]:focus,input[type="password"]:focus,textarea:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 3px rgba(102,126,234,.2)}
.hint{display:block;font-size:.8rem;color:#999;margin-top:4px}
.switch-text{text-align:center;margin-top:16px;color:#888;font-size:.95rem}
.switch-text a{color:#667eea;text-decoration:none;font-weight:600}
.switch-text a:hover{text-decoration:underline}
.mood-picker{display:flex;flex-wrap:wrap;gap:6px}
.mood-btn{width:42px;height:42px;font-size:1.4rem;border:2px solid #e0e0e0;border-radius:10px;background:#f9f9f9;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center}
.mood-btn:hover{transform:scale(1.15);border-color:#667eea;background:#f0f3ff}
.mood-btn.selected{border-color:#667eea;background:#e8ecff;transform:scale(1.1);box-shadow:0 0 8px rgba(102,126,234,.4)}
.btn-primary{width:100%;padding:14px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:10px;font-size:1.1rem;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 5px 15px rgba(102,126,234,.4)}
.btn-primary:active{transform:translateY(0)}
.wall-header{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.wall-header h2{color:#fff;text-shadow:1px 1px 3px rgba(0,0,0,.2)}
.msg-count{background:rgba(255,255,255,.3);color:#fff;padding:4px 12px;border-radius:20px;font-weight:bold;font-size:.9rem}
.wall{display:flex;flex-direction:column;gap:14px}
.message-card{background:#fff;border-radius:14px;padding:18px;box-shadow:0 4px 15px rgba(0,0,0,.1);transition:transform .2s}
.message-card:hover{transform:translateY(-2px)}
.msg-header{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.msg-avatar{width:44px;height:44px;border-radius:50%;background:#f0f0f0;display:flex;align-items:center;justify-content:center;font-size:1.6rem;flex-shrink:0}
.msg-meta{flex:1}
.msg-author{font-weight:700;color:#333}
.you-badge{background:#667eea;color:#fff;font-size:.7rem;padding:2px 7px;border-radius:6px;font-weight:600;vertical-align:middle;margin-left:4px}
.msg-time{font-size:.78rem;color:#aaa}
.msg-text{color:#444;font-size:1rem;line-height:1.5;word-break:break-word;margin-bottom:10px}
.msg-footer{display:flex;justify-content:flex-end}
.btn-delete-msg{background:none;border:1px solid #ddd;color:#999;padding:5px 10px;border-radius:8px;cursor:pointer;font-size:.8rem;transition:all .2s}
.btn-delete-msg:hover{background:#ffe5e5;color:#e74c3c;border-color:#e74c3c}
.empty-wall{background:rgba(255,255,255,.2);backdrop-filter:blur(10px);border-radius:14px;padding:40px;text-align:center;color:#fff;font-size:1.1rem}
.modal-overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:1000;align-items:center;justify-content:center;backdrop-filter:blur(4px)}
.modal{background:#fff;border-radius:16px;padding:28px;width:90%;max-width:400px;box-shadow:0 15px 40px rgba(0,0,0,.2)}
.modal h3{margin-bottom:10px;color:#333}
.modal p{color:#666;margin-bottom:12px}
.modal input{margin-bottom:16px}
.modal-actions{display:flex;gap:10px}
.btn-cancel,.btn-delete{flex:1;padding:10px;border-radius:10px;border:none;font-size:1rem;font-weight:600;cursor:pointer}
.btn-cancel{background:#f0f0f0;color:#555}
.btn-cancel:hover{background:#e0e0e0}
.btn-delete{background:#e74c3c;color:#fff}
.btn-delete:hover{background:#c0392b}
.error-msg{color:#e74c3c;font-size:.9rem;margin-top:10px;min-height:20px}
/* Личные сообщения */
.dm-section{margin-top:10px}
.dm-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:rgba(255,255,255,.2);padding:14px 20px;border-radius:14px;transition:background .2s}
.dm-header:hover{background:rgba(255,255,255,.3)}
.dm-header h2{color:#fff;margin:0;font-size:1.2rem;text-shadow:1px 1px 3px rgba(0,0,0,.2)}
.dm-arrow{color:#fff;font-size:1rem;transition:transform .3s}
.dm-arrow.open{transform:rotate(180deg)}
.dm-container{display:flex;background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 4px 15px rgba(0,0,0,.1);margin-top:10px;min-height:320px}
.dm-users{width:180px;border-right:1px solid #eee;background:#f9f9fb;flex-shrink:0}
.dm-users-title{padding:12px 14px;font-weight:700;color:#555;font-size:.85rem;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #eee}
.dm-user-item{padding:10px 14px;cursor:pointer;transition:background .15s;font-size:.95rem;color:#333;border-bottom:1px solid #f0f0f0}
.dm-user-item:hover{background:#e8ecff}
.dm-user-item.active{background:#667eea;color:#fff;font-weight:600}
.dm-user-item .dm-unread{background:#e74c3c;color:#fff;font-size:.7rem;padding:1px 6px;border-radius:8px;margin-left:6px}
.dm-chat{flex:1;display:flex;flex-direction:column}
.dm-chat-header{padding:12px 16px;font-weight:600;color:#555;border-bottom:1px solid #eee;font-size:.95rem;min-height:42px;display:flex;align-items:center}
.dm-messages{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:8px;max-height:350px}
.dm-msg{max-width:75%;padding:10px 14px;border-radius:12px;font-size:.93rem;line-height:1.4;word-break:break-word}
.dm-msg.incoming{background:#f0f0f5;align-self:flex-start;border-bottom-left-radius:4px}
.dm-msg.outgoing{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.dm-msg-sender{font-size:.72rem;font-weight:700;margin-bottom:3px}
.dm-msg.incoming .dm-msg-sender{color:#667eea}
.dm-msg.outgoing .dm-msg-sender{color:rgba(255,255,255,.8)}
.dm-msg-time{font-size:.7rem;opacity:.6;margin-top:4px}
.dm-msg.incoming .dm-msg-time{color:#999}
.dm-msg.outgoing .dm-msg-time{color:rgba(255,255,255,.7)}
.dm-no-chat{display:flex;align-items:center;justify-content:center;flex:1;color:#bbb;font-size:1rem}
.dm-input-row{display:flex;gap:8px;padding:10px 14px;border-top:1px solid #eee}
.dm-input-row input{flex:1;padding:10px;border:2px solid #e0e0e0;border-radius:10px;font-size:.95rem;font-family:inherit}
.dm-input-row input:focus{outline:none;border-color:#667eea}
.btn-dm-send{padding:10px 18px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:10px;font-weight:600;cursor:pointer;transition:transform .15s}
.btn-dm-send:hover{transform:scale(1.04)}
@media(max-width:520px){.row{flex-direction:column;gap:0}header h1{font-size:1.6rem}.dm-container{flex-direction:column}.dm-users{width:100%;border-right:none;border-bottom:1px solid #eee;max-height:120px;overflow-y:auto}.dm-user-item{display:inline-block}.dm-users-title{display:inline-block;width:auto;border-bottom:none}}
