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

body {
    font-family: 'Inter', sans-serif;
    background-color: #0b141a;
    color: #e9edef;
    height: 100vh;
    overflow: hidden;
}

/* Home Page Styles */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.join-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #e9edef;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00a884;
    box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.join-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #00a884, #008f72);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 168, 132, 0.3);
}

.join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 132, 0.4);
}

.join-btn:active {
    transform: translateY(0);
}

/* Chat Room Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(135deg, #0b141a, #1a1a1a);
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
    background: #0b141a;
}

.message {
    margin-bottom: 16px;
    max-width: 65%;
    animation: fadeIn 0.3s ease;
}

.message.own-message {
    margin-left: auto;
    margin-right: 0;
}

.message.other-message {
    margin-left: 0;
    margin-right: auto;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    font-size: 15px;
    line-height: 1.4;
}

.message.own-message .message-content {
    background: #005c4b;
    color: #e9edef;
    border-bottom-right-radius: 4px;
}

.message.other-message .message-content {
    background: #202c33;
    color: #e9edef;
    border-bottom-left-radius: 4px;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
    color: #8696a0;
}

.message.own-message .message-header {
    justify-content: flex-end;
}

.message.other-message .message-header {
    justify-content: flex-start;
}

.username {
    font-weight: 600;
    color: #00a884;
    margin-right: 8px;
}

.gender {
    font-size: 11px;
    color: #8696a0;
    font-weight: 500;
}

.time {
    font-size: 11px;
    color: #8696a0;
    margin-left: 8px;
}

.system-message {
    text-align: center;
    margin: 16px 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #8696a0;
    font-size: 13px;
    font-style: italic;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.input-area {
    padding: 20px;
    background: #202c33;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.emoji-picker {
    position: relative;
}

.emoji-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    color: #e9edef;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #00a884;
}

.emoji-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #202c33;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    display: none;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.emoji-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.emoji:hover {
    background: rgba(0, 168, 132, 0.2);
}

.message-input-container {
    flex: 1;
    display: flex;
    gap: 12px;
}

#messageInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: #2a3942;
    color: #e9edef;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

#messageInput:focus {
    outline: none;
    border-color: #00a884;
    box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

#messageInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.send-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #00a884, #008f72);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 168, 132, 0.3);
}

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

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

/* Scrollbar Styling */
.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.messages::-webkit-scrollbar-thumb {
    background: rgba(0, 168, 132, 0.3);
    border-radius: 3px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 168, 132, 0.5);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .join-form {
        padding: 24px 10px;
        max-width: 95vw;
    }
    .chat-container {
        padding: 0;
    }
    .messages {
        padding: 10px 4vw;
    }
    .input-area {
        padding: 10px 4vw;
    }
}

@media (max-width: 768px) {
    .join-form {
        padding: 18px 4vw;
        margin: 10px;
        max-width: 98vw;
    }
    .messages {
        padding: 8px 2vw;
    }
    .input-area {
        padding: 8px 2vw;
        gap: 6px;
    }
    .emoji-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .message {
        max-width: 90%;
        font-size: 14px;
    }
    .message-content {
        font-size: 14px;
        padding: 10px 12px;
    }
    .message-header {
        font-size: 11px;
    }
    .send-btn, .emoji-btn {
        width: 40px;
        height: 40px;
        font-size: 17px;
        padding: 10px;
    }
    #messageInput {
        font-size: 14px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    .join-form {
        padding: 10px 2vw;
        margin: 0;
        border-radius: 0;
        min-width: 100vw;
        max-width: 100vw;
        box-shadow: none;
    }
    .chat-container {
        border-radius: 0;
        min-width: 100vw;
        max-width: 100vw;
    }
    .messages {
        padding: 4px 1vw;
        font-size: 13px;
    }
    .input-area {
        flex-direction: column;
        gap: 6px;
        padding: 6px 1vw;
    }
    .message-input-container {
        width: 100%;
        gap: 6px;
    }
    .emoji-picker {
        align-self: flex-start;
    }
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
    }
    .emoji {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    .message {
        max-width: 98%;
        font-size: 13px;
    }
    .message-content {
        font-size: 13px;
        padding: 8px 8px;
    }
    .message-header {
        font-size: 10px;
    }
    .send-btn, .emoji-btn {
        width: 36px;
        height: 36px;
        font-size: 15px;
        padding: 8px;
    }
    #messageInput {
        font-size: 13px;
        padding: 8px 8px;
    }
}

/* Ensure chat always fills viewport height on mobile */
@media (max-width: 600px) {
    html, body, .chat-container {
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
    }
    .messages {
        min-height: 0;
        max-height: calc(100vh - 120px);
    }
    .input-area {
        min-height: 60px;
        max-height: 120px;
    }
} 