/* Mobil Sohbet Sitesi - CSS */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-color: #f5f7fa;
    --dark-bg: #1a1a2e;
    --card-bg: #ffffff;
    --text-color: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Login Screen */
#loginScreen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.login-header .logo i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Color Picker */
.color-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--text-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--border-color);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.stat-item small {
    display: block;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Chat Screen */
#chatScreen {
    height: 100vh;
    position: relative;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.room-info h2 {
    font-size: 1.1rem;
    margin: 0;
}

.online-count {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.online-count .fa-circle {
    font-size: 0.5rem;
    animation: pulse 2s infinite;
}

.header-right {
    display: flex;
    gap: 0.5rem;
}

.header-right .icon-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.header-right .icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s;
    z-index: 200;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 1.5rem;
    color: white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.user-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.status {
    font-size: 0.85rem;
    opacity: 0.9;
}

.status.online::before {
    content: '●';
    margin-right: 0.3rem;
    color: #10b981;
}

/* Rooms Section */
.rooms-section {
    padding: 1.5rem;
}

.rooms-section h4 {
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rooms-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.room-item {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
}

.room-item:hover {
    background: var(--bg-color);
}

.room-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.room-item i {
    font-size: 1.2rem;
}

.room-item span:first-of-type {
    flex: 1;
}

.room-users {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.room-item.active .room-users {
    background: rgba(255, 255, 255, 0.2);
}

/* User List Sidebar */
.user-list-sidebar {
    position: fixed;
    right: -300px;
    top: 0;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s;
    z-index: 200;
    overflow-y: auto;
}

.user-list-sidebar.active {
    right: 0;
}

.user-list-sidebar .sidebar-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 1.5rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-list-sidebar .sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.user-list-sidebar .sidebar-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
}

.users-list {
    padding: 1rem;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-item:hover {
    background: var(--bg-color);
}

.user-item .avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.user-item-info {
    flex: 1;
}

.user-item-info .username {
    font-weight: 600;
    color: var(--text-color);
}

.user-item-info .status {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--bg-color);
    scroll-behavior: smooth;
}

.welcome-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.welcome-message i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-message h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Message */
.message {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s;
}

.message.own {
    flex-direction: row-reverse;
}

.message .avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
}

.message.own .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.message.own .message-header {
    flex-direction: row-reverse;
}

.message-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.message-text {
    background: white;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    word-wrap: break-word;
}

.message.own .message-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* System Message */
.message.system {
    justify-content: center;
}

.message.system .message-text {
    background: var(--info-color);
    color: white;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Message Input */
.message-input-container {
    background: white;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: sticky;
    bottom: 0;
}

#messageInput {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s;
}

#messageInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

.send-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

/* Emoji Picker */
.emoji-picker {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 150;
}

.emoji-picker.active {
    display: block;
    animation: fadeInUp 0.3s;
}

.emoji-list {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
}

.emoji {
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.emoji:hover {
    background: var(--bg-color);
    transform: scale(1.2);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
}

.footer p {
    margin: 0.3rem 0;
    opacity: 0.8;
}

.developer {
    color: var(--primary-color);
}

.developer strong {
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 1.5rem;
    }
    
    .color-picker {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .message-content {
        max-width: 80%;
    }
    
    .emoji-list {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .sidebar,
    .user-list-sidebar {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .stats {
        gap: 0.5rem;
    }
    
    .stat-item span {
        font-size: 1.2rem;
    }
    
    .room-info h2 {
        font-size: 1rem;
    }
    
    .sidebar,
    .user-list-sidebar {
        width: 100%;
        left: -100%;
        right: -100%;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .user-list-sidebar.active {
        right: 0;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

