.ggx-main-module .ggx-tech-card {
    background: #0f0f0f;
    border: 1px solid #1f1f1f;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ggx-main-module .ggx-tech-card:hover {
    border-color: rgba(93, 214, 44, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ggx-main-module .ggx-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ggx-main-module .ggx-sidebar-card {
    height: auto;
}

.ggx-main-module .ggx-sidebar-ad {
    min-height: 360px;
    height: clamp(360px, 58vh, 760px);
}

/* Keep LATEST cards controlled by their intended responsive layout classes. */
.ggx-main-module #ggx-news-feed-container > article.ggx-latest-card {
    min-height: 11rem;
    height: auto;
}

.ggx-main-module #ggx-news-feed-container > article.ggx-latest-card .ggx-latest-cover {
    height: 11rem;
}

.ggx-main-module #ggx-news-feed-container > article.ggx-latest-card .ggx-latest-card-body {
    min-height: 11rem;
}

.ggx-main-module .ggx-hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.62) 56%, rgba(0, 0, 0, 0.94) 100%);
}

.ggx-main-module .ggx-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ggx-main-module .ggx-hero-overlay.ggx-hero-overlay-compact {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.68) 52%, rgba(0, 0, 0, 0.96) 100%);
}

.ggx-main-module .ggx-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ggx-main-module .ggx-hero-text-shell {
    width: fit-content;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.72) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}

.ggx-main-module .ggx-hero-text-shell.ggx-hero-text-shell-compact {
    padding: 8px 10px;
}

.ggx-main-module .ggx-hero-title {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ggx-main-module .ggx-hero-title-main {
    font-size: clamp(1.75rem, 2.8vw, 2.45rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    -webkit-line-clamp: 4;
}

.ggx-main-module .ggx-hero-title-compact {
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    line-height: 1.2;
    letter-spacing: -0.005em;
    -webkit-line-clamp: 4;
}

@media (min-width: 768px) {
    .ggx-main-module #ggx-news-feed-container > article.ggx-latest-card {
        flex-direction: row;
        align-items: stretch;
        height: auto;
    }

    .ggx-main-module #ggx-news-feed-container > article.ggx-latest-card .ggx-latest-cover {
        height: auto;
    }
}

@media (max-width: 1023px) {
    .ggx-main-module .ggx-sidebar-ad {
        min-height: 260px;
        height: 260px;
    }
}

@media (max-width: 767px) {
    .ggx-main-module #ggx-hero-grid-container .ggx-hero-card-main {
        min-height: 340px;
    }

    .ggx-main-module #ggx-hero-grid-container .ggx-hero-card-compact {
        min-height: 230px;
    }

    .ggx-main-module #ggx-hero-grid-container .ggx-hero-overlay {
        padding: 14px;
    }

    .ggx-main-module #ggx-hero-grid-container .ggx-hero-text-shell {
        width: 100%;
        padding: 8px 10px;
        border-radius: 10px;
    }

    .ggx-main-module #ggx-hero-grid-container .ggx-hero-title-main {
        font-size: clamp(1.5rem, 7.2vw, 2rem);
        -webkit-line-clamp: 4;
    }

    .ggx-main-module #ggx-hero-grid-container .ggx-hero-title-compact {
        font-size: clamp(1.2rem, 5.6vw, 1.5rem);
        -webkit-line-clamp: 3;
    }
}

.ggx-main-module .line-clamp-1,
.ggx-main-module .line-clamp-2,
.ggx-main-module .line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ggx-main-module .line-clamp-1 {
    -webkit-line-clamp: 1;
}

.ggx-main-module .line-clamp-2 {
    -webkit-line-clamp: 2;
}

.ggx-main-module .line-clamp-3 {
    -webkit-line-clamp: 3;
}

.ggx-main-module img[src=''],
.ggx-main-module img:not([src]) {
    display: none;
}

.ggx-main-module #ggx-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.ggx-main-module .ggx-toast {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #333;
    border-left: 3px solid #5dd62c;
    color: #fff;
    padding: 12px 24px;
    margin-bottom: 10px;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: auto;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.ggx-main-module .ggx-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.ggx-main-module .ggx-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.ggx-main-module .ggx-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.ggx-main-module .ggx-poster-preview-card {
    transform: scale(0.95);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.ggx-main-module .ggx-modal-overlay.active .ggx-poster-preview-card {
    transform: scale(1);
}

.ggx-main-module .typing::after {
    content: '|';
    display: inline-block;
    vertical-align: bottom;
    animation: ggx-blink 1s step-start infinite;
    color: #5dd62c;
    margin-left: 2px;
    opacity: 0.8;
}

@keyframes ggx-blink {
    50% {
        opacity: 0;
    }
}

.ggx-main-module .thinking-circle {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #5dd62c;
    border-radius: 50%;
    animation: ggx-thinking-pulse 1s infinite ease-in-out;
    margin-left: 2px;
}

@keyframes ggx-thinking-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 8px #5dd62c;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.ggx-main-module .ggx-poster-bg {
    background-color: #030303;
    background-image: radial-gradient(circle at 100% 0%, rgba(93, 214, 44, 0.08) 0%, transparent 40%),
        linear-gradient(135deg, rgba(15, 15, 15, 1) 0%, rgba(5, 5, 5, 1) 100%);
}
