* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 600;
}

.search-container {
    max-width: 500px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s ease;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#searchInput:focus {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.btn-new {
    margin: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #22f306 0%, #00ff44 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-new:active {
    transform: translateY(0);
}

.memo-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px 10px;
}

.memo-item {
    background: white;
    margin: 10px 0;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.memo-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.memo-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.memo-item.active {
    border-color: #667eea;
    background: #f0f4ff;
}

.memo-item-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.memo-item-star {
    font-size: 16px;
    color: #ffc107;
    flex-shrink: 0;
}

.memo-item-preview {
    font-size: 14px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
}

.memo-item-date {
    font-size: 12px;
    color: #999;
}

.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 18px;
    text-align: center;
}

.editor {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#memoTitle {
    font-size: 32px;
    font-weight: 600;
    border: none;
    outline: none;
    padding: 10px 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

#memoTitle:focus {
    border-bottom-color: #667eea;
}

#memoContent {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    border: none;
    outline: none;
    resize: none;
    padding: 10px 0;
    color: #333;
    font-family: inherit;
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
}

.memo-date {
    color: #999;
    font-size: 14px;
}

.editor-actions {
    display: flex;
    gap: 10px;
.btn-save, .btn-delete, .btn-star {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-star {
    padding: 8px 14px;
    background: #fffbea;
    color: #ffc107;
    border: 1px solid #ffe58f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.btn-star:hover {
    background: #fff3bf;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}

.btn-star.active {
    background: #ffd43b;
    color: #fff;
    border-color: #fcc419;
}

.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.btn-delete {
    background: #ff6b6b;
    color: white;
}

.btn-delete:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

/* 스크롤바 스타일링 */
.memo-list::-webkit-scrollbar,
.editor-container::-webkit-scrollbar {
    width: 8px;
}

.memo-list::-webkit-scrollbar-track,
.editor-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.memo-list::-webkit-scrollbar-thumb,
.editor-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.memo-list::-webkit-scrollbar-thumb:hover,
.editor-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 200px;
    }

    header h1 {
        font-size: 2em;
    }
}
