/**
 * Intelligent Content Expansion Styles
 * Maintains consistency with existing design while enhancing content presentation
 */

/* Enhanced Game Content Sections with Improved Styling */
.game-description,
.game-features,
.how-to-play,
.game-tips,
.game-highlights,
.related-games,
.game-overview,
.gameplay-mechanics,
.advanced-strategies {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-description::before,
.game-features::before,
.how-to-play::before,
.game-tips::before,
.game-highlights::before,
.related-games::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a365d 0%, #4a6fa5 50%, #1a365d 100%);
    border-radius: 12px 12px 0 0;
}

.game-description:hover,
.game-features:hover,
.how-to-play:hover,
.game-tips:hover,
.game-highlights:hover,
.related-games:hover {
    box-shadow: 0 4px 12px var(--primary-light);
    transform: translateY(-2px);
}

/* Section Headings */
.game-description h2,
.game-features h3,
.how-to-play h3,
.game-tips h3,
.game-highlights h3,
.related-games h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-lighter);
    position: relative;
}

.game-description h2::before,
.game-features h3::before,
.how-to-play h3::before,
.game-tips h3::before,
.game-highlights h3::before,
.related-games h3::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 1px;
}

/* Sub-headings */
.how-to-play h4 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

/* Enhanced Content Text with Better Typography */
.game-description p,
.how-to-play p,
.game-overview p,
.gameplay-mechanics p {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #2d3748;
    margin-bottom: 18px;
    text-align: justify;
    hyphens: auto;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.game-description p:first-of-type {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1a365d;
}

.game-description p:last-of-type {
    margin-bottom: 0;
}

/* Enhanced paragraph spacing for better readability */
.game-description p + p,
.how-to-play p + p {
    margin-top: 20px;
}

/* Special styling for introductory paragraphs */
.content-intro {
    font-size: 1.15rem;
    font-weight: 500;
    color: #1a365d;
    border-left: 4px solid #4a6fa5;
    padding-left: 20px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.05) 0%, rgba(26, 54, 93, 0.05) 100%);
    padding: 15px 20px;
    border-radius: 8px;
}

/* Enhanced Lists */
.game-features ul,
.how-to-play ul,
.game-tips ul,
.game-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-features li,
.how-to-play li,
.game-tips li,
.game-highlights li {
    position: relative;
    padding: 12px 0 12px 30px;
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--neutral-dark);
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.game-features li::before,
.game-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 12px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    color: var(--neutral-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.how-to-play li::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 12px;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    color: var(--neutral-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.game-tips li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(26, 54, 93, 0.3);
}

.game-tips li::after {
    content: '💡';
    position: absolute;
    left: 2px;
    top: 12px;
    width: 16px;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    z-index: 1;
    filter: brightness(0) invert(1);
}

.game-features li:hover,
.how-to-play li:hover,
.game-tips li:hover,
.game-highlights li:hover {
    background-color: var(--primary-lighter);
    border-left-color: var(--primary-color);
    padding-left: 35px;
    margin: 0 -10px;
    border-radius: 6px;
}

/* Related Games Section */
.related-games-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.related-game-link {
    display: block;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-lighter), var(--secondary-lighter));
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--secondary-lighter);
}

.related-game-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--neutral-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--primary-light);
}

/* Social Share Section */
.social-share {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, var(--neutral-light), var(--secondary-lighter));
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--secondary-lighter);
}

.social-share h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

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

.share-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    font-size: 14px;
    min-width: 140px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
    color: white;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

.share-btn.facebook {
    background: linear-gradient(135deg, #4267b2, #365899);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 103, 178, 0.3);
}

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

.share-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.share-btn.twitter:hover {
    box-shadow: 0 8px 25px rgba(29, 161, 242, 0.5);
}

.share-btn.facebook:hover {
    box-shadow: 0 8px 25px rgba(66, 103, 178, 0.5);
}

.share-btn.copy {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

.share-btn.copy:hover {
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.5);
}

/* Share Notification */
.share-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-notification.show {
    transform: translateX(0);
}

.share-notification.success {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.share-notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.share-notification.info {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Enhanced Category Content */
.category-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--neutral-dark);
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-lighter), var(--secondary-lighter));
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.category-features {
    margin: 30px 0;
    padding: 25px;
    background-color: var(--neutral-white);
    border-radius: 12px;
    border: 1px solid var(--secondary-lighter);
    box-shadow: 0 2px 8px var(--primary-lighter);
}

.category-features h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.category-features ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
}

.category-features li {
    padding: 15px;
    background: var(--neutral-light);
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.category-features li:hover {
    background: var(--primary-lighter);
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

/* Popular Games Section */
.popular-games {
    margin: 40px 0;
    padding: 25px;
    background: linear-gradient(135deg, var(--neutral-white), var(--neutral-light));
    border-radius: 12px;
    border: 1px solid var(--secondary-lighter);
}

.popular-games h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.popular-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Interactive Elements */
.content-toggle {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.content-toggle::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.content-toggle.collapsed::after {
    transform: translateY(-50%) rotate(-90deg);
}

.content-collapsible {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.content-collapsible.collapsed {
    max-height: 0;
}

/* Progress Indicators */
.content-progress {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 4px;
    height: 20px;
    background: var(--secondary-lighter);
    border-radius: 2px;
    overflow: hidden;
}

.content-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: var(--primary-color);
    border-radius: 2px;
    animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-description,
    .game-features,
    .how-to-play,
    .game-tips,
    .game-highlights,
    .related-games {
        margin: 20px 0;
        padding: 20px;
        border-radius: 8px;
    }
    
    .game-description h2,
    .game-features h3,
    .how-to-play h3,
    .game-tips h3,
    .game-highlights h3,
    .related-games h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .game-description p,
    .how-to-play p {
        font-size: 1rem;
        line-height: 1.6;
        text-align: left;
    }
    
    .game-features li,
    .how-to-play li,
    .game-tips li,
    .game-highlights li {
        padding: 10px 0 10px 25px;
        font-size: 0.95rem;
    }
    
    .related-games-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .share-btn {
        width: 200px;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .share-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        right: 10px;
        transform: translateY(-100%);
        text-align: center;
    }
    
    .share-notification.show {
        transform: translateY(0);
    }
    
    .category-features ul {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .popular-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
}

/* Print Styles */
@media print {
    .social-share,
    .share-buttons,
    .content-toggle::after {
        display: none;
    }
    
    .game-description,
    .game-features,
    .how-to-play,
    .game-tips,
    .game-highlights {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .game-description,
    .game-features,
    .how-to-play,
    .game-tips,
    .game-highlights,
    .related-games {
        border: 2px solid var(--neutral-dark);
    }
    
    .game-features li::before,
    .how-to-play li::before,
    .game-tips li::before,
    .game-highlights li::before {
        border: 1px solid var(--neutral-dark);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .game-description,
    .game-features,
    .how-to-play,
    .game-tips,
    .game-highlights,
    .related-games,
    .related-game-link,
    .share-btn,
    .game-features li,
    .how-to-play li,
    .game-tips li,
    .game-highlights li {
        transition: none;
    }
    
    .content-toggle::after {
        transition: none;
    }
    
    @keyframes progress-pulse {
        0%, 100% { opacity: 0.8; }
    }
}