/* Chat Page Styles */
.chat-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 100px 2rem 2rem; }

.chat-container {
    width: 100%; max-width: 700px; height: 75vh;
    display: flex; flex-direction: column;
    background: var(--card); border: 1px solid var(--glass-border);
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.chat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(230,57,70,0.05); border-bottom: 1px solid var(--glass-border);
}
.chat-header-info { display: flex; align-items: center; gap: 0.75rem; }
.chat-avatar {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 50%; font-size: 1.1rem;
}
.chat-header h3 { font-family: var(--font-display); font-size: 1rem; }
.chat-status { font-size: 0.8rem; color: var(--text2); display: flex; align-items: center; gap: 0.4rem; }
.status-dot-online { width: 8px; height: 8px; background: #00ff44; border-radius: 50%; animation: pulse 2s infinite; }

.chat-header-actions { display: flex; gap: 0.5rem; }
.chat-rules-btn {
    padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 0.8rem;
    background: var(--glass); border: 1px solid var(--glass-border);
    color: var(--text2); cursor: pointer; transition: all 0.3s;
}
.chat-rules-btn:hover { border-color: var(--red); color: var(--red); }

.chat-rules-panel {
    display: none; padding: 1rem 1.5rem;
    background: rgba(255,165,0,0.05); border-bottom: 1px solid var(--glass-border);
}
.chat-rules-panel.show { display: block; }
.chat-rules-panel h4 { font-size: 0.9rem; margin-bottom: 0.5rem; color: #ffa500; display: flex; align-items: center; gap: 0.5rem; }
.chat-rules-panel ul { list-style: none; }
.chat-rules-panel li { font-size: 0.85rem; color: var(--text2); padding: 0.2rem 0; }
.chat-rules-panel li::before { content: ''; width: 4px; height: 4px; background: var(--red); border-radius: 50%; display: inline-block; margin-right: 0.5rem; }

.chat-login-panel {
    flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.chat-login-box { text-align: center; max-width: 350px; }
.chat-login-icon { font-size: 3rem; color: var(--red); margin-bottom: 1rem; }
.chat-login-box h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 0.5rem; }
.chat-login-box p { color: var(--text2); font-size: 0.9rem; margin-bottom: 1.5rem; }
.chat-login-input { display: flex; gap: 0.5rem; }
.chat-login-input input {
    flex: 1; padding: 0.8rem 1rem; border-radius: 10px;
    background: var(--glass); border: 1px solid var(--glass-border);
    color: var(--text); font-family: var(--font); font-size: 0.95rem; outline: none;
}
.chat-login-input input:focus { border-color: var(--red); }
.chat-login-input button {
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--red); border: none; color: white; font-size: 1rem;
    cursor: pointer; transition: all 0.3s;
}
.chat-login-input button:hover { background: #ff4757; }

.chat-messages {
    flex: 1; overflow-y: auto; padding: 1rem;
    display: flex; flex-direction: column; gap: 0.5rem;
}

.chat-welcome {
    text-align: center; padding: 2rem; color: var(--text2);
}
.chat-welcome i { font-size: 2rem; margin-bottom: 0.5rem; display: block; color: var(--red); }
.chat-welcome p { font-size: 0.9rem; }

.chat-msg {
    padding: 0.6rem 1rem; border-radius: 12px;
    background: var(--glass); max-width: 80%;
}
.chat-msg.me { align-self: flex-end; background: rgba(230,57,70,0.15); border: 1px solid rgba(230,57,70,0.2); }
.chat-msg.staff { background: rgba(88,101,242,0.1); border: 1px solid rgba(88,101,242,0.2); }

.msg-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }
.msg-user { font-size: 0.8rem; font-weight: 700; color: var(--red); }
.msg-user.staff-name { color: #5865F2; }
.msg-time { font-size: 0.7rem; color: var(--text2); }
.msg-text { font-size: 0.9rem; color: var(--text); line-height: 1.5; word-break: break-word; }

.chat-system {
    text-align: center; font-size: 0.8rem; color: var(--text2);
    padding: 0.3rem 0; font-style: italic;
}

.chat-input-area {
    display: flex; gap: 0.5rem; padding: 1rem;
    border-top: 1px solid var(--glass-border);
}
.chat-input-area input {
    flex: 1; padding: 0.8rem 1rem; border-radius: 10px;
    background: var(--glass); border: 1px solid var(--glass-border);
    color: var(--text); font-family: var(--font); font-size: 0.95rem; outline: none;
}
.chat-input-area input:focus { border-color: var(--red); }
.chat-input-area button {
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--red); border: none; color: white; font-size: 1rem;
    cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center;
}
.chat-input-area button:hover { background: #ff4757; transform: scale(1.05); }

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

@media (max-width: 768px) {
    .chat-container { height: 85vh; border-radius: 12px; }
    .chat-msg { max-width: 90%; }
}
