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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #a0a0a0;
    font-size: 1.2rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.game-card.inactive {
    opacity: 0.5;
    filter: grayscale(50%);
}

.game-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #2a2a4a;
}

.game-info {
    padding: 1.5rem;
}

.game-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.game-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.game-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

.game-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.game-category {
    display: inline-block;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.game-description {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.game-players {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.game-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.game-status.active {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.game-status.inactive {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.5rem;
    color: #a0a0a0;
    padding: 3rem;
}

.error {
    grid-column: 1 / -1;
    text-align: center;
    color: #f44336;
    padding: 2rem;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    background: #1a1a2e;
    margin: 2% auto;
    padding: 0;
    width: 95%;
    height: 95%;
    border-radius: 15px;
    overflow: hidden;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

.close:hover {
    color: #667eea;
}

#modal-body {
    width: 100%;
    height: 100%;
}

#modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}
