* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: url('/static/img/1.jpg')  top center fixed;
    
    min-height: 100vh;
    color: #333;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Login Screen */
.login-container {
    background: white;
    background: radial-gradient(circle at center, #ffffff 0%, #e3e3ff 40%, #030305 100%);
    background: radial-gradient(
        circle at center,
        #fff 0%,
        #fff 5%,
        #000 15%,
        #000 100%
    );
    background:
        radial-gradient(circle at center, #fff 0%, #fff 2%, #000 8%, #000 100%),
        repeating-conic-gradient(
            from 0deg,
            #fff 0deg 5deg,
            #000 5deg 15deg
        );
    
    background-blend-mode: lighten;
    background:
        radial-gradient(circle at center, #fff 0%, #fff 2%, #000 8%, #000 100%),
        repeating-conic-gradient(
            from 0deg,
            #fff 0deg 2deg,
            #000 2deg 10deg
        );
    background-blend-mode: lighten;
    background:
        radial-gradient(circle at center, #fff 0%, #fff 2%, #000 8%, #000 100%),
        repeating-conic-gradient(
            from 0deg,
            #fff 0deg 1deg,
            #000 1deg 4deg
        );
    background-blend-mode: lighten;
    background:
    radial-gradient(circle at center, #fff 0%, #fff 39%, #000 92%, #000 100%),
    repeating-conic-gradient(
        from 0deg,
        #fff 1deg 1.5deg,
        #000 1.9deg 10.5deg
    );
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: fadeIn 9s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-container h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.login-container p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.login-form {
    margin-bottom: 30px;
}

.login-form h2 {
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.user-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
}

.user-info h3 {
    color: #333;
    margin-bottom: 15px;
}

.user-info ul {
    list-style: none;
}

.user-info li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.user-info li:last-child {
    border-bottom: none;
}

/* Chat Screen */
.chat-container {
    background: rgb(238, 182, 182);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h1 {
    font-size: 1.8em;
}

.chat-header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: none;
    padding: 0;
}

#logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    font-size: 14px;
}

#logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.users-sidebar {
    width: 250px;
    background: #b3d2f1;
    border-right: 1px solid #e9ecef;
    padding: 20px;
    overflow-y: auto;
}

.users-sidebar h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
}

#active-users-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 8px;
}

.active-user {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #667eea;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 2px 6px rgba(102,126,234,0.12);
}

.active-user .user-name {
    font-weight: 600;
    color: #333;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;    
    background: url('/static/img/1.jpg') center center fixed;

}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.message.own {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 10px;
}

.message-content {
    max-width: 60%;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.message.own .message-content {
    background: #667eea;
    color: white;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.message.own .message-header {
    color: rgba(255, 255, 255, 0.8);
}

.message-name {
    font-weight: 600;
}

.message-time {
    color: #999;
    font-size: 0.8em;
}

.message.own .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.message-text {
    word-wrap: break-word;
    line-height: 1.4;
}

.message-input {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.message-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.message-input input:focus {
    border-color: #667eea;
}

.message-input button {
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
}

.system-message {
    text-align: center;
    margin: 15px 0;
    color: #666;
    font-style: italic;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        max-width: 100vw;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
    }
    .chat-main {
        flex-direction: column;
        height: 100%;
    }
    .users-sidebar {
        width: 100%;
        max-height: 120px;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 10px;
        overflow-x: auto;
    }
    .chat-area {
        flex: 1;
        min-height: 0;
        position: relative;
    }
    .messages-container {
        padding: 10px 4px;
        min-height: 0;
        height: 100%;
    }
    .message-content {
        max-width: 90vw;
        font-size: 1em;
        padding: 10px 8px;
    }
    .message-input {
        padding: 10px 4px;
        flex-direction: column;
        gap: 6px;
    }
    .message-input input {
        font-size: 1em;
        padding: 10px 8px;
    }
    .message-input button {
        font-size: 1em;
        padding: 10px 8px;
    }
    .login-container {
        padding: 20px 8px;
        margin: 0 auto;
        width: 95vw;
        min-width: unset;
        max-width: 400px;
    }
}

/* Scrollbar Styling */
::-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: #a8a8a8;
}

/* Inactivity Warning */
#inactivity-warning {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b6b;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    display: none;
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.warning-content span {
    font-weight: 600;
}

.warning-content button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.warning-content button:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

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