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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background: #f0f2f5;
    color: #333;
}

/* Navigation */
.navbar {
    background: #2c3e50;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: #34495e;
    transform: translateY(-2px);
}

.nav-links a.active {
    background: #3498db;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

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

.btn-secondary {
    background: #2ecc71;
}

.btn-secondary:hover {
    background: #27ae60;
}

/* Forms */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #3498db;
    outline: none;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
}

.form-footer a {
    color: #3498db;
    text-decoration: none;
}

/* Message Box */
.message-box {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    display: none;
}

.message-box.error {
    display: block;
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.message-box.success {
    display: block;
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Chat Room */
.chat-container {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-header {
    background: #2c3e50;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

.chat-notice {
    font-size: 0.9rem;
    color: #f8f9fa;
    margin-top: 0.5rem;
}

.chat-messages {
    height: 400px;
    padding: 1rem;
    overflow-y: auto;
}

.message {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 5px;
    position: relative;
}

.username {
    font-weight: bold;
    color: #2c3e50;
}

.message-time {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

.chat-input {
    display: flex;
    padding: 1rem;
    gap: 1rem;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.chat-input input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        margin-top: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .chat-container {
        margin: 1rem;
    }
}