@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Inter:wght@400;600&display=swap');

#ytc-popup {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 300px;
    background: #ffffff;
    border: 2px solid #667eea;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.18);
    padding: 16px;
    z-index: 999999;
    font-family: 'Inter', sans-serif;
}

#ytc-popup-close {
    float: right;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    color: #888;
    padding: 0;
    transition: color 0.2s;
}
#ytc-popup-close:hover { color: #333; }

#ytc-popup-clear { clear: both; }

#ytc-popup-heading {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: #667eea;
    margin: 4px 0 14px;
    letter-spacing: 0.5px;
}

#ytc-popup-inner {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.4s ease;
}

/* Avatar */
.ytc-popup-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
    display: block;
    margin: 0 auto;
}

/* User name */
.ytc-popup-name {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: #1a1a2e;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: block;
}
a.ytc-popup-name:hover { color: #667eea; }

/* Follow button wrapper */
.ytc-popup-follow { text-align: center; }

/* Post thumbnail */
.ytc-popup-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

/* No-image gradient card */
.ytc-popup-no-thumb {
    width: 100%;
    height: 140px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytc-popup-film-icon {
    width: 56px;
    height: 56px;
    fill: rgba(255,255,255,0.9);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

/* Post title link */
.ytc-popup-post-title {
    display: block;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #1a1a2e;
    text-decoration: none;
    padding: 0 4px;
    transition: color 0.2s;
}
.ytc-popup-post-title:hover { color: #667eea; }

/* ── Dark mode ── */
body.dark-mode #ytc-popup {
    background: #1a1a2e;
    border-color: #667eea;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
body.dark-mode #ytc-popup-close { color: #aaa; }
body.dark-mode #ytc-popup-close:hover { color: #fff; }
body.dark-mode #ytc-popup-heading { color: #a78bfa; }
body.dark-mode .ytc-popup-name { color: #f0f0f0; }
body.dark-mode .ytc-popup-post-title { color: #e0e0e0; }
body.dark-mode .ytc-popup-post-title:hover { color: #a78bfa; }
body.dark-mode .ytc-popup-avatar { border-color: #a78bfa; }

/* Nav arrows */
#ytc-popup-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

#ytc-popup-prev,
#ytc-popup-next {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: none;
    color: #667eea;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}

#ytc-popup-prev:hover,
#ytc-popup-next:hover {
    background: #667eea;
    color: #fff;
}

body.dark-mode #ytc-popup-prev,
body.dark-mode #ytc-popup-next {
    border-color: #a78bfa;
    color: #a78bfa;
}

body.dark-mode #ytc-popup-prev:hover,
body.dark-mode #ytc-popup-next:hover {
    background: #a78bfa;
    color: #1a1a2e;
}
