/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f9;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
}

/* Navigation styles */
nav {
    background-color: #2c3e50;
    border-radius: 5px;
    margin-bottom: 20px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    flex: 1;
    text-align: center;
}

nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 0;
    transition: background-color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #3498db;
}

/* Section styles */
.section {
    display: none;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.section.active {
    display: block;
}

.section h2 {
    color: #3498db;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Games grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.game-card {
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.game-info {
    padding: 15px;
}

.game-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.game-info p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.play-btn {
    display: block;
    background-color: #3498db;
    color: white;
    text-align: center;
    padding: 8px 0;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.play-btn:hover {
    background-color: #2980b9;
}

/* Chat styles */
.chat-container {
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-right: 10px;
}

.chat-input #username {
    flex: 0.3;
}

.chat-input button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
}

.chat-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    background-color: #e1f5fe;
    border-radius: 5px;
    max-width: 80%;
}

.chat-message.own {
    background-color: #e3f2fd;
    margin-left: auto;
}

.chat-message .username {
    font-weight: bold;
    margin-bottom: 2px;
}

/* Footer styles */
footer {
    text-align: center;
    padding: 15px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    .chat-input {
        flex-direction: column;
    }
    
    .chat-input input,
    .chat-input #username {
        margin-bottom: 10px;
        margin-right: 0;
    }
}