/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.logo i {
    font-size: 24px;
    color: #3498db;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: #3498db;
}

/* Main Content Styles */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Challenge Info Styles */
.challenge-info {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.challenge-info h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.challenge-info p {
    margin-bottom: 15px;
}

.challenge-info code {
    background-color: #f8f9fa;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    color: #e74c3c;
}

.flags-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.flag {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border-left: 4px solid #3498db;
}

.flag h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.flag .status {
    font-weight: bold;
    color: #e74c3c;
}

.flag .status.found {
    color: #2ecc71;
}

/* Chat Container Styles */
.chat-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 15px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.bot .message-content {
    background-color: #f0f2f5;
    border-top-left-radius: 4px;
}

.message.user .message-content {
    background-color: #3498db;
    color: white;
    border-top-right-radius: 4px;
}

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

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.chat-input button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.chat-input button:hover {
    background-color: #2980b9;
}

/* Auth Container Styles */
.auth-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

.form-group button {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-group button:hover {
    background-color: #2980b9;
}

.form-message {
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
}

.form-message.error {
    color: #e74c3c;
}

.form-message.success {
    color: #2ecc71;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: #3498db;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #ddd;
    color: #777;
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .flags-container {
        grid-template-columns: 1fr;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .auth-container {
        padding: 20px;
    }
}