/* notepad.css */

/* 메모장 스타일 */
.memo-container {
    margin: 15px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: var(--card-bg);
  }
  
  .memo-editor {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    outline: none;
    line-height: 1.6;
    color: var(--text-color);
  }
  
  .memo-editor[placeholder]:empty:before {
    content: attr(placeholder);
    color: var(--gray-400);
    pointer-events: none;
  }
  
  .memo-title-container {
    margin-bottom: 10px;
  }
  
  .memo-stats {
    text-align: right;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 10px;
    padding-right: 10px;
  }
  
  .memo-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
  }
  
  .memo-actions .btn {
    flex: 0 0 auto;
  }
  
  .memo-actions .form-group {
    flex: 1;
    min-width: 150px;
    margin: 0;
  }
  
  /* 툴바 스타일 */
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 5px;
    gap: 2px;
    margin-bottom: 10px;
  }
  
  .tool-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .tool-btn:hover {
    background: var(--light-bg);
  }
  
  .tool-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
  }
  
  .tool-btn.danger {
    color: var(--danger);
  }
  
  .tool-btn.danger:hover {
    background: var(--danger-light);
  }
  
  .divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 5px;
  }
  
  /* 테마 토글 스타일 */
  .card-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  
  .card-actions {
    display: flex;
    align-items: center;
  }
  
  .theme-toggle-container {
    margin: 0;
  }
  
  .theme-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
  }
  
  .theme-checkbox {
    display: none;
  }
  
  .toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: var(--light-bg);
    border-radius: 24px;
    transition: all 0.3s;
    display: inline-block;
  }
  
  .toggle-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    top: 2px;
    left: 2px;
    transition: all 0.3s;
  }
  
  .theme-checkbox:checked + .toggle-slider {
    background: var(--dark-bg);
  }
  
  .theme-checkbox:checked + .toggle-slider:before {
    transform: translateX(26px);
  }
  
  /* 메모 관리 스타일 */
  .memo-backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .password-input-container {
    position: relative;
    display: flex;
    align-items: center;
  }
  
  .toggle-password-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
  }
  
  .toggle-password-btn:hover {
    color: var(--primary);
  }
  
  .memo-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
  }
  
  .memo-list-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .memo-list-item:last-child {
    border-bottom: none;
  }
  
  .memo-list-item:hover {
    background: var(--light-bg);
  }
  
  .memo-list-item-title {
    font-weight: 500;
    margin-bottom: 5px;
  }
  
  .memo-list-item-info {
    font-size: 0.75rem;
    color: var(--gray-500);
  }
  
  .memo-list-item-actions {
    display: flex;
    gap: 5px;
  }
  
  .memo-list-item-actions button {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    transition: color 0.2s;
  }
  
  .memo-list-item-actions button:hover {
    color: var(--primary);
  }
  
  .memo-list-item-actions button.delete-btn:hover {
    color: var(--danger);
  }
  
  /* 모달 스타일 */
  .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    align-items: center;
    justify-content: center;
  }
  
  .modal.show {
    display: flex;
  }
  
  .modal-content {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    animation: modalFadeIn 0.3s;
  }
  
  @keyframes modalFadeIn {
    from {
      opacity: 0;
      transform: translateY(-50px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
  }
  
  .modal-header h3 {
    margin: 0;
  }
  
  .close-modal {
    font-size: 24px;
    font-weight: bold;
    color: var(--gray-600);
    cursor: pointer;
  }
  
  .close-modal:hover {
    color: var(--primary);
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .input-group {
    display: flex;
  }
  
  .input-group .form-control {
    border-radius: 4px 0 0 4px;
    border-right: none;
  }
  
  .input-group .btn {
    border-radius: 0 4px 4px 0;
  }
  
  /* 소셜 공유 버튼 */
  .social-share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }
  
  .btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }
  
  .btn-twitter {
    background: #1DA1F2;
    color: white;
    border: none;
  }
  
  .btn-facebook {
    background: #4267B2;
    color: white;
    border: none;
  }
  
  .btn-email {
    background: #DB4437;
    color: white;
    border: none;
  }
  
  .qr-code-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
  }
  
  /* 반응형 */
  @media (max-width: 768px) {
    .memo-actions {
      flex-direction: column;
      align-items: stretch;
    }
    
    .memo-actions .btn,
    .memo-actions .form-group {
      width: 100%;
    }
    
    .toolbar {
      justify-content: center;
    }
    
    .memo-backup-actions {
      flex-direction: column;
    }
  
    .social-share-buttons {
      flex-direction: column;
    }
  }
  
  /* 다크 테마 추가 스타일 */
  body.dark-theme .memo-editor {
    background: var(--dark-bg);
    color: var(--light-text);
  }
  
  body.dark-theme .modal-content {
    background: var(--dark-bg);
    color: var(--light-text);
  }
  
  body.dark-theme .tool-btn {
    background: var(--dark-accent);
    color: var(--light-text);
  }
  
  body.dark-theme .memo-container {
    background: var(--dark-accent);
    border-color: var(--dark-border);
  }

  /* 저장 알림 스타일 */
.save-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: fadeIn 0.3s;
    font-weight: 500;
  }
  
  .save-notification.fade-out {
    animation: fadeOut 0.5s;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
  }
  
  /* 저장 버튼 강조 */
  #saveBtn {
    font-weight: 500;
  }
  
  #saveBtn i {
    margin-right: 5px;
  }
  
  /* 반응형에서 버튼 정렬 */
  @media (max-width: 768px) {
    .memo-actions {
      gap: 10px;
    }
    
    #saveBtn {
      width: 100%;
    }
  }