style.css
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial Rounded MT Bold', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#score-display {
    font-size: 1.4em;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 25px;
    background: #f7fafc;
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-block;
    border: 2px solid #e2e8f0;
}

#game-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 25px 0;
}

/* Difficulty buttons container */
.difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Button styling */
button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    display: block;
    width: 100%;
    height: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Different colors for difficulty buttons */
button:nth-child(1) {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

button:nth-child(2) {
    background: linear-gradient(135deg, #FF9800 0%, #e68900 100%);
}

button:nth-child(3) {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
}

/* Color blocks styling */
.color-block {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.color-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.color-block:active {
    transform: scale(0.95);
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #game-container {
        gap: 8px;
    }
    
    .color-block {
        border-radius: 8px;
    }
    
    .difficulty-buttons {
        gap: 10px;
    }
    
    button {
        padding: 10px 20px;
        flex: 1;
        min-width: 100px;
    }
    
    button a {
        font-size: 1em;
    }
}

@media (max-width: 400px) {
    .difficulty-buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}

/* Animation for correct matches */
@keyframes correctMatch {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.correct {
    animation: correctMatch 0.5s ease;
    border-color: #4CAF50 !important;
}

/* Animation for wrong matches */
@keyframes wrongMatch {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.wrong {
    animation: wrongMatch 0.5s ease;
    border-color: #f44336 !important;
}

/* Game instructions */
.instructions {
    color: #666;
    margin-top: 15px;
    font-size: 0.9em;
    line-height: 1.4;
}
/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial Rounded MT Bold', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#score-display {
    font-size: 1.4em;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 25px;
    background: #f7fafc;
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-block;
    border: 2px solid #e2e8f0;
}

/* Game info section */
.game-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.game-info p {
    font-size: 1.1em;
    font-weight: bold;
    color: #495057;
    margin: 0;
    padding: 8px 15px;
    background: white;
    border-radius: 25px;
    border: 2px solid #dee2e6;
}

/* Difficulty indicator */
.difficulty-indicator {
    margin-bottom: 15px;
}

.difficulty-badge {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.difficulty-badge.medium {
    background: linear-gradient(135deg, #FF9800 0%, #e68900 100%);
}

.difficulty-badge.hard {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
}

/* Grid layouts */
#game-container {
    display: grid;
    gap: 12px;
    margin: 25px 0;
}

.easy-grid {
    grid-template-columns: repeat(4, 1fr);
}

.medium-grid {
    grid-template-columns: repeat(6, 1fr);
}

.hard-grid {
    grid-template-columns: repeat(6, 1fr);
}

/* Controls section */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.controls button {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

#hint-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

#shuffle-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d9c 100%);
}

/* Difficulty buttons container */
.difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Button styling */
button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    display: block;
    width: 100%;
    height: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Different colors for difficulty buttons */
button:nth-child(1) {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

button:nth-child(2) {
    background: linear-gradient(135deg, #FF9800 0%, #e68900 100%);
}

button:nth-child(3) {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
}

/* Active difficulty button */
.difficulty-buttons button.active {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border: 2px solid white;
}

/* Color blocks styling */
.color-block {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.color-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.color-block:active {
    transform: scale(0.95);
}

/* Hidden state for cards */
.color-block.hidden {
    background: linear-gradient(135deg, #2D3748 0%, #4A5568 100%) !important;
    border-color: #1A202C;
}

.color-block.matched {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .medium-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .hard-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    #game-container {
        gap: 8px;
    }
    
    .color-block {
        border-radius: 8px;
    }
    
    .difficulty-buttons, .controls {
        gap: 10px;
    }
    
    button {
        padding: 10px 20px;
        flex: 1;
        min-width: 100px;
    }
    
    button a {
        font-size: 1em;
    }
    
    .game-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .controls button {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .medium-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .hard-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .game-info p {
        font-size: 1em;
        padding: 6px 12px;
    }
}

@media (max-width: 400px) {
    .difficulty-buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}

/* Animation for correct matches */
@keyframes correctMatch {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.correct {
    animation: correctMatch 0.5s ease;
    border-color: #4CAF50 !important;
}

/* Animation for wrong matches */
@keyframes wrongMatch {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.wrong {
    animation: wrongMatch 0.5s ease;
    border-color: #f44336 !important;
}

/* Enhanced animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease;
}

@keyframes timeWarning {
    0% { background-color: inherit; }
    50% { background-color: #fff3cd; }
    100% { background-color: inherit; }
}

.time-warning {
    animation: timeWarning 1s infinite;
}

@keyframes lifeLost {
    0% { background-color: inherit; }
    50% { background-color: #f8d7da; }
    100% { background-color: inherit; }
}

.life-lost {
    animation: lifeLost 0.5s ease;
}

/* Game over modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal h2 {
    color: #333;
    margin-bottom: 15px;
}

.modal p {
    margin: 10px 0;
    color: #666;
}

.modal button {
    margin-top: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Instructions */
.instructions {
    color: #666;
    margin-top: 15px;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Smaller color blocks for hard level */
.hard-grid .color-block {
    aspect-ratio: 1;
    border-radius: 8px;
}