body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    margin-top: 50px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.memo-input-area {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.memo-input-area textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    resize: vertical;
    min-height: 100px;
}

.input-actions {
    display: flex;
    flex-direction: column; /* 세로로 정렬 */
    align-items: flex-end; /* 오른쪽으로 정렬 */
    gap: 15px; /* 버튼과 검색 컨테이너 사이 간격 */
}

.memo-input-area button#add-memo-btn {
    width: 100%; /* 전체 너비 차지하도록 설정 */
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.memo-input-area button#add-memo-btn:hover {
    background-color: #45a049;
}

/* 검색 컨트롤 컨테이너 */
.search-controls {
    position: relative;
    display: inline-block;
    z-index: 10; /* 다른 요소 위에 오도록 z-index 설정 */
}

/* 메인 검색 토글 버튼 */
.search-controls button#search-toggle-btn {
    background-color: #343a40; /* 검은 회색 */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px; /* 사각형 */
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.search-controls button#search-toggle-btn:hover {
    background-color: #495057;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.search-controls button#search-toggle-btn:active {
    background-color: #212529;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(0);
}

/* 검색 박스 (입력창과 실행 버튼 포함) */
.search-box {
    position: absolute;
    right: 0; /* 메인 버튼의 오른쪽으로 정렬 */
    top: 0;
    display: flex;
    overflow: hidden;
    width: 0; /* 초기 숨김 상태 */
    opacity: 0;
    transition: width 0.5s ease-out, opacity 0.5s ease-out;
    white-space: nowrap;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px; /* 전체 박스 둥글게 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-box.active {
    width: 350px; /* 활성화 시 너비 증가 */
    opacity: 1;
}

.search-box input#search-input {
    flex-grow: 1;
    padding: 10px;
    border: none; /* 부모 search-box에 테두리가 있으므로 자체 테두리 제거 */
    border-radius: 8px 0 0 8px; /* 왼쪽만 둥글게 */
    font-size: 16px;
    outline: none;
    background-color: #ffffff;
}

.search-box button#search-execute-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none; /* 부모 search-box에 테두리가 있으므로 자체 테두리 제거 */
    border-radius: 0 8px 8px 0; /* 오른쪽만 둥글게 */
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.search-box button#search-execute-btn:hover {
    background-color: #0056b3;
}

/* 메모 목록 및 아이템 */
.memo-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.memo-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #777;
}

.memo-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.6;
}

/* 인플레이스 편집 모드 */
.edit-mode {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.edit-textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    min-height: 80px;
    resize: vertical;
    box-sizing: border-box;
}

.edit-mode button {
    background-color: #5cb85c;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.edit-mode button:last-child {
    background-color: #f0ad4e;
    margin-right: 0;
}

.edit-mode button:hover {
    opacity: 0.9;
}

/* 메모 액션 버튼 (수정, 삭제) */
.memo-actions button {
    background-color: #008CBA;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.memo-actions button:last-child {
    background-color: #f44336;
    margin-right: 0;
}

.memo-actions button:hover {
    opacity: 0.9;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 0 5px;
    transition: background-color 0.3s ease;
}

.pagination button:hover {
    background-color: #0056b3;
}

.pagination button.active {
    background-color: #0056b3;
    font-weight: bold;
}

.pagination button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 로그인 페이지 스타일 */
.login-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin-top: 100px;
    text-align: center;
}

.login-container h1 {
    color: #333;
    margin-bottom: 30px;
}

.login-form input[type="password"] {
    width: calc(100% - 20px);
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-form button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #0056b3;
}

.error-message {
    color: #dc3545;
    margin-top: 15px;
    font-weight: bold;
} 
