/* Page Title Section */
.page-title-section {
    text-align: center;
    /* padding: 2rem 1rem;
    margin: 2rem 0; */
}

.page-title-section h1 {
    color: black;
    margin-bottom: 0.5rem;
}

.page-title-section p {
    color: black;
}

.post-form h2 {
    color: black;
    text-align: left;
}

.post-form input:focus, .post-form textarea:focus {
    outline: none;
    border: var(--border);
    background-color: var(--color-gray);
}

.post-form .form-group label {
    display: block;
    color: black;
}

.post-form .form-group textarea {
    width: 100%;
    font-family: "attribute-mono", sans-serif;
    height: 120px;
    min-height: 120px;
    max-height: 120px;
    resize: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.post-form .form-note {
    color: blue;
}

.post-form .form-row {
    display: flex;
    gap: 0;
}

.post-form .form-row .form-group {
    flex: 1;
}

.post-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.post-form .form-grid .form-group {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Floating Add Button */
#togglePostFormBtn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 10000000;
}

.floating-add-btn {
    width: 50px;
    height: 50px;
    background-color: black;
    color: var(--neon-yellow);
    line-height: 50px;
    font-size: 2rem;
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}


.post-form .btn:disabled {
    cursor: not-allowed;
}

.post-form.open {
    margin-bottom: 2rem;
}

/* Media Upload Area Styles */
.media-upload-area {
    /* border: 1px solid var(--color-dark-gray); */
    /* border-radius: 0.5rem; */
    /* padding: 1rem; */
}

/* Circle Radio Button Style */
.upload-radio {
        gap: 1rem;
        display: flex;
        width: 100%;
        justify-content: flex-end;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.circle-radio {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: var(--border);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
}

.circle-radio:hover, .circle-radio:checked {
    border-color: black !important;
    background-color: black !important;
}

.radio-text {
    cursor: pointer;
    color: black;
}

.upload-section {
    min-height: 120px;
}

/* Image Upload Area Styles */
.image-upload-area {
    border: 1px dashed var(--color-dark-gray);
    border-radius: 0.5rem;
    height: 120px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-area:hover {
    background-color: white;
    border-color: var(--color-blue);
}

.image-upload-area p {
    margin: 0;
    color: var(--color-dark-gray);
    font-style: italic;
}

/* Code Input Area Styles */
.code-input-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.code-input-area textarea {
    width: 100%;
    font-family: 'Courier New', monospace;
    padding: 0.75rem;
    border: 1px solid var(--color-dark-gray);
    border-radius: 0.25rem;
    resize: vertical;
    background: #f8f9fa;
}

.code-input-area textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    background: white;
}

.code-options {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.code-options select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--color-dark-gray);
    /* border-radius: 0.25rem; */
    background: white;
}

/* Video Input Area Styles */
.video-input-area {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.video-url-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-dark-gray);
    border-radius: 0.25rem;
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
}

.video-url-input:focus {
    outline: none;
    border-color: var(--color-blue);
    background: white;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.video-preview {
    margin-top: 0.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px dashed var(--color-dark-gray);
    position: relative;
    margin-bottom: 0.5rem;
}

/* video-preview 내부의 video-container도 16:9 비율 적용 */
.video-preview .video-container {
    width: 100%;
    max-width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    overflow: hidden;
}

.video-preview .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-preview p {
    margin: 0;
    text-align: center;
}

.video-container {
    /* margin-top: 1rem; */
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 비율 (9/16 = 0.5625) */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.upload-mode {
    width: 100%;
}

.btn-small {
    /* padding: 0.25rem 0.75rem; */
    /* font-size: 0.8rem; */
    /* background: var(--color-dark-gray); */
    color: white;
    border: var(--border);
    /* border: none; */
    /* border-radius: 0.25rem; */
    /* cursor: pointer; */
}

/* Image Preview Container */
.image-preview-container {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.image-preview-container img {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    border: var(--border);
}

/* ============================================
   Feed/Index 본문 레이아웃 스타일
   ============================================
   이 스타일들은 feed.php와 index.php에서 공통으로 사용됩니다.
   ============================================ */

/* Infinite Scroll Sentinel */
.load-more-sentinel {
    height: 1px;
    width: 100%;
    visibility: hidden;
}

/* No More Posts Message */
.no-more-posts {
    text-align: center;
    color: var(--color-dark-gray);
    font-style: italic;
    padding: 2rem 0;
    margin-bottom: 5rem;
}

/* Two Column Feed Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .two-column-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.posts-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* User Filter Section */
.user-filter-section {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.user-filter-section label {
    font-weight: 600;
}

.filter-select {
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    border-radius: var(--radius);
    border: var(--border);
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    cursor: pointer;
    font-family: "attribute-mono", sans-serif;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.admin-posts-column {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.all-posts-column {
    /* Normal flow */
}

/* Responsive */
@media (max-width: 1024px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-posts-column {
        position: relative;
        max-height: none;
        order: 1;
    }
    
    .all-posts-column {
        order: 2;
    }
}

