/*
Theme Name: MollyBook
Theme URI: https://mollybook4paws.com
Author: Jorge
Description: The official social network for certified good girls. A dog-themed family blog theme.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: mollybook
*/

:root {
    --pink: #ff69b4;
    --pink-light: #ffe6f2;
    --pink-dark: #d63384;
    --dark: #1a1a2e;
    --dark2: #16213e;
    --dark3: #0f3460;
    --gold: #ffd700;
    --white: #ffffff;
    --gray: #f8f8f8;
    --shadow: 0 8px 32px rgba(255,105,180,0.18);
    --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito', sans-serif;
    background: #fdf0f7;
    color: #222;
    min-height: 100vh;
    transition: background 0.4s, color 0.4s;
}

body.dark { background: var(--dark); color: #eee; }
body.dark .card, body.dark .sidebar-box { background: var(--dark2); border-color: #444; }
body.dark .navbar { background: #0a0a1a; }
body.dark .notification-bar { background: #2a1a2e; border-color: #555; }
body.dark .feed-item { border-color: #333; }
body.dark .comment-body { background: var(--dark2); border-color: #444; }
body.dark .form-group input,
body.dark .form-group textarea { background: var(--dark3); border-color: #444; color: #eee; }

/* NAVBAR */
.navbar {
    background: linear-gradient(90deg, #1a1a2e 0%, #d63384 50%, #1a1a2e 100%);
    background-size: 200% 100%;
    animation: navSlide 4s linear infinite;
    color: white;
    padding: 0 30px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(214,51,132,0.4);
}

@keyframes navSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.nav-logo {
    font-family: 'Pacifico', cursive;
    font-size: 26px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}
.nav-logo a { color: inherit; text-decoration: none; }
.nav-logo span { color: var(--gold); }

.nav-right { display: flex; align-items: center; gap: 15px; }

.visitor-badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
}

.btn {
    background: var(--pink);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 3px 12px rgba(255,105,180,0.4);
    text-decoration: none;
    display: inline-block;
}
.btn:hover { background: var(--pink-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,105,180,0.5); color: white; }
.btn-dark { background: #333; }
.btn-gold { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #222; }
.btn-gold:hover { color: #222; }

/* NOTIFICATION BAR */
.notification-bar {
    background: var(--pink-light);
    border-bottom: 2px solid var(--pink);
    padding: 10px 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
}

.notif-badge {
    background: var(--pink);
    color: white;
    border-radius: 50px;
    padding: 2px 10px;
    font-size: 12px;
    white-space: nowrap;
}

.notif-scroll { overflow: hidden; flex: 1; }

.notif-text {
    display: inline-block;
    animation: scrollText 25s linear infinite;
    white-space: nowrap;
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* LAYOUT */
.layout {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    gap: 24px;
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}

@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

/* SIDEBAR */
.sidebar-box {
    background: white;
    border: 2px solid #eee;
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.sidebar-box h3 {
    font-family: 'Pacifico', cursive;
    font-size: 16px;
    color: var(--pink-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px dashed var(--pink-light);
}

.sidebar-box ul { list-style: none; }
.sidebar-box ul li {
    padding: 6px 0;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sidebar-box ul li a { color: inherit; text-decoration: none; }
.sidebar-box ul li a:hover { color: var(--pink-dark); }

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--pink);
    object-fit: cover;
    display: block;
    margin: 0 auto 12px;
    box-shadow: 0 4px 16px rgba(255,105,180,0.3);
}

.profile-name {
    text-align: center;
    font-family: 'Pacifico', cursive;
    font-size: 18px;
    color: var(--pink-dark);
}

.profile-status { text-align: center; font-size: 13px; color: #888; margin-top: 4px; }

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    margin-right: 4px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 14px;
    text-align: center;
}

.stat-num { font-size: 20px; font-weight: 800; color: var(--pink-dark); }
.stat-label { font-size: 11px; color: #888; }

/* MAIN FEED / CARDS */
.card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.card:hover { transform: translateY(-3px); }

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.card-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pink);
}

.card-meta h4 { font-size: 15px; font-weight: 800; }
.card-meta span { font-size: 12px; color: #999; }

.verified-badge {
    display: inline-block;
    background: var(--pink);
    color: white;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 50px;
    margin-left: 6px;
    font-weight: 700;
}

.card h2 {
    font-family: 'Pacifico', cursive;
    font-size: 20px;
    color: var(--pink-dark);
    margin-bottom: 10px;
}
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { text-decoration: underline; }

/* POST CONTENT (real WordPress content) */
.post-content { font-size: 15px; line-height: 1.7; }
.post-content p { margin-bottom: 14px; }
.post-content img,
.post-content .wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 10px 0;
    box-shadow: 0 4px 16px rgba(255,105,180,0.2);
}
.post-content a { color: var(--pink-dark); font-weight: 700; }
.post-content h1, .post-content h2, .post-content h3 {
    font-family: 'Pacifico', cursive;
    color: var(--pink-dark);
    margin: 16px 0 10px;
}
.post-content ul, .post-content ol { margin: 0 0 14px 22px; }
.post-content blockquote {
    border-left: 4px solid var(--pink);
    background: var(--pink-light);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 14px 0;
    font-style: italic;
}
body.dark .post-content blockquote { background: #2a1a2e; }

.post-featured {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
}

.reaction-bar { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.react-btn {
    background: var(--pink-light);
    color: var(--pink-dark);
    border: 2px solid var(--pink);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.react-btn:hover, .react-btn.active {
    background: var(--pink);
    color: white;
    transform: scale(1.08);
}

/* HERO */
.hero { text-align: center; padding: 30px 20px 10px; }

.hero-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid var(--pink);
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(255,105,180,0.4);
    animation: floatAvatar 3s ease-in-out infinite;
}

@keyframes floatAvatar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero h1 {
    font-family: 'Pacifico', cursive;
    font-size: 38px;
    color: var(--pink-dark);
    margin-top: 16px;
    text-shadow: 2px 2px 0px var(--pink-light);
}

.hero p { font-size: 16px; color: #777; margin-top: 6px; }

.mood-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--pink), var(--pink-dark));
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 12px;
    box-shadow: 0 4px 14px rgba(255,105,180,0.4);
}

/* PHOTO GALLERY */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(214,51,132,0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 10px;
    color: white;
    font-weight: 700;
    font-size: 13px;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 16px;
    border: 4px solid var(--pink);
    box-shadow: 0 0 60px rgba(255,105,180,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    font-weight: bold;
}
.lightbox-nav { display: flex; gap: 20px; margin-top: 20px; }

/* SEARCH */
.search-bar { display: flex; gap: 10px; margin: 16px 0; }
.search-bar input[type="search"], .search-bar input[type="text"] {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid var(--pink);
    border-radius: 50px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    outline: none;
    background: var(--gray);
}
.search-bar input:focus { box-shadow: 0 0 0 3px rgba(255,105,180,0.2); }

/* FEED ITEMS */
.feed-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.feed-icon { font-size: 20px; }

/* FORMS */
.form-group { margin-bottom: 14px; }
.form-group label { font-weight: 700; font-size: 14px; display: block; margin-bottom: 4px; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--pink); }

/* FRIENDS */
.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}
.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--pink-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}
.friend-info { flex: 1; }
.friend-name { font-weight: 700; font-size: 14px; }
.friend-title { font-size: 12px; color: #999; }

/* PARKS */
.park-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}
.park-rating { color: var(--gold); font-size: 14px; }

/* PREMIUM */
.premium-card {
    background: linear-gradient(135deg, #1a1a2e, #d63384);
    color: white;
    border: none;
}
.premium-card h2 { color: var(--gold); }
.premium-card p { color: rgba(255,255,255,0.85); }
.premium-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 14px;
    margin: 8px 0;
    font-size: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* COMMENTS (real WordPress comments) */
.comments-area { margin-top: 4px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ul.children { list-style: none; margin-left: 28px; padding: 0; }
.comment-body {
    background: var(--gray);
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-author img { border-radius: 50%; border: 2px solid var(--pink); }
.comment-author .fn { font-weight: 800; font-size: 14px; font-style: normal; }
.comment-metadata { font-size: 12px; color: #999; margin-bottom: 8px; }
.comment-metadata a { color: #999; text-decoration: none; }
.comment-content { font-size: 14px; line-height: 1.6; }
.comment-content p { margin-bottom: 8px; }
.reply a {
    font-size: 12px;
    font-weight: 700;
    color: var(--pink-dark);
    text-decoration: none;
    background: var(--pink-light);
    padding: 4px 12px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 6px;
}
.reply a:hover { background: var(--pink); color: white; }

.comment-respond { margin-top: 20px; }
.comment-reply-title {
    font-family: 'Pacifico', cursive;
    font-size: 18px;
    color: var(--pink-dark);
    margin-bottom: 12px;
}
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    outline: none;
    min-height: 100px;
    resize: vertical;
}
.comment-form textarea:focus { border-color: var(--pink); }
.comment-form .submit {
    background: var(--pink);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    margin-top: 10px;
    box-shadow: 0 3px 12px rgba(255,105,180,0.4);
}
.comment-form .submit:hover { background: var(--pink-dark); }
.comment-notes, .logged-in-as { font-size: 13px; color: #888; margin-bottom: 10px; }
.comment-notes a, .logged-in-as a { color: var(--pink-dark); font-weight: 700; }
.no-comments { color: #888; font-size: 14px; font-style: italic; }

/* PAGINATION */
.pagination { display: flex; gap: 8px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.pagination .page-numbers {
    background: white;
    border: 2px solid var(--pink);
    color: var(--pink-dark);
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--pink); color: white; }
body.dark .pagination .page-numbers { background: var(--dark2); }

/* CHAT */
#messenger-panel {
    position: fixed;
    bottom: 0;
    right: -280px;
    width: 270px;
    height: 340px;
    background: white;
    border: 2px solid var(--pink);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(255,105,180,0.2);
    padding: 0;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 998;
    overflow: hidden;
}
body.dark #messenger-panel { background: var(--dark2); }

.chat-header {
    background: linear-gradient(135deg, var(--pink-dark), var(--pink));
    color: white;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#chat-log { height: 210px; overflow-y: auto; padding: 12px; font-size: 13px; }

.msg-user { text-align: right; margin: 6px 0; }
.msg-user span {
    background: var(--pink);
    color: white;
    padding: 6px 12px;
    border-radius: 14px 14px 0 14px;
    display: inline-block;
    max-width: 80%;
}

.msg-molly { text-align: left; margin: 6px 0; }
.msg-molly span {
    background: #f0f0f0;
    color: #333;
    padding: 6px 12px;
    border-radius: 14px 14px 14px 0;
    display: inline-block;
    max-width: 80%;
}

#chat-input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-top: 2px solid var(--pink-light);
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    outline: none;
}

/* FLOATING BUTTONS */
.fab-group {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    z-index: 997;
}

.fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: all 0.2s;
}
.fab:hover { transform: scale(1.1); }
.fab-chat { background: var(--pink); color: white; }
.fab-help { background: var(--gold); color: #222; }
.fab-top { background: #333; color: white; font-size: 16px; }

/* TRENDING TAGS */
.tag {
    display: inline-block;
    background: var(--pink-light);
    color: var(--pink-dark);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin: 3px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--pink);
    text-decoration: none;
}
.tag:hover { background: var(--pink); color: white; }

/* TOAST */
.toast {
    position: fixed;
    top: 80px;
    right: -350px;
    background: white;
    border: 2px solid var(--pink);
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: var(--shadow);
    z-index: 9000;
    transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
    max-width: 300px;
    font-size: 14px;
    font-weight: 600;
}
.toast.show { right: 20px; }
.toast-title { font-weight: 800; color: var(--pink-dark); margin-bottom: 4px; font-size: 15px; }
body.dark .toast { background: var(--dark2); color: #eee; }

/* SECTION DIVIDER */
.section-divider {
    text-align: center;
    font-family: 'Pacifico', cursive;
    font-size: 22px;
    color: var(--pink-dark);
    margin: 10px 0 20px;
    position: relative;
}
.section-divider::before, .section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 28%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--pink));
}
.section-divider::before { left: 0; }
.section-divider::after { right: 0; background: linear-gradient(to left, transparent, var(--pink)); }

/* PAW CURSOR TRAIL */
.paw-trail {
    position: fixed;
    pointer-events: none;
    font-size: 18px;
    z-index: 9999;
    animation: fadeOut 1s forwards;
}
@keyframes fadeOut {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.3) rotate(30deg); }
}

/* ZOOMIES MODE */
@keyframes zoomiesFlash {
    0%, 100% { background: #fdf0f7; }
    25% { background: #ffe6f2; }
    50% { background: #fff0e6; }
    75% { background: #e6f0ff; }
}
body.zoomies { animation: zoomiesFlash 0.3s infinite; }

/* ACCESSIBILITY */
:focus-visible { outline: 3px solid var(--pink-dark); outline-offset: 2px; }
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
