@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f29 100%);
    color: #e8eef5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    text-align: center;
    padding: 2rem;
}

h1 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.pattern-grid {
    display: inline-grid;
    grid-template-columns: repeat(5, 60px);
    grid-template-rows: repeat(5, 60px);
    gap: 8px;
    margin-bottom: 2rem;
    user-select: none;
}

.cell {
    width: 60px;
    height: 60px;
    background: #252d3a;
    border: 2px solid #2d3748;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cell:hover {
    border-color: #5b9fff;
}

.cell.active {
    background: #5b9fff;
    border-color: #7db3ff;
    box-shadow: 0 0 20px rgba(91, 159, 255, 0.5);
}

#clear-btn {
    background: #252d3a;
    color: #e8eef5;
    border: 1px solid #2d3748;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#clear-btn:hover {
    background: #2d3748;
    border-color: #5b9fff;
}

.error-msg {
    margin-top: 1rem;
    color: #ff6b6b;
    font-size: 0.9rem;
}

.error-msg.hidden {
    display: none;
}

@media (max-width: 480px) {
    .pattern-grid {
        grid-template-columns: repeat(5, 50px);
        grid-template-rows: repeat(5, 50px);
        gap: 6px;
    }
    
    .cell {
        width: 50px;
        height: 50px;
    }
}
