/* pattern-lock.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.game-info {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
}

.screen {
    display: none;
    padding: 30px 20px;
    text-align: center;
}

.screen.active {
    display: block;
}

.pattern-container {
    position: relative;
    margin: 0 auto 30px;
    width: 300px;
    height: 300px;
}

#pattern-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.dot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 40px;
    width: 100%;
    height: 100%;
}

.dot {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    margin: auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dot.active {
    background: #4cd964;
    transform: scale(1.2);
    box-shadow: 0 0 15px #4cd964;
}

.dot.hint {
    background: #ffcc00;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn.primary {
    background: #4cd964;
    color: white;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(1px);
}

.message {
    min-height: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
}

.tutorial-content, .completion-content {
    max-width: 400px;
    margin: 0 auto;
}

.tutorial-step {
    display: flex;
    align-items: center;
    margin: 20px 0;
    text-align: left;
}

.step-number {
    background: #4cd964;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.tutorial-step p {
    font-size: 1.1rem;
}

.completion-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.score-earned {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4cd964;
    margin: 20px 0;
}

footer {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .pattern-container {
        width: 280px;
        height: 280px;
    }
    
    .dot-grid {
        grid-gap: 35px;
    }
    
    .dot {
        width: 25px;
        height: 25px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}