/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.screen {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* 로그인 화면 */
.login-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 400px;
    max-width: 90vw;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 채팅 화면 */
.chat-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.chat-header {
    background: #667eea;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-info h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

/* 현재 로그인한 사용자 정보 */
.current-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.current-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.current-user-name {
    font-size: 15px;
    font-weight: 600;
    color: white;
}

/* 온라인 사용자들 */
.online-users {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.online-label {
    font-size: 12px;
    opacity: 0.9;
}

.online-users-avatars {
    display: flex;
    gap: 4px;
    align-items: center;
}

.online-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 11px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.online-user-avatar:hover {
    transform: scale(1.15);
}

.online-count {
    font-size: 13px;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.online-indicator {
    color: #4ade80;
    font-size: 8px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-reveal-all {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.btn-reveal-all:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.btn-reveal-all:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-reveal-all i {
    font-size: 14px;
}

.btn-icon {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.3);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 2px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    position: relative;
    gap: 8px;
}

.message.own-message {
    justify-content: flex-end;
}

.message.other-message {
    justify-content: flex-start;
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.message.own-message .message-content {
    background: #007AFF;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.other-message .message-content {
    background: #E5E5EA;
    color: black;
    border-bottom-left-radius: 4px;
}

.message-content:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* 암호화된 메시지 스타일 - 랜덤 문자열 + 블러 효과 */
.message-content.encrypted {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0.5px;
    position: relative;
    word-break: break-all;
    filter: blur(4px);
    transition: filter 0.3s ease;
    user-select: none;
}

/* 내 메시지 - 암호화 상태 */
.message.own-message .message-content.encrypted {
    background: #007AFF;
    color: rgba(255, 255, 255, 0.9);
}

/* 상대방 메시지 - 암호화 상태 */
.message.other-message .message-content.encrypted {
    background: #E5E5EA;
    color: rgba(0, 0, 0, 0.7);
}

/* 암호화 아이콘 표시 - 블러 없이 선명하게 */
.message-content.encrypted::before {
    content: '🔒 ';
    font-size: 12px;
    opacity: 0.7;
    margin-right: 4px;
    filter: blur(0px);
    display: inline-block;
}

/* 복호화된 메시지 - 원래 스타일 복원 */
.message-content.revealed {
    font-family: inherit;
    font-size: 14px;
    letter-spacing: normal;
    filter: none;
    transition: filter 0.3s ease;
    user-select: text;
}

/* 내 메시지 - 복호화 상태 */
.message.own-message .message-content.revealed {
    background: #007AFF;
    color: white;
}

/* 상대방 메시지 - 복호화 상태 */
.message.other-message .message-content.revealed {
    background: #E5E5EA;
    color: black;
}

/* 복호화 시 아이콘 제거 */
.message-content.revealed::before {
    display: none;
}

/* 메시지 안의 이미지 */
.message-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 12px;
    display: block;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.message-image:hover {
    transform: scale(1.02);
}

/* 암호화된 이미지 (블러 처리) */
.message-image.encrypted {
    filter: blur(20px);
    user-select: none;
    pointer-events: none;
    /* 고정된 크기로 표시하여 암호화 시 원본 크기 숨김 */
    width: 200px !important;
    height: 200px !important;
    object-fit: cover;
    background: #e0e0e0;
}

/* 복호화된 이미지 */
.message-image.revealed {
    filter: none;
    user-select: auto;
    pointer-events: auto;
    /* 복호화 시 원본 크기로 복원 */
    width: auto !important;
    height: auto !important;
    max-width: 300px;
    max-height: 300px;
}

/* 이미지 다운로드 버튼 */
.message-image-download {
    margin-top: 8px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid #667eea;
    color: #667eea;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.message-image-download:hover {
    background: #667eea;
    color: white;
}

.message-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
}

.message-author {
    font-weight: 600;
}

.message-time-wrapper {
    position: relative;
    min-width: 45px;
    align-self: flex-end;
    margin-bottom: 4px;
}

.message-time {
    color: #999;
    font-size: 11px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.message.hide-time .message-time {
    visibility: hidden;
}

/* 읽음 상태 표시 - 메시지에 살짝 오버레이 */
.message-read-status {
    font-size: 9px;
    color: #999;
    margin-top: -6px;
    margin-bottom: -2px;
    text-align: left;
    padding-left: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 16px;
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
    z-index: 1;
}

/* 내 메시지의 읽음 상태는 오른쪽 정렬 */
.message-read-status.own-message-read {
    justify-content: flex-end;
    text-align: right;
}

.message-read-status.read {
    opacity: 1;
}

.message-read-status .read-text {
    color: #667eea;
    font-weight: 500;
    font-size: 9px;
}

.message-read-status .read-avatar {
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 16px;
    height: 16px;
    font-size: 8px;
    line-height: 16px;
}

.message-read-status .read-avatar:hover {
    transform: scale(1.2);
    z-index: 100 !important;
}

/* 읽음 표시 버튼 */
.mark-read-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #667eea;
    color: #667eea;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mark-read-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.mark-read-btn:active {
    transform: scale(0.95);
}

/* 메시지 컨텍스트 메뉴 */
.message-context-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.context-menu-item:hover {
    background: #f5f5f5;
}

.context-menu-item:active {
    background: #e8e8e8;
}

.context-menu-item i {
    width: 16px;
    color: #667eea;
}

.context-menu-item:first-child:hover {
    background: #fee;
    color: #e53e3e;
}

.context-menu-item:first-child:hover i {
    color: #e53e3e;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 삭제 버튼 스타일 제거 - 컨텍스트 메뉴로 대체됨 */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 모바일 스타일 - 삭제 버튼 제거됨 */

.message-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.read-indicator {
    color: #4ade80;
}

.chat-input {
    background: white;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-container input:focus {
    border-color: #667eea;
}

.btn-send {
    background: #667eea;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send:hover {
    background: #5a6fd8;
}

.btn-attach {
    background: #f0f0f0;
    color: #667eea;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.btn-attach:hover {
    background: #667eea;
    color: white;
}

.image-preview-container {
    margin-bottom: 10px;
    padding: 10px;
    border: 2px dashed #667eea;
    border-radius: 10px;
    background: #f8f9ff;
}

.image-preview-wrapper {
    position: relative;
    display: inline-block;
    max-width: 300px;
}

.image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    display: block;
}

.btn-remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s ease;
}

.btn-remove-image:hover {
    background: #dc2626;
}

.image-info {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 10px;
}

.input-hint {
    text-align: center;
    color: #666;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* 관리자 화면 */
.admin-container {
    width: 100%;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: #667eea;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h2 {
    font-size: 24px;
}

.admin-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.admin-tabs .tab-btn {
    padding: 15px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.admin-tabs .tab-btn.active {
    background: white;
    border-bottom-color: #667eea;
    color: #667eea;
}

.admin-tab {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.user-list, .message-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-item, .message-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info, .message-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-actions, .message-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.btn-success {
    background: #4ade80;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.stat-card i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-card h4 {
    color: #333;
    margin-bottom: 10px;
}

.stat-card span {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

.profile-info {
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item label {
    font-weight: 600;
    color: #333;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .chat-container {
        height: 100vh;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .login-container {
        width: 95vw;
        padding: 20px;
    }
    
    .admin-container {
        height: 100vh;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.message {
    animation: fadeIn 0.3s ease;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 비밀번호 확인 모달 */
.modal-small .modal-content {
    max-width: 400px;
}

.verify-message {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 계정 설정 (사용자명 + 비밀번호) */
.account-settings {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.account-settings h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-settings h4 i {
    color: #667eea;
}

.setting-section {
    margin-bottom: 15px;
}

.setting-section label {
    display: block;
    font-weight: 600;
    color: #555;
    font-size: 14px;
    margin-bottom: 8px;
}

.setting-section input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.setting-section input:focus {
    outline: none;
    border-color: #667eea;
}

.setting-section input[readonly] {
    background: #e9ecef;
    cursor: not-allowed;
}

.setting-section small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.divider {
    height: 1px;
    background: #e1e8ed;
    margin: 25px 0;
}

/* 아바타 커스터마이징 */
.avatar-customization {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.avatar-customization h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-customization h4 i {
    color: #667eea;
}

.avatar-preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    background: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.avatar-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.control-group input[type="text"] {
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.control-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.control-group small {
    color: #999;
    font-size: 12px;
}

.color-picker-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.color-picker-group input[type="color"]:hover {
    border-color: #667eea;
}

.color-picker-group input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    transition: border-color 0.3s ease;
}

.color-picker-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.control-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* 통합 저장 섹션 */
.profile-save-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
}

.save-notice {
    color: white;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.6;
}

.save-notice i {
    font-size: 16px;
}

.save-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.save-actions .btn-primary {
    background: white;
    color: #667eea;
    font-weight: 600;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.save-actions .btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.save-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
    padding: 12px 24px;
}

.save-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 이미지 모달 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.image-modal.active {
    display: flex;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-modal-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-modal-img.encrypted {
    filter: blur(20px);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-modal-timer {
    margin-top: 15px;
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* 채팅 메시지 이미지 클릭 가능 표시 */
.message-image {
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
