:root {
    --primary: #7289da;
    --secondary: #43b581;
    --danger: #f04747;
    --warning: #faa61a;
    --dark-1: #36393f;
    --dark-2: #2f3136;
    --dark-3: #202225;
    --light-1: #40444b;
    --light-2: #b9bbbe;
    --light-3: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
}

body {
    background: var(--dark-1);
    color: var(--light-3);
    min-height: 100vh;
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    background: var(--dark-2);
    border-bottom: 1px solid var(--dark-3);
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: var(--light-3);
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--light-1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

.nav-brand i {
    color: var(--primary);
    font-size: 22px;
}

.nav-brand h1 {
    font-size: 18px;
    font-weight: 600;
}

.nav-user {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 14px;
}

/* MOBİL MENÜ */
.mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--dark-2);
    z-index: 999;
    padding: 20px;
    display: none;
    border-bottom: 1px solid var(--dark-3);
}

.mobile-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.category-btn {
    background: var(--light-1);
    border: none;
    color: var(--light-3);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.category-btn:hover, .category-btn.active {
    background: var(--primary);
}

.mobile-random-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    margin-bottom: 20px;
}

.mobile-online {
    text-align: center;
    color: var(--light-2);
    font-size: 14px;
}

/* ANA KONTEYNER */
.main-container {
    display: flex;
    min-height: calc(100vh - 60px);
    margin-top: 60px;
}

/* SIDEBAR */
.sidebar {
    width: 280px;
    background: var(--dark-2);
    border-right: 1px solid var(--dark-3);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    display: none;
}

/* CHAT ALANI */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
    width: 100%;
}

/* CHAT HEADER */
.chat-header {
    background: var(--dark-2);
    padding: 15px 20px;
    border-bottom: 1px solid var(--dark-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.chat-partner-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.partner-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.partner-details h2 {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.partner-details p {
    font-size: 13px;
    color: var(--light-2);
}

.chat-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-control {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
}

.btn-next {
    background: var(--primary);
    color: white;
}

.btn-leave {
    background: var(--light-1);
    color: var(--light-3);
}

.btn-control:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* MESAJLAR */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--dark-1);
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(114,137,218,0.1), rgba(67,181,129,0.1));
    border-radius: 16px;
    margin: auto;
    max-width: 600px;
    width: 100%;
}

.welcome-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
}

.welcome-message h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--primary);
}

.welcome-message p {
    color: var(--light-2);
    font-size: 16px;
    margin-bottom: 30px;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

.btn-welcome {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
}

#startGeneralChat {
    background: var(--primary);
    color: white;
}

#startRandomChat {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

/* MESAJ GİRİŞ */
.message-input-area {
    background: var(--dark-2);
    padding: 15px;
    border-top: 1px solid var(--dark-3);
}

.input-container {
    background: var(--light-1);
    border-radius: 12px;
    padding: 12px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.input-group textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--light-3);
    font-size: 15px;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    padding: 10px;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
}

.input-group textarea::placeholder {
    color: var(--light-2);
}

.btn-send {
    background: var(--primary);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.btn-send:hover:not(:disabled) {
    background: #5b6eae;
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.input-options {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-option {
    background: none;
    border: none;
    color: var(--light-2);
    cursor: pointer;
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-option:hover {
    color: var(--light-3);
    background: rgba(255,255,255,0.1);
}

.char-count {
    font-size: 12px;
    color: var(--light-2);
}

.room-info {
    font-size: 12px;
    color: var(--light-2);
}

/* MESAJ BALONLARI */
.message-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 8px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-bubble.other {
    background: var(--light-1);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-bubble.self {
    background: var(--primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.message-username {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.message-time {
    font-size: 11px;
    color: var(--light-2);
    margin-left: auto;
    white-space: nowrap;
}

.message-content {
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--dark-2);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--dark-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: var(--light-2);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.close-modal:hover {
    color: var(--light-3);
    background: rgba(255,255,255,0.1);
}

.emoji-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.emoji-item {
    font-size: 28px;
    cursor: pointer;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
}

.emoji-item:hover {
    background: var(--light-1);
}

/* BİLDİRİM */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    background: var(--primary);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 3000;
    animation: slideInUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.notification.error {
    background: var(--danger);
}

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* LOADER */
.loader {
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top: 3px solid var(--primary);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESPONSIVE */
@media (min-width: 769px) {
    .mobile-menu-btn, .mobile-menu {
        display: none !important;
    }
    
    .sidebar {
        display: flex;
    }
    
    .main-container {
        flex-direction: row;
    }
    
    .message-bubble {
        max-width: 70%;
    }
}

@media (min-width: 481px) {
    .welcome-actions {
        flex-direction: row;
        max-width: 500px;
    }
    
    .btn-welcome {
        flex: 1;
    }
    
    .notification {
        left: auto;
        right: 20px;
        width: auto;
    }
}

/* TOUCH DEVICE */
@media (hover: none) and (pointer: coarse) {
    .category-btn, .btn-control, .btn-send, .btn-welcome {
        min-height: 44px;
    }
}
/* assets/css/style.css dosyasına ekleyin */

/* SİSTEM MESAJLARI */
.system-message {
    text-align: center;
    padding: 10px 20px;
    margin: 10px auto;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    color: #ffc107;
    max-width: 80%;
    font-size: 14px;
}

.system-message i {
    margin-right: 8px;
}

/* EŞLEŞME SAYFASI */
.match-timer {
    font-size: 16px;
    margin: 15px 0;
    color: var(--primary);
    font-weight: bold;
}

.match-info {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 3px solid var(--primary);
}

.match-info p {
    margin: 5px 0;
    font-size: 14px;
}

.match-info i {
    color: var(--primary);
    margin-right: 8px;
}

.waiting-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-warning {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-secondary {
    background: var(--light-1);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #4f545c;
}

/* MESAJ ZAMAN STİLİ */
.message-time {
    font-size: 11px;
    color: var(--light-2);
    margin-left: auto;
    white-space: nowrap;
    font-family: monospace;
}

/* PARTNER DURUM GÖSTERGESİ */
.partner-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-online { background: #43b581; }
.status-away { background: #faa61a; }
.status-offline { background: #747f8d; }

/* MOBİL OPTİMİZASYON */
@media (max-width: 768px) {
    .waiting-actions {
        flex-direction: column;
    }
    
    .btn-warning, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .match-info {
        padding: 12px;
        font-size: 13px;
    }
}

/* ANİMASYONLAR */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.searching-animation {
    animation: pulse 1.5s infinite;
}