.modern-chat {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    color: #f3f3f3;
    font-family: 'Poppins', sans-serif;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}
.chat-header-simple {
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 20px;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.online-status {
    color: #ffcc00;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modern-chat .chat-header {
    background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
    color: #fff;
    padding: 28px 32px 18px 32px;
    border-radius: 22px 22px 0 0;
    text-align: left;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.12);
}
.modern-chat .chat-header h2 {
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.modern-chat .chat-header i {
    color: #ffcc00;
    font-size: 2.1rem;
    margin-right: 6px;
}
.modern-chat .chat-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.85;
    font-weight: 400;
}
.modern-chat .online-users {
    background: none;
    padding: 10px 32px 0 32px;
    font-size: 1.05rem;
}
.modern-chat .online-count {
    color: #ffcc00;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
}
.modern-chat .chat-messages {
    height: 280px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Mobil için chat mesajları yüksekliği düzeltmesi */
@media (max-width: 768px) {
    #team-chat .modern-chat .chat-messages {
        margin: 0;
    }

    .modern-chat .chat-messages {
        height: auto;
        min-height: 200px;
        max-height: 50vh; /* Viewport yüksekliğinin %50'si */
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .modern-chat {
        margin: 10px;
        border-radius: 12px;
    }

    #team-chat .modern-chat {
        margin: 0 !important;
        border-radius: 12px;
    }
    
    .chat-header-simple {
        padding: 10px 15px;
        border-radius: 12px 12px 0 0;
    }
    
    .online-status {
        font-size: 0.85rem;
    }
    
    .modern-chat .chat-input {
        padding: 12px 15px;
        border-radius: 0 0 12px 12px;
    }
    
    .modern-chat .chat-nick, .modern-chat .chat-message {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    
    .modern-chat .chat-send-btn {
        font-size: 0.8rem;
        padding: 0 12px;
    }
    
    .modern-chat .message {
        max-width: 85%;
        margin-bottom: 6px;
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

/* Çok küçük ekranlar için ek optimizasyon */
@media (max-width: 480px) {
    #team-chat .modern-chat .chat-messages {
        max-height: min(45dvh, 320px) !important;
    }

    .modern-chat .chat-messages {
        min-height: 150px;
        max-height: 40vh !important;
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .modern-chat {
        margin: 5px;
        border-radius: 8px;
    }

    #team-chat .modern-chat {
        margin: 0 !important;
        border-radius: 8px;
    }
    
    .chat-header-simple {
        padding: 8px 12px;
        border-radius: 8px 8px 0 0;
    }
    
    .online-status {
        font-size: 0.8rem;
    }
    
    .modern-chat .chat-input {
        padding: 10px 12px;
        border-radius: 0 0 8px 8px;
    }
    
    .modern-chat .chat-nick, .modern-chat .chat-message {
        font-size: 0.85rem;
        padding: 6px 8px;
    }
    
    .modern-chat .chat-send-btn {
        font-size: 0.75rem;
        padding: 0 10px;
        height: 36px;
    }
    
    .modern-chat .message {
        max-width: 90%;
        margin-bottom: 4px;
        padding: 5px 8px;
        font-size: 0.85rem;
    }
    
    .modern-chat .message-header {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }
    
    .modern-chat .username {
        font-size: 0.85rem;
    }
    
    .modern-chat .timestamp {
        font-size: 0.7rem;
    }
}

/* Çok agresif mobil düzeltme - tüm mobil cihazlar için */
@media (max-width: 768px) {
    .modern-chat .chat-messages {
        height: auto !important;
        min-height: 200px !important;
        max-height: 60vh !important; /* Daha büyük alan */
        padding: 15px !important;
        font-size: 0.9rem !important;
        overflow-y: auto !important;
    }
}
.modern-chat .message {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    animation: fadeInUp 0.3s ease;
    max-width: 75%;
}
.modern-chat .message.own {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    margin-left: auto;
    border-bottom-right-radius: 4px;
    color: #fff;
}
.modern-chat .message.other {
    background: rgba(255,255,255,0.1);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}
.modern-chat .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}
.modern-chat .username {
    font-weight: 700;
    color: #ffcc00;
    font-size: 1em;
}
.modern-chat .timestamp {
    font-size: 0.85em;
    opacity: 0.7;
}
.modern-chat .message-content {
    word-wrap: break-word;
    line-height: 1.5;
}
.modern-chat .chat-input {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Uyarı Mesajı Stili */
.chat-warning-message {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(221, 36, 118, 0.15) 100%);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffcc00;
    font-size: 0.85rem;
    line-height: 1.4;
    animation: pulse-warning 2s infinite;
}

.chat-warning-message i {
    color: #ff6b35;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.chat-warning-message strong {
    color: #ff6b35;
    font-weight: 600;
}

.chat-warning-message span {
    color: #fff;
}

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
    }
    50% {
        opacity: 0.9;
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0);
    }
}

