/* Reset ve Temel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

/* Modal Stilleri */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Buton Stilleri */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* Chat App Layout */
#chatApp {
    display: flex;
    height: 100%;
}

.hidden {
    display: none !important;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.user-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.user-status.online {
    background: #4CAF50;
    color: white;
}

.user-status.offline {
    background: #f44336;
    color: white;
}

.user-status.away {
    background: #ff9800;
    color: white;
}

.search-box {
    padding: 20px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.friends-list {
    flex: 1;
    padding: 0 20px;
    overflow-y: auto;
}

.friends-list h4 {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.friend-item:hover {
    background: #e8eaf6;
}

.friend-item.active {
    background: #667eea;
}

.friend-item.active .friend-name,
.friend-item.active .friend-last-message {
    color: white;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.friend-last-message {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-time {
    font-size: 11px;
    color: #999;
}

.friend-unread {
    background: #f44336;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-user-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 4px;
}

.chat-user-status {
    font-size: 13px;
    color: #4CAF50;
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f5f5f5;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.welcome-message i {
    font-size: 60px;
    color: #667eea;
    margin-bottom: 20px;
}

.welcome-message h3 {
    margin-bottom: 10px;
    color: #333;
}

.message {
    display: flex;
    margin-bottom: 20px;
    max-width: 70%;
}

.message.sent {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message.received {
    margin-right: auto;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 10px;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.message.sent .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

.message.sent .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.message-input-area {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-actions {
    display: flex;
    gap: 5px;
}

.message-input-area input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.message-input-area input:focus {
    outline: none;
    border-color: #667eea;
}

/* Info Panel */
.info-panel {
    width: 300px;
    background: white;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.info-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-header h3 {
    color: #333;
}

.info-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.friend-info {
    text-align: center;
    margin-bottom: 30px;
}

.info-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.info-section {
    margin-bottom: 25px;
}

.info-section h5 {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background: #f5f5f5;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #e8eaf6;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.file-size {
    font-size: 11px;
    color: #999;
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 100px;
    right: 20px;
    width: 300px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 15px;
    z-index: 1000;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.emoji {
    font-size: 24px;
    text-align: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.emoji:hover {
    background: #f5f5f5;
    transform: scale(1.2);
}

/* Responsive Tasarım */
@media (max-width: 1024px) {
    .container {
        height: 95vh;
    }
    
    .sidebar {
        width: 250px;
    }
    
    .info-panel {
        width: 250px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        height: 100vh;
        border-radius: 0;
    }
    
    .sidebar {
        width: 100%;
        position: absolute;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .info-panel {
        width: 100%;
        position: absolute;
        z-index: 100;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .info-panel.active {
        transform: translateX(0);
    }
    
    .message {
        max-width: 85%;
    }
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar Stilleri */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
/* Settings Modal Stilleri */
.settings-modal {
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.settings-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.settings-tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.settings-tab-btn:hover {
    color: #667eea;
    background: #f8f9fa;
}

.settings-tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 500;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.settings-tab {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-tab.active {
    display: block;
}

.settings-tab h3 {
    margin-bottom: 20px;
    color: #333;
}

.privacy-options,
.notification-options {
    margin-bottom: 30px;
}

.privacy-option,
.notification-option {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.privacy-option label,
.notification-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    color: #333;
}

.privacy-option input,
.notification-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
    color: #333;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    color: white;
}

.danger-zone {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    margin-top: 30px;
}

.danger-zone h4 {
    color: #856404;
    margin-bottom: 10px;
}

.danger-zone p {
    color: #856404;
    font-size: 14px;
    margin-bottom: 15px;
}

.danger-zone .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Message Context Menu */
.message-context-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 150px;
    display: none;
}

.message-context-menu.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

.context-menu-item.delete {
    color: #dc3545;
}

.context-menu-item.delete:hover {
    background: #f8d7da;
}

/* Message Actions */
.message-actions {
    position: absolute;
    top: -10px;
    right: -10px;
    background: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 10;
}

.message:hover .message-actions {
    display: flex;
}

.message-actions-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.message-actions-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* Confirmation Modal */
.confirmation-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

.confirmation-modal h2 {
    color: #333;
    margin-bottom: 15px;
}

.confirmation-modal p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.confirmation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirmation-buttons .btn {
    min-width: 100px;
}

/* User Management */
.user-management {
    margin-top: 30px;
}

.user-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #f8f9fa;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.user-item:hover {
    background: #e8eaf6;
}

.user-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}

.user-item-info {
    flex: 1;
}

.user-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.user-item-email {
    font-size: 12px;
    color: #666;
}

.user-item-actions {
    display: flex;
    gap: 5px;
}

.user-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.user-action-btn:hover {
    background: #667eea;
    color: white;
}

.user-action-btn.delete:hover {
    background: #dc3545;
}

/* Search and Filter */
.search-filter {
    margin-bottom: 20px;
}

.search-filter input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.filter-btn:hover {
    background: #e0e0e0;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon {
    color: #28a745;
}

.toast.error .toast-icon {
    color: #dc3545;
}

.toast.warning .toast-icon {
    color: #ffc107;
}

.toast.info .toast-icon {
    color: #17a2b8;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Settings */
@media (max-width: 768px) {
    .settings-modal {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .settings-tabs {
        flex-wrap: wrap;
    }
    
    .settings-tab-btn {
        flex: 0 0 calc(50% - 10px);
        margin-bottom: 10px;
        font-size: 12px;
        padding: 12px 8px;
    }
    
    .account-actions {
        flex-direction: column;
    }
    
    .confirmation-buttons {
        flex-direction: column;
    }
    
    .confirmation-buttons .btn {
        width: 100%;
    }
}