/* Memory Match Game - Complete Styling */

/* Game Controls */
.game-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-wrap: wrap;
}

.theme-selector, .difficulty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-selector label, .difficulty-selector label {
    font-weight: 600;
    color: #1f2937;
}

.theme-selector select, .difficulty-selector select {
    padding: 8px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: white;
}

.new-game-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.new-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Game Stats */
.game-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0 30px;
}

.stat-box {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-width: 120px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #10b981;
}

/* Game Board */
.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    perspective: 1000px;
}

/* Memory Card */
.memory-card {
    aspect-ratio: 1;
    cursor: pointer;
    position: relative;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.memory-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.memory-card.matched .card-inner {
    transform: rotateY(180deg);
    opacity: 0.6;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-back {
    background: white;
    transform: rotateY(180deg);
    border: 3px solid #e5e7eb;
}

.memory-card:hover:not(.flipped):not(.matched) .card-front {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Win Modal */
.win-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.win-modal.show {
    display: flex;
}

.win-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.win-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.win-content h2 {
    font-size: 32px;
    color: #1f2937;
    margin-bottom: 10px;
}

.win-message {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 30px;
}

.win-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
}

.win-stat {
    text-align: center;
}

.win-label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 5px;
}

.win-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #10b981;
}

.play-again-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.play-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Info & Features Boxes */
.info-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 5px solid #10b981;
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
}

.info-box h4 {
    color: #065f46;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.info-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    line-height: 1.7;
    font-size: 14px;
    color: #555;
    border: 2px solid rgba(16, 185, 129, 0.2);
}

.info-item strong {
    color: #065f46;
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

/* Features Box */
.features-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid rgba(245, 158, 11, 0.2);
    margin-top: 30px;
}

.features-box h4 {
    color: #92400e;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.features-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-box li {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    color: #78350f;
    font-size: 14px;
    line-height: 1.6;
    border: 2px solid rgba(245, 158, 11, 0.1);
}

.features-box li:last-child {
    margin-bottom: 0;
}

.features-box li strong {
    color: #92400e;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-box {
        padding: 15px 20px;
    }
    
    .game-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 0 10px;
    }
    
    .card-front, .card-back {
        font-size: 40px;
    }
    
    .win-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .win-icon {
        font-size: 60px;
    }
    
    .win-content h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .game-board {
        gap: 8px;
    }
    
    .card-front, .card-back {
        font-size: 32px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .win-stats {
        flex-direction: column;
        gap: 15px;
    }
}

/* SEO Content Section */
.seo-content {
    padding: 80px 20px;
    background: white;
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-article h2 {
    font-size: 32px;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #333;
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #444;
}

.content-article p {
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.content-article strong {
    color: #333;
    font-weight: 700;
}

/* Related Tools Section */
.related-tools {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
}

.related-tools h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    color: #10b981;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #10b981;
}

.related-tool-card .tool-icon {
    font-size: 42px;
}

.related-tool-card .tool-name {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}