/* =========================================
   PET SPACE - THE PLAYGROUND CSS
   ========================================= */

:root {
    --pet-gold: #FFB347;
    --pet-blue: #A2D2FF;
    --bg-cream: #FFFDF5;
    --card-white: #FFFFFF;
    --text-dark: #4A4A4A;
    --border-light: #F0F0F0;
}

body {
    background-color: var(--bg-cream);
    font-family: 'Quicksand', sans-serif;
}

.feed-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--card-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- Composer --- */
.composer-top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background: var(--pet-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.composer-trigger {
    background: #F7F7F7;
    flex-grow: 1;
    padding: 12px 20px;
    border-radius: 50px;
    color: #999;
    cursor: pointer;
    font-weight: 500;
}

/* --- Post Feed --- */
.post-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.post-author {
    font-weight: 700;
    color: var(--text-dark);
}

.post-date {
    font-size: 0.75rem;
    color: #AAA;
}

.post-img {
    width: 100%;
    max-height: 500px; /* Prevent portrait photos from taking too much space */
    object-fit: cover;
    border-radius: 12px;
    margin-top: 15px;
    display: block;
}

.reaction-container {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

.reaction-container button {
    all: unset;
    cursor: pointer;
    font-size: 0.9rem;
    color: #888;
    display: flex;
    gap: 5px;
}

/* --- Modal --- */
.modal-overlay {
    background: rgba(255, 253, 245, 0.9);
    backdrop-filter: blur(5px);
    display: none;
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2000;
    justify-content: center; 
    align-items: center;
}

.modal-card {
    width: 100%;
    max-width: 500px;
    position: relative;
    padding-top: 2rem;
}

.modal-header {
    display: flex;
    justify-content: center; 
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.2rem;
    color: var(--pet-gold);
    margin: 0;
}

/* --- Fixed Top-Right Close Button --- */
.close-x {
    all: unset;
    cursor: pointer;
    font-size: 2.2rem;
    color: #CCC;
    line-height: 1;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.2s;
    z-index: 10;
}

.close-x:hover {
    color: var(--pet-gold);
}

/* --- Image Preview logic --- */
#imagePreviewContainer {
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    max-height: 300px;
    background: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
}

#imagePreview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* --- Forms & Inputs --- */
#postTextarea {
    width: 100%;
    height: 120px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    resize: none;
    font-family: inherit;
}

.submit-post-btn {
    all: unset;
    cursor: pointer;
    display: block;
    width: 100%;
    background: var(--pet-gold) !important;
    color: white !important;
    border-radius: 50px !important;
    font-weight: 700;
    padding: 15px;
    text-align: center;
    box-sizing: border-box;
    transition: 0.3s;
}

.submit-post-btn:hover { background: #ff9d1c !important; transform: translateY(-2px); }

.add-photo-btn {
    all: unset;
    cursor: pointer;
    background: var(--pet-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
}

.discard-btn {
    position: absolute; top: 10px; right: 10px;
    background: rgba(0,0,0,0.6); color: white;
    border: none; padding: 5px 12px; border-radius: 20px;
    cursor: pointer; font-size: 0.75rem;
}