/* ======================================
   MODERN LAYOUT - scoped to .ytpg-style-modern
   ====================================== */

.ytpg-style-modern {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ytpg-style-modern .ytpg-grid {
    display: grid;
    grid-template-columns: repeat(var(--ytpg-cols, 3), 1fr);
    gap: 25px;
    margin-top: 20px;
}

.ytpg-style-modern .ytpg-video-card {
    position: relative;
    height: 440px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ytpg-style-modern .ytpg-video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.ytpg-style-modern .ytpg-card-background {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: contain;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #000;
    transition: transform 0.6s ease;
}

.ytpg-style-modern .ytpg-video-card:hover .ytpg-card-background {
    transform: scale(1.05);
}

.ytpg-style-modern .ytpg-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.1) 0%,
        rgba(0,0,0,0.3) 30%,
        rgba(0,0,0,0.6) 60%,
        rgba(0,0,0,0.95) 100%
    );
    transition: background 0.4s ease;
}

.ytpg-style-modern .ytpg-video-card:hover .ytpg-overlay {
    background: linear-gradient(to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0) 55%,
        rgba(200,0,0,0.92) 100%);
}

.ytpg-style-modern .ytpg-content {
    position: relative;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    color: #fff;
    z-index: 2;
}

.ytpg-style-modern .ytpg-play-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,0,0,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    box-shadow: 0 4px 15px rgba(255,0,0,0.4);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ytpg-style-modern .ytpg-play-icon svg {
    width: 26px;
    height: 26px;
    margin-left: 3px;
}

.ytpg-style-modern .ytpg-video-card:hover .ytpg-play-icon {
    transform: scale(1.15);
    box-shadow: 0 6px 25px rgba(255,0,0,0.6);
}

.ytpg-style-modern .ytpg-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-bottom: 4px;
}

.ytpg-style-modern .ytpg-title {
    font-size: 19px;
    font-weight: 700;
    color: #fff !important;
    line-height: 1.3;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.ytpg-style-modern .ytpg-video-card:hover .ytpg-title {
    color: #ffd0d0 !important;
}

.ytpg-style-modern .ytpg-description {
    font-size: 13px;
    color: rgba(255,255,255,0.85) !important;
    line-height: 1.5;
    margin: 0 !important;
    padding: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    opacity: 0.85;
    transform: translateY(8px);
    transition: all 0.3s ease;
}

.ytpg-style-modern .ytpg-video-card:hover .ytpg-description {
    opacity: 1;
    transform: translateY(0);
}

.ytpg-style-modern .ytpg-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ff0000;
    color: #fff !important;
    padding: 12px 24px;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(255,0,0,0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ytpg-style-modern .ytpg-watch-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.ytpg-style-modern .ytpg-watch-btn:hover {
    background: #222;
    transform: translateX(5px);
    color: #fff !important;
}

.ytpg-style-modern .ytpg-watch-btn:hover svg {
    transform: translateX(4px);
}

/* Responsive - tablet */
@media (max-width: 1024px) {
    .ytpg-style-modern .ytpg-video-card { height: 400px; }
    .ytpg-style-modern .ytpg-content { padding: 18px; }
}

/* Responsive - mobile */
@media (max-width: 640px) {
    .ytpg-style-modern { padding: 20px 12px; }
    .ytpg-style-modern .ytpg-grid { --ytpg-cols: 1; gap: 18px; }
    .ytpg-style-modern .ytpg-video-card { height: 380px; }
    .ytpg-style-modern .ytpg-content { padding: 16px; }
    .ytpg-style-modern .ytpg-title { font-size: 17px; }
}

/* Error messages (not layout-specific) */
.ytpg-error,
.zamkai_ytpg-error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px;
    margin: 20px 0;
    color: #c62828;
    border-radius: 4px;
}

.ytpg-style-modern .ytpg-views {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65) !important;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: 0.3px;
}
