/* =========================================
   Izziekitty's Saloon - Forum Styles
   ========================================= */

body, html { 
    background-color: #ff9f43; 
}

#bg-container {
    width: 100vw; 
    min-height: 100vh; 
    background-image: url('images/playroom.webp'); 
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed; 
    padding: 80px 20px 20px 20px; 
    box-sizing: border-box; 
    display: flex; 
    justify-content: center;
}

.forum-container { 
    width: 100%; 
    max-width: 900px; 
    background: rgba(255, 255, 255, 0.95); 
    border-radius: 30px; 
    border: 5px solid #1dd1a1; 
    padding: 30px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
    height: fit-content; 
}

.forum-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 4px dashed #1dd1a1; 
    padding-bottom: 20px; 
    margin-bottom: 20px; 
}

.forum-header h1 { 
    color: #ff6b6b; 
    margin: 0; 
    font-size: 2.5rem; 
    display: flex;
    align-items: center;
}

/* --- CUSTOM SVGS --- */

/* 1. The Poofy Diaper Jack-in-the-box! */
.icon-jack {
    display: inline-block;
    width: 48px; 
    height: 48px;
    background-color: currentColor; /* Matches the #ff6b6b header color automatically */
    margin-left: 15px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='16' y='40' width='32' height='22' rx='2'/%3E%3Cpath d='M16 40 L6 30 L26 30 L32 40' /%3E%3Cpath d='M22 50 c0-6 20-6 20 0' /%3E%3Cpath d='M24 48 l -2 -6 l 5 4' /%3E%3Cpath d='M40 48 l 2 -6 l -5 4' /%3E%3Ccircle cx='28' cy='54' r='1.5' fill='black' stroke='none' /%3E%3Ccircle cx='36' cy='54' r='1.5' fill='black' stroke='none' /%3E%3Cpath d='M32 55 v3' /%3E%3Cpath d='M18 52 l 4 1 M18 56 l 4 -1 M46 52 l -4 1 M46 56 l -4 -1' /%3E%3Cpath d='M32 40 C 48 35, 16 35, 32 30 C 48 25, 16 25, 32 20' /%3E%3Cpath d='M20 20 h24' /%3E%3Cpath d='M20 20 C 4 20, 8 2, 32 2 C 56 2, 60 20, 44 20' /%3E%3Cpath d='M 16 16 c 1.5 -1.5 -1.5 -4 1.5 -5 c -1.5 -2 0 -4 -1 -5' /%3E%3Cpath d='M 48 16 c -1.5 -1.5 1.5 -4 -1.5 -5 c 1.5 -2 0 -4 1 -5' /%3E%3Cpath d='M20 17 l -5 -2 l 0 -4 l 5 2' /%3E%3Cpath d='M44 17 l 5 -2 l 0 -4 l -5 2' /%3E%3Cpath d='M 26 14 q 6 -6 12 0' /%3E%3Cpath d='M 32 14 q 0 -4 0 -8' /%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='16' y='40' width='32' height='22' rx='2'/%3E%3Cpath d='M16 40 L6 30 L26 30 L32 40' /%3E%3Cpath d='M22 50 c0-6 20-6 20 0' /%3E%3Cpath d='M24 48 l -2 -6 l 5 4' /%3E%3Cpath d='M40 48 l 2 -6 l -5 4' /%3E%3Ccircle cx='28' cy='54' r='1.5' fill='black' stroke='none' /%3E%3Ccircle cx='36' cy='54' r='1.5' fill='black' stroke='none' /%3E%3Cpath d='M32 55 v3' /%3E%3Cpath d='M18 52 l 4 1 M18 56 l 4 -1 M46 52 l -4 1 M46 56 l -4 -1' /%3E%3Cpath d='M32 40 C 48 35, 16 35, 32 30 C 48 25, 16 25, 32 20' /%3E%3Cpath d='M20 20 h24' /%3E%3Cpath d='M20 20 C 4 20, 8 2, 32 2 C 56 2, 60 20, 44 20' /%3E%3Cpath d='M 16 16 c 1.5 -1.5 -1.5 -4 1.5 -5 c -1.5 -2 0 -4 -1 -5' /%3E%3Cpath d='M 48 16 c -1.5 -1.5 1.5 -4 -1.5 -5 c 1.5 -2 0 -4 1 -5' /%3E%3Cpath d='M20 17 l -5 -2 l 0 -4 l 5 2' /%3E%3Cpath d='M44 17 l 5 -2 l 0 -4 l -5 2' /%3E%3Cpath d='M 26 14 q 6 -6 12 0' /%3E%3Cpath d='M 32 14 q 0 -4 0 -8' /%3E%3C/svg%3E") no-repeat center / contain;
}

