/**
 * TCG page styles (hub, search, card detail, events, how to play, deckbuilder)
 * All selectors scoped under .tcg-page. Uses var(--tcg-color) and shared layout from tcg-common.css.
 */

/* Base reset and body – loaded after tcg-common */
.tcg-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #121212;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    background-image: url('../images/pokemon-B.png');
    background-position: center center;
    background-size: contain;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.tcg-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(245, 245, 245, 0.95) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Hub page */
.tcg-page .hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tcg-page .hub-card {
    background: rgba(255, 255, 255, 0.94);
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    padding: 40px 0px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tcg-page .hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--tcg-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tcg-page .hub-card:hover {
    transform: translateY(-10px);
    border-color: var(--tcg-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: #fff;
}

.tcg-page .hub-card:hover::before {
    transform: scaleX(1);
}

.tcg-page .hub-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.3s ease;
}

.tcg-page .hub-icon-image {
    display: block;
    margin: 0 auto;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tcg-page .hub-card:hover .hub-icon,
.tcg-page .hub-card:hover .hub-icon-image {
    transform: scale(1.2) rotate(5deg);
}

.tcg-page .hub-title {
    font-size: 1.8rem;
    font-weight: normal;
    margin-bottom: 15px;
    color: var(--tcg-color);
    transition: color 0.3s ease;
}

.tcg-page .hub-card:hover .hub-title {
    color: #fff;
    text-shadow: 0 0 15px var(--tcg-color);
}

.tcg-page .hub-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.tcg-page .hub-link {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    background: var(--tcg-color);
    color: #121212;
    font-weight: normal;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.tcg-page .hub-link:hover {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .tcg-page .header h1 {
        font-size: 2rem;
    }
    .tcg-page .hub-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .tcg-page .hub-card {
        padding: 30px 20px;
    }
}

/* Events page */
.tcg-page .container.tcg-events-container { max-width: 1000px; }
.tcg-page .content {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 60px 40px;
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.tcg-page .content h2 {
    color: var(--tcg-color);
    font-size: 2rem;
    margin-bottom: 20px;
}
.tcg-page .content p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 30px;
}
.tcg-page .coming-soon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* How to play page */
.tcg-page .container.tcg-howto-container { max-width: 1000px; }
.tcg-page .container.tcg-howto-container .content { padding: 40px; }
.tcg-page .article_body_content p { margin-bottom: 20px !important; line-height: 1.8; }
.tcg-page .article_body_content h2 { margin-top: 40px !important; margin-bottom: 25px !important; color: var(--tcg-color); }
.tcg-page .article_body_content h3 { margin-top: 35px !important; margin-bottom: 20px !important; }
.tcg-page .article_body_content img { max-width: 100% !important; height: auto !important; display: block; margin: 20px auto; }
.tcg-page .article_body_content ul { margin: 20px 0; padding-left: 40px; }
.tcg-page .article_body_content li { margin-bottom: 10px; }
.tcg-page .article_body_content .dib-post-content { max-width: 100%; }
.tcg-page .article_body_content .dib-post-content h2 { color: var(--tcg-color); margin-top: 40px; margin-bottom: 20px; }
.tcg-page .article_body_content .dib-post-content h3 { color: var(--tcg-color); margin-top: 30px; margin-bottom: 15px; }
.tcg-page .article_body_content .dib-post-content img { max-width: 100%; height: auto; display: block; margin: 20px auto; border-radius: 8px; }
.tcg-page .article_body_content .dib-post-content a { color: var(--tcg-color); text-decoration: underline; }
.tcg-page .article_body_content .dib-post-content a:hover { text-decoration: none; }
@media (max-width: 768px) {
    .tcg-page .article_body_content img { max-width: 100%; }
    .tcg-page .article_body_content .dib-post-content img { max-width: 100%; }
}