/* Mobil için uyarı mesajı */
@media (max-width: 768px) {
    .chat-warning-message {
        font-size: 0.75rem;
        padding: 8px 12px;
        margin-bottom: 10px;
    }
    
    .chat-warning-message i {
        font-size: 1rem;
    }
}
.modern-chat .chat-nick, .modern-chat .chat-message {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    font-size: 0.95rem;
    padding: 10px 12px;
    margin-bottom: 0;
    box-shadow: none;
    outline: none;
    transition: all 0.2s;
}
.modern-chat .chat-nick:focus, .modern-chat .chat-message:focus {
    border-color: #ff6b35;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}
.modern-chat .chat-input-group {
    gap: 7px;
}
.modern-chat .chat-send-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.modern-chat .chat-send-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}
.modern-chat .chat-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.modern-chat .chat-emoji-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffcc00;
    border-radius: 8px;
    font-size: 1.1rem;
    padding: 0 10px;
    transition: all 0.2s;
}
.modern-chat .chat-emoji-btn:hover {
    background: rgba(255, 204, 0, 0.1);
    border-color: #ffcc00;
}
.modern-chat .emoji-picker {
    position: absolute;
    bottom: 60px;
    left: 32px;
    background: #23232b;
    border: 1.5px solid #333;
    border-radius: 10px;
    padding: 10px 8px 6px 8px;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.15);
}
.modern-chat .emoji-btn {
    background: none;
    border: none;
    color: #ffcc00;
    font-size: 1.3em;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}
.modern-chat .emoji-btn:hover {
    background: rgba(255,204,0,0.12);
}
.modern-chat .typing-indicator {
    padding: 8px 32px;
    font-style: italic;
    opacity: 0.7;
    display: none;
    color: #ffcc00;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 601px) {
    .modern-chat .chat-input {
        flex-direction: column;
        align-items: stretch;
        padding: 24px 32px 18px 32px;
        gap: 8px;
    }
    .modern-chat .chat-nick {
        width: 100%;
        margin-bottom: 8px;
        font-size: 1rem;
        padding: 10px 14px;
        border-radius: 8px;
        background: #19191c;
        border: 1.5px solid #333;
        color: #fff;
        box-shadow: 0 1px 4px 0 rgba(0,0,0,0.08);
    }
    .modern-chat .chat-input-group {
        width: 100%;
        max-width: 100%;
        background: #23232b;
        border-radius: 14px;
        box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10);
        padding: 8px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    .modern-chat .chat-message {
        flex: 1 1 auto;
        font-size: 1.05rem;
        padding: 12px 12px;
        border-radius: 12px;
        background: #19191c;
        border: 1.5px solid #333;
        color: #fff;
        box-shadow: 0 1px 4px 0 rgba(0,0,0,0.08);
    }
}
.chat-container {
  background: #18181c;
  box-shadow: none;
  padding: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.modern-chat .chat-messages {
  background: #19191c;
  border-radius: 0 0 18px 18px;
  padding: 24px 18px 12px 18px;
  min-height: 220px;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.message {
  max-width: 80%;
  padding: 16px 18px 12px 18px;
  margin-bottom: 0;
  font-size: 1.08rem;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10);
  position: relative;
  word-break: break-word;
}
.message.bot, .message.other {
  background: #23232b;
  color: #fff;
  border-radius: 14px 14px 14px 4px;
  margin-right: auto;
  margin-left: 0;
}
.message.own {
  background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  margin-left: auto;
  margin-right: 0;
}
.message-header {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.username {
  font-weight: 700;
  color: #ffcc00;
  font-size: 1em;
}
.timestamp {
  font-size: 0.85em;
  opacity: 0.7;
  margin-left: 8px;
}
.modern-chat .chat-input {
  background: #23232b;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 -2px 16px 0 rgba(0,0,0,0.18);
  padding: 18px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modern-chat .chat-nick {
  width: 100%;
  margin-bottom: 8px;
  font-size: 1rem;
  padding: 10px 14px;
  border-radius: 8px;
  background: #19191c;
  border: 1.5px solid #333;
  color: #fff;
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.08);
}
.modern-chat .chat-input-group {
  width: 100%;
  background: #23232b;
  border-radius: 14px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10);
  padding: 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.modern-chat .chat-message {
  flex: 1 1 auto;
  font-size: 1.05rem;
  padding: 12px 12px;
  border-radius: 12px;
  background: #19191c;
  border: 1.5px solid #333;
  color: #fff;
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.08);
}
.modern-chat .chat-emoji-btn, .modern-chat .chat-send-btn {
  border-radius: 8px;
  border: none;
  background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
  color: #fff;
  height: 44px;
  min-width: 44px;
  font-size: 1.2rem;
  margin-left: 2px;
  box-shadow: 0 2px 8px 0 rgba(255,0,0,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modern-chat .chat-emoji-btn {
  background: #19191c;
  color: #ffcc00;
  border: 1.5px solid #333;
  font-size: 1.3rem;
  min-width: 44px;
  margin-left: 0;
}
.modern-chat .chat-emoji-btn:hover {
  background: #333;
  border-color: #ffcc00;
}
.modern-chat .chat-send-btn:disabled {
  background: #444;
  color: #bbb;
  cursor: not-allowed;
}
.header-gradient {
  background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
  border-radius: 0 0 0 0;
  padding: 28px 28px 18px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #fff;
  font-weight: bold;
  font-size: 2.1rem;
  letter-spacing: 1px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10);
}
.header-gradient .header-icon {
  font-size: 2.2rem;
  margin-right: 8px;
}
.header-gradient .header-title {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.header-gradient .header-desc {
  font-size: 1.1rem;
  font-weight: 400;
  margin-left: auto;
  color: #fff;
  opacity: 0.85;
}
@media (max-width: 700px) {
  .chat-container {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }
}