/* 2. Crayon Icon */
.icon-crayon::before {
    content: ""; display: inline-block; width: 18px; height: 18px; background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.5 3.5 19 9l-9 9H5v-5L13.5 3.5z'/%3E%3Cpath d='M11 5l5 5'/%3E%3Cpath d='M5 14l5 5'/%3E%3Cpath d='M2 22l3-3'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.5 3.5 19 9l-9 9H5v-5L13.5 3.5z'/%3E%3Cpath d='M11 5l5 5'/%3E%3Cpath d='M5 14l5 5'/%3E%3Cpath d='M2 22l3-3'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 3. Rocket/Send Icon */
.icon-rocket::after {
    content: ""; display: inline-block; width: 18px; height: 18px; background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 4. Eye Icon */
.icon-eye {
    display: inline-block; width: 24px; height: 24px; background-color: currentColor; vertical-align: middle; margin-left: 8px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Buttons */
.new-topic-btn { 
    background: linear-gradient(90deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); 
    border: 3px solid #ff758c; 
    border-radius: 20px; 
    padding: 10px 20px; 
    font-size: 1.2rem; 
    font-weight: bold; 
    cursor: pointer; 
    color: #2d3436; 
    transition: transform 0.2s; 
    font-family: inherit; 
    display: none; 
    align-items: center; 
    gap: 8px; /* Spaces icon from text */
}
.new-topic-btn:hover { transform: scale(1.05); }

.new-topic-form { display: none; background: #f1f2f6; border-radius: 15px; padding: 20px; margin-bottom: 20px; border: 3px dashed #7bed9f; }
.new-topic-form input, .new-topic-form textarea { width: 100%; padding: 12px; margin-bottom: 10px; border-radius: 10px; border: 2px solid #dfe4ea; font-family: inherit; font-size: 1.1rem; box-sizing: border-box; }
.new-topic-form textarea { resize: vertical; min-height: 100px; }

.submit-topic-btn { 
    background: #1dd1a1; 
    color: white; 
    border: none; 
    border-radius: 15px; 
    padding: 10px 20px; 
    font-weight: bold; 
    font-size: 1.1rem; 
    cursor: pointer; 
    font-family: inherit; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
}

.topic-row { background: #ffffff; border-radius: 15px; padding: 20px; margin-bottom: 25px; border: 3px solid #dfe4ea; }
.topic-info { position: relative; }
.topic-info .delete-btn { position: absolute; right: 0; top: 0; }
.topic-info h3 { margin: 0; color: #5f27cd; font-size: 1.8rem; display: inline-block; padding-right: 100px; }
.topic-meta { margin: 5px 0 0 0; color: #747d8c; font-size: 0.95rem; border-bottom: 2px dashed #ccc; padding-bottom: 15px; margin-bottom: 15px;}
.topic-message { font-size: 1.2rem; color: #2f3542; line-height: 1.5; white-space: pre-wrap; margin-bottom: 20px; }

.replies-container { background: #f8f9fa; border-radius: 15px; padding: 15px; border: 2px solid #f1f2f6; margin-top: 15px; }
.replies-header { margin: 0 0 10px 0; font-size: 1.1rem; color: #1dd1a1; font-weight: bold; }
.reply-item { padding: 10px; border-bottom: 1px dashed #dfe4ea; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; }
.reply-item:last-child { border-bottom: none; }
.reply-author { font-weight: bold; color: #ff9f43; margin-right: 5px; }

.add-reply-box { display: flex; gap: 10px; margin-top: 15px; }
.add-reply-box input { flex: 1; padding: 10px 15px; border-radius: 15px; border: 2px solid #bdc3c7; font-family: inherit; font-size: 1rem; }
.add-reply-box button { background: #54a0ff; color: white; border: none; border-radius: 15px; padding: 10px 20px; font-weight: bold; cursor: pointer; transition: transform 0.2s; font-family: inherit; }
.add-reply-box button:hover { transform: scale(1.05); background: #2e86de; }

.locked-state { text-align: center; padding: 40px; }
.locked-state h2 { color: #ff4757; font-size: 2rem; }
.locked-state a { display: inline-block; margin-top: 15px; background: #3742fa; color: white; text-decoration: none; padding: 12px 25px; border-radius: 20px; font-weight: bold; font-size: 1.2rem; }

/* --- MOBILE LAYOUT: FORUM --- */
@media (max-width: 768px) {
    .forum-container { padding: 15px; border-width: 3px; border-radius: 20px; }
    .forum-header h1 { font-size: 1.8rem; }
    .new-topic-btn { font-size: 1rem; padding: 8px 15px; }
    .topic-info h3 { font-size: 1.4rem; padding-right: 60px; }
    .topic-message { font-size: 1.1rem; }
    .reply-item { font-size: 1rem; flex-direction: column; align-items: flex-start; gap: 5px; }
    .reply-item .delete-btn { align-self: flex-end; }
}