:root {
    --main-color: #4a90e2;
    --background-color: #ffffff;
    --text-color: #14171a;
    --border-color: #e1e8ed;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    justify-content: center;
    flex-grow: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

nav {
    width: 220px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.nav-items {
    margin-bottom: 1rem;
    top: 100px;
}

.nav-items .disabled {
    color: #a0a0a0;
    cursor: not-allowed;
    position: relative;
}

.nav-items .disabled::after {
    content: '(준비 중)';
    font-size: 0.8em;
    margin-left: 5px;
    color: #a0a0a0;
}

.nav-items .disabled i {
    color: #a0a0a0;
}

.new-post-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    display: block;
}

#publish-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    display: block;
}

#publish-btn:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    margin-bottom: 1rem;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
}

nav ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

main {
    flex: 1;
    min-width: 0;
    max-width: 800px;
    width: 100%;
    padding: 1rem;
}

.sidebar {
    width: 0px;
    padding: 1rem;
}

.profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 1rem;
    cursor: pointer;
}

.new_takus_post {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.new_takus_post textarea {
    width: 100%;
    min-height: 100px;
    border: none;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.new_takus_post .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.new_takus_post .file-inputs label {
    background-color: #f0f0f0;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 0.5rem;
}

.new_takus_post .file-inputs input[type="file"] {
    display: none;
}

.drag-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.drag-drop-area.dragover {
    background-color: rgba(74, 144, 226, 0.1);
}

.post-media-container {
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 1rem;
}

.post-media-item {
    display: inline-block;
    margin-right: 1rem;
    max-width: 100%;
    max-height: 300px;
}

.takus_post {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.post-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

.comments {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.comment {
    position: relative;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-comment {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0;
    font-size: 0.9em;
}

.delete-comment:hover {
    color: #f00;
}

.comment-content {
    margin-top: 5px;
}

.comment-form {
    display: flex;
    margin-top: 1rem;
    align-items: center;
}

.comment-form input {
    flex-grow: 1;
    margin-right: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.comment-form button {
    background-color: var(--main-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-actions-right {
    display: flex;
    gap: 10px;
}

.post-actions-right button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1rem;
    transition: color 0.3s ease; /* 부드러운 색상 전환 효과 추가 */
}

.post-actions-right button.edit-button:hover {
    color: #4a90e2; /* 수정 버튼 hover 시 파란색으로 변경 */
}

.post-actions-right button:hover:not(.edit-button) {
    color: #e74c3c; /* 삭제 버튼 hover 시 빨간색으로 변경 */
}
.edit-mode .post-content {
    display: none;
}

.edit-form {
    display: none;
    margin: 10px;
}

.edit-mode .edit-form {
    display: block;
}

.edit-form textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.edit-form button {
    background-color: var(--main-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.media-preview {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.media-preview-item {
    position: relative;
    max-width: 100px;
    max-height: 100px;
}

.media-preview-item img,
.media-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.media-preview-item .remove-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    width: auto;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1000;
}

.mobile-nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style-type: none;
    padding: 0;
    margin: 0;
    height: 1.5rem;
}

.mobile-nav ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex: 1;
}

.mobile-nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.mobile-nav ul li a i {
    margin-bottom: 5px;
}

.mobile-nav ul li a.new-post-btn {
    background-color: var(--main-color);
    color: white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    top: -15px;
}

.mobile-nav .disabled {
    color: #a0a0a0;
    cursor: not-allowed;
}

/* 프로필 페이지 스타일 */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.profile-image {
    position: relative;
    margin-bottom: 20px;
    display: inline-block;
}

.profile-image .profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.change-profile-btn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: gray;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.3s;
}

.change-profile-btn:hover {
    color: rgba(0, 0, 0, 0.8);
}

#change-profile-picture {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
}



.profile-details {
    text-align: left;
    width: 100%;
}



.profile-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.profile-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.btn-reset {
    background-color: #f0f0f0;
    border: none;
    color: var(--text-color);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 10px;
}

.btn-reset:hover {
    background-color: #e0e0e0;
}

.delete-icon {
    color: #dc3545;
}

.delete-account-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    display: flex;
    align-items: center;
}

.delete-account-btn:hover,
.delete-account-btn:hover .delete-icon {
    color: #dc3545;
}

#reset-nickname {
    margin-left: 10px;
    padding: 2px 5px;
    font-size: 0.8em;
}

.user-posts {
    margin-top: 30px;
}

.user-posts h3 {
    margin-bottom: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.user-name {
    font-weight: bold;
    color: var(--text-color);
    margin-left: 10px;
}

.post-media-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.media-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
}

.media-list img,
.media-list video {
    flex: 0 0 auto;
    max-width: 50%;
    height: auto;
    object-fit: contain;
    background-color: none;
    border: none; 
}

#loading-indicator {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #888;
}

/* Modal CSS */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    height: 90%;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    background-color: transparent;
}

.modal-content {
    animation-name: zoom;
    animation-duration: 0.1s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

@media (max-width: 25600px) {
    .container {
        flex-direction: row;
        align-items: flex-start;
        max-width: 1200px;
        margin-left: 0;
    }
    nav {
        position: fixed;
        top: 0;
        left: 30px;
        bottom: 0;
        height: 100vh;
        width: 250px;
        box-sizing: border-box;
        overflow-y: auto;
        background-color: var(--background-color);
    }

    main {
        margin-left: 270px;
        flex: 1;
        min-width: 0;
        max-width: 800px;
        width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 800px) {
    body {
        padding-bottom: 60px;
    }
    .container {
        flex-direction: column;
        align-items: center;
    }
    nav {
        display: none;
    }
    main {
        max-width: 100%;
        padding: 1rem;
        box-sizing: border-box;
        margin-left: 0;
    }
    .mobile-nav {
        position: fixed;
        display: block;
        height: 60px;
        top: auto;
        bottom: 0;
    }
    #drag-drop-area {
        display: none;
    }
    .profile-container {
        padding: 10px;
    }
    .profile-image .profile-pic {
        width: 100px;
        height: 100px;
    }
    .media-list img,