/**
 * Word Search Puzzle Styles
 */

/* Hero Section */
.word-search-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding: 80px 0 60px;
    text-align: center;
    margin-top: 60px;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Main Container */
.word-search-container {
    padding: 60px 0;
    background: #f8f9fa;
}

.word-search-content {
    max-width: 1400px;
    margin: 0 auto;
}

/* Controls */
.word-search-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.word-search-controls .btn {
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.word-search-controls .btn-primary {
    background: #e74c3c;
    color: white;
}

.word-search-controls .btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.word-search-controls .btn-secondary {
    background: #3498db;
    color: white;
}

.word-search-controls .btn-secondary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.difficulty-info {
    display: flex;
    gap: 10px;
}

.badge {
    background: #2c3e50;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Game Stats */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
}

.stat-item i {
    color: #e74c3c;
    font-size: 1.3rem;
}

.stat-item strong {
    color: #2c3e50;
    font-weight: 700;
}

/* Game Layout */
.word-search-game {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

/* Word List */
.word-list-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.word-list-container h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.word-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.word-item {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 15px;
    background: #ecf0f1;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 1px;
}

.word-item.found {
    background: #27ae60;
    color: white;
    text-decoration: line-through;
    opacity: 0.7;
}

/* Puzzle Grid */
.puzzle-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 4px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    width: fit-content;
    max-width: 100%;
}

.grid-cell {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    background: #ecf0f1;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    color: #2c3e50;
}

.grid-cell:hover {
    background: #d5dbdb;
    transform: scale(1.05);
}

.grid-cell.selected {
    background: #3498db;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

.grid-cell.found {
    background: #27ae60;
    color: white;
    animation: foundAnimation 0.5s ease;
}

@keyframes foundAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Success Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.modal-active {
    opacity: 1;
}

.modal.modal-active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8) translateY(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 50px 40px 40px;
    text-align: center;
    color: white;
}

.trophy-animation {
    margin-bottom: 25px;
}

.trophy-animation i {
    font-size: 5rem;
    color: #ffd700;
    animation: trophyBounce 0.8s ease-in-out;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

@keyframes trophyBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-20px) scale(1.1);
    }
    50% {
        transform: translateY(0) scale(1);
    }
    75% {
        transform: translateY(-10px) scale(1.05);
    }
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-subtitle {
    font-family: 'Montserrat', sans-serif;
    color: #FFFFFF;
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.95;
}

.completion-time {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 15px 25px;
    border-radius: 50px;
    display: inline-flex;
}

.completion-time i {
    font-size: 1.4rem;
}

.completion-time strong {
    font-weight: 700;
    font-size: 1.4rem;
}

/* Modal Social Share Section */
.modal-share-section {
    margin: 30px 0 25px;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.share-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.share-btn:active {
    transform: translateY(-2px);
}

.share-facebook {
    background: #1877f2;
}

.share-facebook:hover {
    background: #0d65d9;
}

.share-twitter {
    background: #1da1f2;
}

.share-twitter:hover {
    background: #0d8bd9;
}

.share-linkedin {
    background: #0077b5;
}

.share-linkedin:hover {
    background: #005885;
}

.share-whatsapp {
    background: #25d366;
}

.share-whatsapp:hover {
    background: #1da851;
}

.share-pinterest {
    background: #e60023;
}

.share-pinterest:hover {
    background: #bd001c;
}

.share-copy {
    background: #6c757d;
}

.share-copy:hover {
    background: #545b62;
}

/* Modal Play Again Button */
.btn-modal-primary {
    background: white;
    color: #27ae60;
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
}

.btn-modal-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

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

/* Modal Product Section */
.modal-product-section {
    margin: 30px 0 25px;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-product-header {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-product-header i {
    font-size: 1.5rem;
    color: #27ae60;
}

.modal-product-header h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.modal-product-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.modal-product-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-product-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 250px;
}

.modal-product-info {
    padding: 10px 0;
}

.modal-product-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.modal-product-description {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.modal-product-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    color: #27ae60;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.modal-product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-product-view,
.btn-product-buy {
    flex: 1;
    min-width: 140px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.btn-product-view {
    background: #34495e;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 73, 94, 0.3);
}

.btn-product-view:hover {
    background: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 73, 94, 0.4);
}

.btn-product-buy {
    background: #ff9900;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.btn-product-buy:hover {
    background: #e68a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

/* How to Play */
.how-to-play {
    background: white;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.how-to-play h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.instruction-item {
    text-align: center;
    padding: 20px;
}

.instruction-item i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 15px;
    display: block;
}

.instruction-item h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.instruction-item p {
    font-family: 'Montserrat', sans-serif;
    color: #7f8c8d;
    line-height: 1.6;
}

/* Benefits Section */
.benefits-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 50px 40px;
    border-radius: 16px;
    color: white;
}

.benefits-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #ffffff;
    text-align: center;
    margin-bottom: 40px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.benefit-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.benefit-card i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 20px;
    display: block;
}

.benefit-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.benefit-card p {
    font-family: 'Montserrat', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .grid-cell {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 992px) {
    .word-search-game {
        grid-template-columns: 1fr;
    }

    .word-list-container {
        position: static;
    }

    .word-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .word-item {
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .grid-cell {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .puzzle-grid {
        gap: 3px;
        padding: 15px;
    }

    .game-stats {
        flex-direction: column;
        gap: 15px;
    }

    .share-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .modal-content {
        max-width: 450px;
    }

    .modal-body {
        padding: 45px 30px 35px;
    }

    .modal-title {
        font-size: 2.3rem;
    }

    .trophy-animation i {
        font-size: 4.5rem;
    }

    .modal-product-section {
        padding: 20px 15px;
    }

    .modal-product-header h4 {
        font-size: 1.3rem;
    }

    .modal-product-title {
        font-size: 1.2rem;
    }

    .modal-product-actions {
        flex-direction: column;
    }

    .btn-product-view,
    .btn-product-buy {
        width: 100%;
    }

    .how-to-play h2,
    .benefits-section h2 {
        font-size: 2rem;
    }

    .success-message h3 {
        font-size: 2rem;
    }

    .success-message i {
        font-size: 3rem;
    }
}

@media (max-width: 576px) {
    .word-search-hero {
        padding: 60px 0 40px;
    }

    .grid-cell {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
        border-radius: 4px;
    }

    .puzzle-grid {
        gap: 2px;
        padding: 10px;
    }

    .word-search-controls {
        flex-direction: column;
    }

    .word-search-controls .btn {
        width: 100%;
        justify-content: center;
    }

    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .share-buttons {
        gap: 10px;
    }

    .share-text {
        font-size: 1rem;
    }

    .modal-content {
        max-width: 95%;
        border-radius: 20px;
    }

    .modal-body {
        padding: 40px 25px 30px;
    }

    .modal-title {
        font-size: 2rem;
    }

    .modal-subtitle {
        font-size: 1rem;
    }

    .trophy-animation i {
        font-size: 4rem;
    }

    .completion-time {
        font-size: 1.1rem;
        padding: 12px 20px;
    }

    .completion-time strong {
        font-size: 1.2rem;
    }

    .btn-modal-primary {
        padding: 12px 30px;
        font-size: 1rem;
        width: 100%;
    }

    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .instructions-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}
