/* 고급 기능을 위한 추가 스타일 */

/* 모달 기본 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #dbdbdb;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #8e8e8e;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #262626;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #dbdbdb;
}

/* 새 게시물 모달 */
.new-post-modal {
    max-width: 600px;
}

.image-upload-area {
    margin-bottom: 16px;
}

.upload-placeholder {
    border: 2px dashed #dbdbdb;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.upload-placeholder:hover {
    border-color: #0095f6;
}

.upload-placeholder svg {
    color: #8e8e8e;
    margin-bottom: 12px;
}

.upload-placeholder p {
    color: #8e8e8e;
    margin: 0;
}

#postCaption {
    width: 100%;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
}

#postLocation {
    width: 100%;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
}

.btn-cancel, .btn-post {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-cancel {
    background: #f5f5f5;
    color: #262626;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-post {
    background: #0095f6;
    color: white;
}

.btn-post:hover {
    background: #0084d6;
}

/* 스토리 모달 */
.story-modal {
    background-color: rgba(0, 0, 0, 0.9);
}

.story-modal-content {
    background: transparent;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    color: white;
}

.story-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.story-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
}

.story-username {
    font-weight: 600;
}

.story-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.close-story {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
}

.story-image-container {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.story-full-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

.story-progress {
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: white;
    width: 0;
}

/* 프로필 모달 */
.profile-modal {
    max-width: 400px;
}

.profile-info {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-details h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.profile-details p {
    margin: 4px 0;
    color: #8e8e8e;
    font-size: 14px;
}

.profile-bio {
    color: #262626 !important;
}

.profile-actions {
    display: flex;
    gap: 12px;
}

.btn-follow, .btn-message {
    flex: 1;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-follow {
    background: #0095f6;
    color: white;
}

.btn-follow:hover {
    background: #0084d6;
}

.btn-message {
    background: #f5f5f5;
    color: #262626;
}

.btn-message:hover {
    background: #e0e0e0;
}

/* 검색 모달 */
.search-modal {
    max-width: 400px;
}

.search-input {
    width: 100%;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 20px;
}

.recent-searches h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #262626;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.remove-search {
    background: none;
    border: none;
    color: #8e8e8e;
    cursor: pointer;
    font-size: 18px;
}

/* 알림 */
.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ed4956;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.notifications-modal {
    max-width: 400px;
}

.notification-item {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.notification-item.unread {
    background: #f8f9fa;
    margin: 0 -20px;
    padding: 12px 20px;
}

.notification-content {
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 12px;
    color: #8e8e8e;
}

.no-notifications {
    text-align: center;
    color: #8e8e8e;
    padding: 40px 0;
}

/* 새 게시물 버튼 */
.new-post-btn {
    margin-right: 16px;
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes storyProgress {
    from { width: 0; }
    to { width: 100%; }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .story-modal-content {
        width: 95%;
    }
    
    .story-full-image {
        height: 500px;
    }
    
    .upload-placeholder {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .story-full-image {
        height: 400px;
    }
}
